Kodi Community Forum

Full Version: [RELEASE] Steam Launcher - Start Steam Big Picture Mode from within Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ill test again tonight with steam closed.

I usually run steam in offline mode on my HTPC so that it doesn't interfere with the online steam running on my main rig.
New version, changes:

Code:
0.1.3
Additions to Windows scripting: Xbmc will stay closed if Steam updates itself, it will wait for up to 5 seconds for Steam to restart. If steam is already open Xbmc will exit and Steam will switch to big picture mode.

0.1.4
Moved scripts into new directory.

0.1.5
Windows command windows now hidden.
EDIT this guide has been superseded by the xbmcbuntu 13 guide

I've had a play with the addon and XBMCbuntu. It will not work in the XBMC session as Steam BPM needs a windows manager to run properly, plus the addon kills xbmc which causes the session to restart - it needs to be run from a desktop session, either XBMCbuntu or Openbox, both of which are included in XBMCbuntu. You can try running Steam BPM in the XBMC session via SSH to see for yourself the problems it has with the following command:

Code:
DISPLAY=:0 steam -bigpicture

Quitting XBMC and logging into either desktop session will set that one as a default and will be the one that is booted into if auto-login is enabled. A quick guide to set up with Openbox:

Log in to the Openbox session and right click on the desktop and open a terminal or alternatively log in via SSH.

If Steam isn't installed install it:

Code:
sudo apt-get install jockey-common
wget http://media.steampowered.com/client/installer/steam.deb
sudo dpkg -i steam.deb


Set the background to black and XBMC to auto start:

Code:
echo "xsetroot -solid black &" >> $HOME/.config/openbox/autostart.sh && echo "/usr/bin/xbmc &" >> $HOME/.config/openbox/autostart.sh && chmod +x $HOME/.config/openbox/autostart.sh


For a better Openbox right click menu that contains entries for Steam, XBMC and others:

Code:
sudo apt-get install menu
nano ~/.config/openbox/menu.xml
And paste in the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://openbox.org/
                file:///usr/share/openbox/menu.xsd">

<menu id="root-menu" label="Openbox 3">
  <item label="Terminal">
    <action name="Execute"><execute>x-terminal-emulator</execute></action>
  </item>
  <item label="Chromium">
    <action name="Execute"><execute>chromium-browser</execute></action>
  </item>
  <item label="PCManFM">
    <action name="Execute"><execute>pcmanfm</execute></action>
  </item>
<item label="XBMC">
    <action name="Execute"><execute>xbmc</execute></action>
  </item>
  <item label="Steam">
    <action name="Execute"><execute>steam</execute></action>
  </item>
  <item label="Steam BPM">
    <action name="Execute"><execute>steam -bigpicture</execute></action>
  </item>
  <!-- This requires the presence of the 'menu' package to work -->
  <menu id="/Debian" />
  <separator />
<item label="Reboot">
    <action name="Execute">
        <prompt>
            Are you sure you want to reboot?
        </prompt>
        <execute>
           gksudo -u root "shutdown -r now"
        </execute>                                                                                                                                              
    </action>                                                                                                                                                  
</item>                                                                                                                                                        
                                                                                                                                                                
<item label="Shutdown">                                                                                                                                        
    <action name="Execute">                                                                                                                                    
        <prompt>                                                                                                                                                
            Are you sure you want to shutdown?                                                                                                                  
        </prompt>                                                                                                                                              
        <execute>                                                                                                                                              
            gksudo -u root "shutdown -h now"                                                                                                                    
        </execute>                                                                                                                                              
    </action>
</item>

  <item label="Log Out">
    <action name="Execute">
      <prompt>Are you sure you want to log-out?</prompt>
        <execute>kill -9 -1</execute>
    </action>
  </item>
</menu>

</openbox_menu>
'Ctrl + x' to exit


To return to the XBMCbuntu login screen right click on the desktop and select Log Out, or via SSH/terminal:

Code:
kill -9 -1

Reboot to check that it all works and make the changes take effect.

For something more advanced have a look here.
New version in OP, changes:

Code:
0.1.6
Reworked Linux scripting - If steam is already open Xbmc will exit and Steam will switch to big picture mode.
Reorganised files.

0.1.7
Small fix

0.1.8
Linux now uses a lockfile to prevent multiple instances of xbmc reopening if Steam has been exited to desktop and xbmc re-opened.

0.1.9
New windows scripting
New version:

Code:
0.2.0
Windows checks whether its 32 or 64 bit.
New icon.
Hey! This is great!

Has anyone installed this on OpenElec? I don't see how I could install this and Steam on an OpenElec HTPC...
(2013-08-24, 15:19)NorDemoniac Wrote: [ -> ]Hey! This is great!

Has anyone installed this on OpenElec? I don't see how I could install this and Steam on an OpenElec HTPC...

This addon its self would work with OE with some minor alterations, but getting steam to run is the problem (and xboxdrv as opposed to xpad for full 360 controller support). I tried to get steam to run in OE but didn't get far into installing its dependencies and haven't tried again since. You could try dual booting (I use OE and dual boot with win 7 - windows for gaming and openelec for everything else) or using a fuller linux distro.
Man, that sucks!
I did have Win7 on earlier, but on my E45M1-I deluxe it is so much better with OE. Starts in like 5 seconds, and is way more stable than Win7 + XBMC.

I thought I could have steam on it as well to run old GTA-games or maybe some simple indies, but for me Win7 or an extra Linux install is not an option.

