# Launch() function on linux (Ubuntu)

**URL:** <https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725>\
**Category:** Coding Questions\
**Created:** [December 18, 2018, 8:03am UTC](https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725 "2018-12-18T08:03:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoebus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/phoebus/32/481_2.png) [@phoebus](https://discourse.processing.org/u/phoebus)\
**Post date:** [December 18, 2018, 8:03am UTC](https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725/1 "2018-12-18T08:03:38Z")

</div>

Hello 🙂

I’m trying to use [the launch() function](https://processing.org/reference/launch_.html)  
in a stketch I developped and exported for Linux.

The machine I am trying it on is using Ubuntu

it says  
" _On Linux, it first tries gnome-open, then kde-open, but if neither are available, it sends the command to the shell and prays that something useful happens._"

The string I used is “/usr/bin/kodi” for I want to launch Kodi from my sketch but instead of launching the app,  
it opens the kodi.sh file in the editor.

(I made sur the file is executable and when I double click it in the file explorer, it does launch the app)

any idea ?

cheers

---

<div class="post-metadata">

**Author:** ![Whahahahaha](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@Whahahahaha](https://discourse.processing.org/u/Whahahahaha)\
**Post date:** [December 18, 2018, 12:53pm UTC](https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725/2 "2018-12-18T12:53:08Z")

</div>

@phoebus don’t you need to specify it’s filetype? so it should be:

> “/usr/bin/kodi.sh”

does the command work in the terminal itself instead of file explorer?

---

<div class="post-metadata">

**Author:** ![phoebus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/phoebus/32/481_2.png) [@phoebus](https://discourse.processing.org/u/phoebus)\
**Post date:** [December 19, 2018, 4:12am UTC](https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725/3 "2018-12-19T04:12:07Z")

</div>

just tried it… doesn’t work

in fact it works even less.  
**with “/usr/bin/kodi” it opens the kodi.sh file in the text editor**  
with “/usr/bin/kodi.sh” it… does nothing

**in the terminal “/usr/bin/kodi” launches kodi**  
“/usr/bin/kodi.sh” returns "no such file of folder

---

<div class="post-metadata">

**Author:** ![phoebus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/phoebus/32/481_2.png) [@phoebus](https://discourse.processing.org/u/phoebus)\
**Post date:** [December 19, 2018, 7:36am UTC](https://discourse.processing.org/t/launch-function-on-linux-ubuntu/6725/4 "2018-12-19T07:36:38Z")

</div>

OK Got it ! 😃

`exec("/usr/bin/kodi");`

is the solution
