Launch() function on linux (Ubuntu)

Hello :slight_smile:

I’m trying to use the launch() function
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

1 Like

@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?

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

OK Got it ! :smiley:

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

is the solution

2 Likes