Hopefully there will be a possibility in the future to actually get Steam running on OE, without breaking the OE install to much (don't want to do all kinds of hacking to update OE).

Please let me know if you give it a second shot. OE + Steam would possibly be one of the greatest solutions for HTPC + light gaming.
I have steam installed in a non-stanhdard location (D:\Steam). Will this addon work with it?
Also, I have steam set to run in offline mode. Will that cause problems?
(2013-08-29, 18:30)MeMeMe Wrote: [ -> ]I have steam installed in a non-stanhdard location (D:\Steam). Will this addon work with it?
Also, I have steam set to run in offline mode. Will that cause problems?

Yep it will work, though you need to edit steam-launch.bat to point to your install location.
Not sure about offline mode - I have never used it, although I don't see why not. Where do you set steam to offline mode? Art worst you may need to add a additional switch in steam-launch.bat. Please let me know how it works out.

Out of curiosity, is steam installed on d drive because you're using a ssd? Using junction links you can install steam on the ssd and keep your games on the HDD - steam starts up a lot quicker this way and won't burn through precious ssd space.
I am using an SSD yes, but I have used a dedicated games drive for years, since before getting an SSD. I just like having it separated. It is easy to transfer from one computer to another, or after reinstalling windows, then just run steam.exe and it updates itself, and recognises the games. No need to go through long installs for games.

Offline mode: when steam is running (not big picture mode), you can go to one of the menus and select "go offline". Once you do that, until you go back online, whenever steam starts, it presents a dialog asking asking if you want to go online or stay offline, before loading steam.

I just testing big picture mode, and it bypasses that dialog, so things should be okay.
Hello! I need a little assistance in getting this to work as I have non default install locations for both Steam and XBMC.

I have tried editing steam-launch.bat with no success so far. Confused

What exactly should I be changing in this file and to what (which lines ect).

My steam is installed at E:\Games\Steam and XBMC at D:\Apps\XBMC

Any assistance would be greatly appreciated!
Thanks for the feedback.

My bad guys, the code i recently added to distinguish between win 32 + 64bit makes its difficult to change paths for steam and xbmc. Confused

I'll fix it up, but if you want you can change the program files environment variables in steam-launch.bat to the locations you need.
Quote:Hopefully there will be a possibility in the future to actually get Steam running on OE, without breaking the OE install to much (don't want to do all kinds of hacking to update OE).

Please let me know if you give it a second shot. OE + Steam would possibly be one of the greatest solutions for HTPC + light gaming.

+1 I totally agree, that would be awesome! I hope someone can figure out how to get it to work, I would be most grateful.Nod
GGuys can you try this, I dont have time to make a new version (I think Ill add a few more changes). Replace the whole steam-launch.bat with the following and edit lines 3 + 4, from the equals sign onwards (eg: set STEAMLaunchCmd="D:\games\steam\steam.exe"

Code:
@echo off

set XBMCLaunchCmd=%PRGMFiles%"\XBMC\XBMC.exe"
set STEAMLaunchCmd=%PRGMFiles%"\Steam\steam.exe"

echo Check for 64bit or 32bit Windows

IF EXIST "%PROGRAMFILES(X86)%" (
echo Running 64-bit Windows
set PRGMFiles="C:\Program Files (x86)"
) || (
echo Running 32-bit Windows
set PRGMFiles="C:\Program Files"
)

echo Launch Steam BP differently depending wether its already open
tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running, toggle big picture mode
cscript //B //Nologo "%appdata%/XBMC/addons/script.steam.launcher/resources/LaunchXBMC.vbs" %STEAMLaunchCmd% steam://open/bigpicture
) || (
echo Steam is not running, launch in big picture mode
cscript //B //Nologo "%appdata%/XBMC/addons/script.steam.launcher/resources/LaunchXBMC.vbs" %STEAMLaunchCmd% -bigpicture
)

:killxbmc

echo Kill XBMC
taskkill /f /IM xbmc.exe>nul 2>nul

:steamopenloop

echo Loop while steam open
tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running, loop
timeout 1
goto steamopenloop
) || (
echo Steam is not running, launch XBMC
cscript //B //Nologo "%appdata%/XBMC/addons/script.steam.launcher/resources/LaunchXBMC.vbs" %XBMCLaunchCmd%
)

echo Check for 5 seconds to see if Steam has been restarted after an update - this figure can probably be lowered
tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running again after 1 second
goto killxbmc
) || (
echo Steam is not running, wait one second, try again.. 1
timeout 1
)

tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running again after 2 seconds
goto killxbmc
) || (
echo Steam is not running, wait one second, try again.. 2
timeout 1
)

tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running again after 3 seconds
goto killxbmc
) || (
echo Steam is not running, wait one second, try again.. 3
timeout 1
)

tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running again after 4 seconds
goto killxbmc
) || (
echo Steam is not running, wait one second, try again.. 4
timeout 1
)

tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running again after 5 seconds, that was close...
goto killxbmc
) || (
echo Steam is not running, wait one second, try again.. 5
timeout 1
)

tasklist /nh /fi "imagename eq steam.exe" | find /i "steam.exe" >nul && (
echo Steam is running
goto killxbmc
) || (
echo Steam is not running after 5 seconds, user must have quit
echo Script is exiting
)

@Megatron @NorDemoniac Check out RetroAcrch for OE, pairing that with RomCollectionBrowser or Advanced Launcher should fix your gaming itch, including GTA on psx Big Grin

http://openelec.tv/forum/128-addons/6497...32-64-bits