How to launch games from Kodi file browser?
#1
I'm trying to figure out how to directly launch Linux games from Kodi, without going through a launcher add-on.  To be clear - I'm talking about running native Linux games, not ROMs or games through wine or steam or some other intermediary layer.

I know Kodi doesn't have full library, but according to https://kodi.wiki/view/Game_management I can add a source for Games (which I've done), and would expect I could at least browse to it (which I can do) and run files from with in it (which I can't).  I'm not sure what I'm missing, but I'm not really clear on what I even can or can't do with Kodi here, so not sure how to proceed with troubleshooting.

At this point I have the following directory added as a games source:

/home/media/data/games/PC/Kodi
└── Slay the Princess
    └── Slay the Princess.sh

My intention is to essentially have a list of scripts or links in this directory that can be used to launch any installed game.

When I browse to Games in the Estuary UI, the content window only gives me choices to "Enter add-on browser" or "Remove this main menu item".  But if I select Games, it takes me to a file browser where I can add sources.  I added a source for the above directory as mentioned, and when i browse into the source I see the Slay the Princess directory, but when I enter the directory it doesn't list the launcher script.  It only seems to display directories - I created a bunch of dummy files with various extensions to see if I could get it to list anything else, but I get nothing.

I don't understand the behavior at this point.  How do I get Kodi to launch a game from here?

Kodi supports videoextensions and similar in advancedsettings.xml to tell it what file extensions to load, but I see nothing like that for games.

Maybe my methodology is wrong.  I could try installing and running my games directly from that source instead of using launcher scripts, but if it's not displaying any files at all then I don't see how that would make any difference.

or maybe Kodi simply cannot browse and run games at all?  But then why even bother adding support for game sources if all it can do is browse and display only directories?

I'm obviously missing something here.  Would appreciate any pointers.

Note:  I understand I can install something like Advanced Launcher (if that even still works - I don't see it in the v21 repo), but my preference is to do this without an add-on if possible.  My goal is so basic - just browse a list of executables and run one when I hit select - that it seems like this must be possible even with the rudimentary games support built into Kodi.
Reply
#2
Apologies because this isn't obvious, and should probably be documented better somewhere, but in the MyGames file view, Kodi only shows games for extensions of game add-ons it can _see_, either installed locally or in a remote repo.

Seeing how you're on Linux and our PPA is retired, there's no binary add-on repo for linux ATM unless you're on an embedded distro like LibreELEC. You'll have to build add-ons from source. The libretro buildbot repo might also work: https://forum.kodi.tv/showthread.php?tid=345619

If you're trying to launch external emulators through a shell script, then you don't need game add-ons to play directly inside Kodi, but you can't use the MyGames file view. However, that's where launchers like AEL and AKL come in. These are built to launch external emulators.
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#3
Thanks, garbear.  Appreciate you clarifying what's possible.  It'd be really nice to have built in support for launching arbitrary executables of some sort - I've had need to do this many times in the past, either to launch games or a web browser (for dealing with streaming video) or other miscellaneous things, and it's always clunky to have to leave the UI for that.

I'll give Advanced Kodi Launcher another go.  That seems to be the only generic launcher that still seems to be maintained and supports Omega.
Reply
#4
For running a shell script, you'll need to do this from Python. Kodi doesn't have any way to launch arbitrary processes. AKL can definitely do this, but so can many other add-ons. If you want a barebones add-on to launch shell scripts, ChatGPT 4 can create one for you.
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#5
I came across this post in the AKL thread, it's a "quick and dirty launcher" that may work for you: https://github.com/mourogers/plugin.prog...elauncher/
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#6
(2024-06-29, 21:01)nitro322 Wrote: I'm trying to figure out how to directly launch Linux games from Kodi, without going through a launcher add-on.  To be clear - I'm talking about running native Linux games, not ROMs or games through wine or steam or some other intermediary layer.

I know Kodi doesn't have full library, but according to https://kodi.wiki/view/Game_management _iq test I can add a source for Games (which I've done), and would expect I could at least browse to it (which I can do) and run files from with in it (which I can't).  I'm not sure what I'm missing, but I'm not really clear on what I even can or can't do with Kodi here, so not sure how to proceed with troubleshooting.

At this point I have the following directory added as a games source:

/home/media/data/games/PC/Kodi
└── Slay the Princess
    └── Slay the Princess.sh

My intention is to essentially have a list of scripts or links in this directory that can be used to launch any installed game.

When I browse to Games in the Estuary UI, the content window only gives me choices to "Enter add-on browser" or "Remove this main menu item".  But if I select Games, it takes me to a file browser where I can add sources.  I added a source for the above directory as mentioned, and when i browse into the source I see the Slay the Princess directory, but when I enter the directory it doesn't list the launcher script.  It only seems to display directories - I created a bunch of dummy files with various extensions to see if I could get it to list anything else, but I get nothing.

I don't understand the behavior at this point.  How do I get Kodi to launch a game from here?

Kodi supports videoextensions and similar in advancedsettings.xml to tell it what file extensions to load, but I see nothing like that for games.

Maybe my methodology is wrong.  I could try installing and running my games directly from that source instead of using launcher scripts, but if it's not displaying any files at all then I don't see how that would make any difference.

or maybe Kodi simply cannot browse and run games at all?  But then why even bother adding support for game sources if all it can do is browse and display only directories?

I'm obviously missing something here.  Would appreciate any pointers.

Note:  I understand I can install something like Advanced Launcher (if that even still works - I don't see it in the v21 repo), but my preference is to do this without an add-on if possible.  My goal is so basic - just browse a list of executables and run one when I hit select - that it seems like this must be possible even with the rudimentary games support built into Kodi.
Kodi's game support is limited to browsing directories and doesn't execute scripts or executables directly. To launch native Linux games without an add-on, consider creating desktop entries, but using an add-on like Advanced Launcher might be the simplest solution.
Reply

Logout Mark Read Team Forum Stats Members Help
How to launch games from Kodi file browser?0