[RELEASE] Steam Launcher - Start Steam Big Picture Mode from within XBMC

  Thread Rating:
  • 4 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #1
Steam Launcher
This add-on will close or minimize XBMC, launch Steam in Big Picture Mode and when Steam BPM is exited (either by quitting steam or returning to the desktop) XBMC will restart or maximize. It works with Windows, Linux (SteamOS included), Android and OSX (With OSX xbmc will only restart after quiting steam completely). A nice bonus is Steam also comes with a full featured web browser that can be controlled with a game pad or remote and plays back flash content. XBMCbuntu users see the bottom of this post for a guide to setup Steam. Linux users need the program 'wmctrl' installed.

[Image: screenshot009.png]

[Image: screenshot100.jpg]

[Image: screenshot101.jpg]

Settings:
General:
  • Select whether to quit XBMC: Options are Yes, No and Ask.
  • Set the paths for both XBMC and Steam.
  • Run commands pre/post steam. The addon will wait for the commands to finish before continuing.

Advanced:
  • Delete scripts and update on next run - delete the OS specific scripts out of the profile://addon_data directory and copy them from the addon install directory the next time the addon is run. This is handy if you want to go back to the default scripts or if the bundled scripts have been updated. Only the relevant script file for the operating system in use will be deleted and the setting is turned off (to default) when run once.
  • Configurable timeout for "Busy Dialog" after running addon.
  • Run XBMC in portable mode (as far as I can tell OSX doesn't support portable mode and enabling this will cause XBMC not to restart).
  • Toggle script update notification.
  • Toggle file location checks.

Customisation:
The scripts used by this addon can be customised to suit your needs, they reside in the xbmc/userdata/addon_data/script.steam.launcher/scripts folder. They are copied into that directory from the addon install directory on first run and can be set to not be over written with updates. In either SteamLauncher-AHK.ahk or steam-launch.sh the line steam.launcher.script.revision=001 is what the addon reads to determine if the scripts are up to date, set it to 999 for custom scripts. Script files contain info for editing.

Issues:
If you have a problem with the addon, make sure to include a XBMC log file!

Useful tips:
Steam, Linux and Lirc.
Speeding up Steam and installing on a SSD.
SteamOS + Ubuntu
Steam Launcher with XBMCbuntu 13.
XBMC and SteamOS

Previous version's

DOWNLOAD

For automatic updates you can install my repo. Code can be found on GitHub.

** People upgrading from pre 1.9.X versions need to check the addon settings - due to changes the 'Script update check' and 'Program location check' get disabled. **

** Frodo users - while v2.0.0 works with XBMC12, the method the add-on uses to give on screen error notifications is not compatible. Apart from the pre/post Steam scripts not found notification, every other time there is a error notification the add-on exits anyway. **

If you like this addon you can help support my Steam addiction

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-08-10 02:12 by teeedubb.)
find quote
DJ_Izumi Offline
Fan
Posts: 474
Joined: Jul 2007
Reputation: 3
Post: #2
As Steam Big Picture Mode now has a 'Exit Steam' option which truly shuts down Steam rather than minimizing to tray, is it possible to reconfigure this program to leave XBMC in the background and then switch back to XBMC once Steam is exited? I have Advanced Launcher doing this right now but I'd like to go to Steam directly has I have no interest in launching anything other than Steam and going back to XBMC.
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #3
Yes its possible. Open the zip file and edit default.py and in the second line remove
Quote:taskkill /f /IM XBMC.exe &&
. But launching games and emulators over xbmc has always give me problems - xbmc accepting controller inputs while games are playing, games/emulators having no sound, xbmc not getting focus on game exit and xbmc using a significant amount of cpu. Do you not get this problem?

I would try changing the second line in default.py to this

Quote:os.system('taskkill /f /IM XBMC.exe && timeout 1 && E:\Steam\steam.exe -bigpicture && timeout 1 && C:\path\to\XBMC.exe')
to have xbmc killed, steam launched and when exited xbmc is relaunched.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2013-04-27 00:02 by teeedubb.)
find quote
inque54 Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #4
I tried running your script but for some reason nothing is happening.

I tried to check via task manager and steam doesn't seem to load. I have already also input the path of my steam.exe on deafault.py

I'm using Win 8 64bit also btw

[Image: sig_omgeek.png]
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #5
Does the command within default.py work when run from the command prompt?

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
inque54 Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #6
(2013-05-11 06:39)teeedubb Wrote:  Does the command within default.py work when run from the command prompt?

Oh you mean running it on command prompt? I'm not sure on how to run default.py on cmd, it's just giving me message that it couldn't run

I might be doing something wrong though? Apologies on being such a noob!

