v1.1.1
Quote:Added fix from 1.0.5 to OSX portion of steam-launch.sh
In linux section of steam-launch.sh the 3rd argument is passed to the pre-steam script. This is for my linux system.
Preliminary SteamOS support. The addon assumes you are running xbmc in the desktop session and when run switches to the steam session (same as the desktop icon). Only option available with SteamOS is 'Quit XBMC' (not quitting XBMC when using the gnome desktop causes problems with Steam on my test system).
For SteamOS users: You can install XBMC 13 from
here. By simply adding XBMC to Steam it will run as the steam user and from what I've read it can cause problems, so to avoid this you can use two other methods to launch XBMC - Launch XBMC in its own session (replaces the Desktop session) or launching XBMC in the Gnome desktop session. If you want to launch external programs from XBMC (such as emulators, web browsers etc) it's probably best to run xbmc ontop of the Gnome desktop.
* XBMC ontop of Gnome desktop:
Firstly, you need the program
wmctrl installed. Then create a new desktop entry to launch XBMC as the desktop user (there will be two entries for XBMC so you can still run XBMC as the steam user - if you use XBMC as both users you will probably want to symlink/bind mount the two ~/.xbmc directories so you can share user settings/addons/etc..). The new XBMC entry will be called just "XBMC":
/usr/share/applications/xbmc-sl.desktop
Code:
[Desktop Entry]
Version=1.0
Name=XBMC
GenericName=Media Center
Comment=Manage and view your media
Exec=/usr/bin/xbmc-sl.sh
Icon=xbmc
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;
Steam doesnt like desktop entries using commands with prefixes (in this case sudo), so two script files are necessary - one for steam to launch, which in turn launches the second with sudo rights (this is needed as commands are being executed for different users)
/usr/bin/xbmc-sl.sh
Code:
sudo /usr/bin/xbmc-sl2.sh
/usr/bin/xbmc-sl2.sh
Code:
#!/bin/bash
dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToUser string:'desktop' string:''
export DISPLAY=:1
until [[ $(sudo -u desktop wmctrl -l |grep "Desktop$") ]] ; do
sleep 1
done
if [[ $(pidof xbmc.bin) ]] ; then
sudo -u desktop wmctrl -r "XBMC Media Center" -b add,fullscreen &
else
sudo -u desktop xbmc &
fi
Make both script files executable. Now to edit the sudoers file to allow the above to be executed without a password prompt. Run
sudo visudo and add the following to the end:
Code:
%steam ALL = NOPASSWD: /usr/bin/xbmc-sl2.sh
%desktop ALL = NOPASSWD: /usr/bin/xbmc-sl2.sh
Also disable the password prompt when switching to desktop mode:
Code:
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
Now add the new XBMC entry to Steam as a external program.
Done!
* Running XBMC in its own session:
You can run XBMC in its own session by replacing the desktop session (note you will lose easy access to the desktop, and running other programs in the xbmc session, such as browsers or emulators, may have problems). In the
/usr/share/xsessions directory rename
gnome.desktop (i had to rename
gnome-fallback.desktop due to using a VM) to have .bak extensions. Then copy
XBMC.desktop to
gnome.desktop (or
gnome-fallback.desktop if necessary). Some extra steps are necessary to prevent XBMC from automatically restarting:
/usr/share/applications/xbmc-sl.desktop
Code:
[Desktop Entry]
Version=1.0
Name=XBMC
GenericName=Media Center
Comment=Manage and view your media
Exec=/usr/bin/xbmc-sl.sh
Icon=xbmc
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;
/usr/bin/xbmc-sl.sh
Code:
#!/bin/bash
rm -rf /tmp/xbmc.disabled
dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToUser string:'desktop' string:''
/usr/bin/xbmc-sl
Code:
#!/bin/bash
while [[ -f /tmp/xbmc.disabled ]] ; do
sleep 1
done
xbmc $@
/usr/bin/xbmc-pre-steam (you need to point the Steam-Launcher addon to use this as the pre-steam script)
Code:
#!/bin/bash
touch /tmp/xbmc.disabled
copy
/usr/bin/xbmc-standalone to
/usr/bin/xbmc-standalone-sl and edit it and make the XBMC= command look like
Code:
XBMC="${bindir}/xbmc-sl --standalone $@"
Now edit
/usr/share/xsessions/gnome.dektop and change
xbmc-standalone to
xbmc-standalone-sl
Make sure all files created are executable
NOTE: this breaks 'Return to desktop' in steam bpm, so disable 'Access to the linux desktop' in steam's settings.
That does it, enjoy!
I don't use SteamOS a great deal so suggestions are welcome.