Kodi Community Forum
[RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Support (/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox (/showthread.php?tid=35739)

- TheDuffMan - 2010-09-24 04:32

Sweet! Thanks so much for taking an initiative on this and getting it into the official repo. I couldn't bring myself to upgrade to Dharma until I knew I could port my 'gaming' collection over Smile

- matejdro - 2010-09-24 11:45

I have a problem. When i want to add application to launch, it shows me only my CD drive. Is there any way to add other drives to that list?

- kimp93 - 2010-09-24 17:05

I submit korean translation to gcode.

- smithr99 - 2010-09-24 19:06

this new update breaks my install on my ASRock 330HT. I figured out what it was though...

In the addons/plugin.program.launcher/resources/lib/ folder there is the launcher_plugin.py file. As part of this file, there is this section for linux users (I'm on Dharma 2 Live) ...

elif (sys.platform.startswith('linux')):
#this minimizes xbmc some apps seems to need it
os.system("%s %s" % (launcher["application"], launcher["args"]))
#this brings xbmc back

In order to get this working on my ASRock 330HT, I also had to find the following bit of code further down in launcher_plugin.py

elif (sys.platform.startswith('linux')):
os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))

You then have to do the same as the first bit of code, by wrapping the xbmc.executehttpapi("Action(199)") around both sides of this code, eg ...

elif (sys.platform.startswith('linux')):
os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))

Is there any reason why this cannot be included in the script for everyone ? Would it break the launcher on other platforms ? If so, then I guess all ASRock users will have to follow the procedure above every time the script is updated.

Many thanks for the great work

- alexpigment - 2010-09-25 01:10

zosky Wrote:dinozzo, action(199) needs to appear in 2 places in the launcher_plugin.py ...
i have this working & here's how mine looks:

[color=red]def _run_launcher[/color](self, launcherName):
... ... ...
                [color=Red]elif (sys.platform.startswith('linux')):[/color]
                    os.system("%s %s" % (launcher["application"], launcher["args"]))
... ... ...
[color=red]def _run_rom[/color](self, launcherName, romName):
... ... ...
                [color=Red]elif (sys.platform.startswith('linux')):[/color]
                    os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
... ... ...

short of that you could force the issue with a man-in-the-middle script... ex, my launcher.xml
                <args>zsnes -m -y  -ad alsa</args>
cat ~/.bin/xbmcEMU.sh
# toggle xbmc.FS
curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(199)"

# go
DISPLAY=:0.0 $@

# toggle xbmc.FS
curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(199)"

i originally had action(199) in here, but moved it in-line after the patch was posted, i still used this to delete my joystick-keymap file, refresh the key-bindings --action(203)-- play, then restore the key-maps again. otherwise xbmc continues to process buttons from my joysticks while im in the emu.

Do you mind elaborating on the joystick keymap deletion? I have no idea what to do here, but it seems like i'm having the same problem. My controllers are controlling XBMC in the background.

- zosky - 2010-09-25 07:08

Hi Yall. Check the Wiki WipMonkey is doing some cool stuff

kimp93: thanks, Korean is now in the google-svn (r33)
smithr99: i noticed that too and proposed the same (the one alexpigment just qouted)
the fix is now in the google-svn (r42)

i've asked the xbmc crew to sync up,
so ya'll should see these update in the repo soon

alexpigment: the joystick thing was a serious pain to sort out!!!
  1. first localize the keymap file for your joystick, ie move it your home dir
    (from: /usr/share/xbmc/system/keymaps/[your joystick].xml)
    (to: ~/.xbmc/userdata/keymaps/[your joystick].xml)
  2. make a backup (it can be in the same dir, just not with the .xml extension)
  3. setup your launchers with the man-in-the-middle script like i mentioned before
  4. and this is what the script looks like
    # remove keymap
      rm /home/xbmc/.xbmc/userdata/keymaps/joystick.Logitech.RumblePad.2.xml
    # reload xbmc's key bindings
      wget -qO /dev/null  "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(203)"
    # run EMU
    # restor key-map file & refresh key bindings
      cp /home/xbmc/.xbmc/userdata/keymaps/joystick.Logitech.RumblePad.2.xml~ \
      wget -qO /dev/null  "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(203)"
  5. make the script executable "chmod u+x [script]"
  6. make sure the http api is enabled in xbmc
    so it can receive "action(203)" from the script
    • thats how i have it working, but i should mention its not dharma tested yet. (hopefully ill get a chance to do that this weekend)

- malte - 2010-09-25 10:38

Hi all,

great to see that you continue the work on Launcher for Dharma.

Some of you may have noticed that I am working on the script Rom Collection Browser in the last months. As Launcher and RCB have different approaches on browsing and displaying games they do nearly the same when it comes to launching games. So I would like to ask if you are interested in sharing knowledge and experience on launching games from XBMC.

One thing would be the coding side. There are some things that RCB does what (AFAIK) Launcher misses (support for multiple rom files or creating xbox cut-files for example) and a lot of things that I have already learned from Launcher (all this executehttpapi-things and many others) and will learn in future. I am not talking about the same code base (because I think it is not practical) but maybe you could have a look on what I am doing while launching games, take some ideas or code pieces and I will do it vice versa. And of course we could give each other hints if we see do's and dont's.

If you are interested, you find my launching code here (atm starting on line 129). Or have a look at the applaunch.bat or applaunch.sh here. Applaunch.sh was enhanced by some RCB users to work on Mac and Linux.

Second thing is all basic configuration that has to be done to get emulators and XBMC working together. The Emus in Live thread is a good place to start and there are a lot of useful tips here in this thread or over in the RCB thread. I always thought about adding this topic to my Wiki and I am sure you will do the same on the Launcher Wiki. So why not create one site together in the XBMC Wiki and bundle experiences from both user groups? Besides some difference on the script specific configuation all users will have the same problems in both (or further) scripts.

What do you think?


- Booza - 2010-09-25 19:41

matejdro Wrote:I have a problem. When i want to add application to launch, it shows me only my CD drive. Is there any way to add other drives to that list?

Did you manage to resolve this? I have the same issue and I'm unable to see my hard disk which my emulators are on.

First time Launcher user, I'm using the latest Launcher and the Dharma Beta 2.

First post to so if i should be using the google code page please let me know.


- matejdro - 2010-09-25 23:21

Nope. And nobody seems to care about that.

- studmeister - 2010-09-26 01:38

i had the exact same problem. i discovered it was down to an image i had mounted with magiciso, so i unmounted the image and i could then see my HDs.

hope this helps.

- Booza - 2010-09-26 04:09

Cheers studmeister, worked a treat!

Weird how launcher can't seen hard drives just because there is a DVD in the drive or an image mounted. Ripping a disc now so can't tinker.

Pleased that the project has some Dharma development though - keep up the good work guys!

- danz0l - 2010-09-26 11:14

Does search work for others on the dharma plugin ?

- DARKGuy2008 - 2010-09-26 19:14


I've been a long-term Launcher user, and I'm really glad to know that it's still in development! Big Grin

If anybody's interested, I made a mod to it to add FanArt so you can like, post a full-screen wallpaper/screenshot of the game in fanart/thumbnail view which fades and all like movies and tv shows.

Reply here or ask through PM and I'll send the code Big Grin. I want this feature added as a core, and by the people who know a lot of plugin development. I made this mod in about 4 hours with no python knowledge Tongue but it works XD.

- danz0l - 2010-09-26 19:22

DarkGuy2008 why not post it here ?

- DARKGuy2008 - 2010-09-26 21:29

I would, but it'd be a shame if there's no interest in having that feature added :/