[Image: sig_omgeek.png]
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #7
Yeah, open xbmc, un-fullscreen xbmc with the / button and press the windows button, then type cmd, enter.
Now use your version of commands contained in default.py inside os.system(' '), for example, if I wanted to test it from the command prompt i would type in

Code:
taskkill /f /IM XBMC.exe && timeout 1 && E:\Steam\steam.exe -bigpicture

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
DJ_Izumi Offline
Fan
Posts: 474
Joined: Jul 2007
Reputation: 3
Post: #8
(2013-04-26 23:55)teeedubb Wrote:  Yes its possible. Open the zip file and edit default.py and in the second line remove
Quote:taskkill /f /IM XBMC.exe &&
. But launching games and emulators over xbmc has always give me problems - xbmc accepting controller inputs while games are playing, games/emulators having no sound, xbmc not getting focus on game exit and xbmc using a significant amount of cpu. Do you not get this problem?

I would try changing the second line in default.py to this

Quote:os.system('taskkill /f /IM XBMC.exe && timeout 1 && E:\Steam\steam.exe -bigpicture && timeout 1 && C:\path\to\XBMC.exe')
to have xbmc killed, steam launched and when exited xbmc is relaunched.

Keeping XBMC in the background doesn't seem to make any noticeable influence on game playback on my machine, A8-3870k with 16GB RAM. I run XBMC in true full screen so it minimizes to the background. I stripped your script down a lot however, I was already using a batch file with nircmd to have Windows do a force focus back to XBMC when Steam closes. I actually just cut your script down to do nothing but execute that batch file. I found one hangup that you may want to specify in your first post however: You don't JUST need to write in the location of Steam in default.py, you ALSO need to do it with 8.3 file name conventions.

c:\program files (x86)\steam\steam.exe is no good for example, it has to be c:\progra~2\steam\steam.exe or else your script only tries to execute 'c:\program' and stops there. Once I figured this out and figured out the 8.3 conventions, it worked fine. I imagine you didn't notice this yourself because your steam location uses folders/filenames with only 8 characters and no spaces.
(This post was last modified: 2013-05-11 19:56 by DJ_Izumi.)
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #9
Thanks for pointing that out. Since the first post I changed my setup so steam was on the ssd with the game data on a hdd and ran into the same problem, but got around it by putting quotes around the command. So now the command within default.py looks like

Quote:os.system('taskkill /f /IM XBMC.exe && timeout 1 && "C:\Program Files (x86)\Steam\steam.exe" -bigpicture')

Ill update the first post with this info.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
inque54 Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #10
I was able to run the script on command line and it ran Steam!

But when I tried to launch it via XBMC, nothing happens, apart from quitting XBMC.

Edit: Might as well paste my 2nd line of default.py

Code:
os.system('taskkill /f /IM XBMC.exe && timeout 1 && "C:\Program Files (x86)\Steam\steam.exe" -bigpicture')

[Image: sig_omgeek.png]
(This post was last modified: 2013-05-12 05:10 by inque54.)
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #11
Does

"C:\Program Files (x86)\Steam\steam.exe" -bigpicture

Launch steam from the command prompt?

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
inque54 Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #12
(2013-05-12 05:48)teeedubb Wrote:  Does

"C:\Program Files (x86)\Steam\steam.exe" -bigpicture

Launch steam from the command prompt?

Yes it does

[Image: sig_omgeek.png]
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #13
(2013-05-12 06:29)inque54 Wrote:  
(2013-05-12 05:48)teeedubb Wrote:  Does

"C:\Program Files (x86)\Steam\steam.exe" -bigpicture

Launch steam from the command prompt?

Yes it does

Hmmm strange - the individual parts of the command work... there are no error messages printed on screen? the only thing I can think of right now is that the timeout command is no t used in win8. I've only used this with win7, I will setup steam on my win8 laptop and test it out.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
inque54 Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #14
Okay thanks for taking the trouble!

Edit:
No errors found also btw. It just closes XBMC and doesn't do anything afterwards

[Image: sig_omgeek.png]
(This post was last modified: 2013-05-12 09:09 by inque54.)
find quote
teeedubb Offline
Donor
Posts: 2,524
Joined: Mar 2010
Reputation: 61
Location: Down Under
Post: #15
I copy and pasted your command from above

taskkill /f /IM XBMC.exe && timeout 1 && "C:\Program Files (x86)\Steam\steam.exe" -bigpicture

and it works as should when run from a command prompt.. and I saw that System Shock 2 is on sale..very tempting...

Not really sure why it isnt running.. Id be looking at why steam isnt running from the command line or for another way to run steam.

Also you dont have steam already open (even the tray icon) when running the command do you?

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
Post Reply