• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 89
[RELEASE] Steam Launcher - Start Steam Big Picture Mode from within Kodi
#16
Ah actually just to clarify everything runs fine when I do the commands on command line. It just doesn't work when I try to run the script via xbmc

And yes, I make sure Steam is closed while trying it out
Reply
#17
Ah ok, I misread your post. Ok I think I know what the problem is. If the addon is uninstalled and a version with a updated default.py is reinstalled xbmc installs a cached .zip of the addon, so any changes to default.py are not updated. Im pretty sure this is due to the version number not being increased.

This command will delete the cached .zip and allow a .zip with a modified default.py to be installed

Quote:del %appdata%\XBMC\addons\packages\script.SteamLauncher-0.0.6.zip

Or you can simply edit the default.py that has already been installed by pasting the following into the windows explorer address bar

Quote: %appdata%\XBMC\addons\script.SteamLauncher\default.py
Reply
#18
That did the trick! Steam is able to run now via XBMC

Although I ran into another roadblock, I wanted to do what you described in your 3rd post (when exiting Steam, XBMC will relaunch), but for some reason it's giving me an error message: "Unable to create application. Exiting"

For reference this is the 2nd line of default.py

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

Sorry to be a pain in the ass on this!
Reply
#19
Thanks to JohnnyD2's VB scripts there is a new version which restarts xbmc when steam is closed in the first post (and as a huge bonus JohnnyD2's method works great for launching emulators via RCB or standalone PC titles via AdvancedLauncher). A few things have changed so its best to probably uninstall any old versions and reinstall.
Reply
#20
So just to clarify, I should just install this addon to be able to use the scripts described in the post?
Reply
#21
Yeah all is contained in the add on. The VB scripts are located in resources/scripts in the add on directory.
Reply
#22
Okay! Will give it a try later tonight

Thanks a lot!
Reply
#23
Hi there,
I'm not sure at all what is wrong with my settings but the new script doesn't seem to fully work for me. When i run the Launcher in XBMC it properly closes it and launches Steam in Big Picture Mode but doesn't seem to reopen XBMC when Steam is shut down. Would appreciate it if someone could help me.
Reply
#24
Linux or windows?

And are there any errors in screen?
Reply
#25
Oh sorry I forgot:
Windows 7 x64 and no errors at all just doesn't restart XBMC after Steam was closed (exit Steam is the right option or am I wrong?)
Reply
#26
Just want to say thanks for making this script! Works great for me. I was going to try and make a similar script myself (In fact. Pretty much the same. Wanted a batch to listen for steam and close XBMC and upon seeing steam closed, reload XBMC and end the batch file), but my coding skills are pretty much non existent, so doing it myself would have taken a lot of time and research.
Reply
#27
(2013-05-16, 14:13)K3v1 Wrote: Oh sorry I forgot:
Windows 7 x64 and no errors at all just doesn't restart XBMC after Steam was closed (exit Steam is the right option or am I wrong?)

Hmmm... Do you have xbmc installed in a non- standard directory? What happens if you run

Code:
"C:\Program Files (x86)\XBMC\XBMC.exe"

from a command prompt? And yeah exit steam is the right option, return to desktop will switch steam to a tray icon and xbmc will not run.

(2013-05-16, 16:53)ultratails42 Wrote: Just want to say thanks for making this script! Works great for me. I was going to try and make a similar script myself (In fact. Pretty much the same. Wanted a batch to listen for steam and close XBMC and upon seeing steam closed, reload XBMC and end the batch file), but my coding skills are pretty much non existent, so doing it myself would have taken a lot of time and research.

Youre welcome. Out of curiosity, which windows are you using?
Reply
#28
(2013-05-16, 23:37)teeedubb Wrote:
(2013-05-16, 14:13)K3v1 Wrote: Oh sorry I forgot:
Windows 7 x64 and no errors at all just doesn't restart XBMC after Steam was closed (exit Steam is the right option or am I wrong?)

Hmmm... Do you have xbmc installed in a non- standard directory? What happens if you run

Code:
"C:\Program Files (x86)\XBMC\XBMC.exe"

from a command prompt? And yeah exit steam is the right option, return to desktop will switch steam to a tray icon and xbmc will not run.

(2013-05-16, 16:53)ultratails42 Wrote: Just want to say thanks for making this script! Works great for me. I was going to try and make a similar script myself (In fact. Pretty much the same. Wanted a batch to listen for steam and close XBMC and upon seeing steam closed, reload XBMC and end the batch file), but my coding skills are pretty much non existent, so doing it myself would have taken a lot of time and research.

Youre welcome. Out of curiosity, which windows are you using?

I have both in standard directories

Edit: Oh it works now nevermind. Don't really know what changed but I'm glad anyways. Thanks for this great Addon!
Reply
#29
Ok so I figured out how to set up the Linux version to re-open XBMC once Steam has closed, using the program Cuttlefish. In addition, I need my XBMC to run with root privilages, due to some other programs I have synched up to it. This causes problems with Steam because, smartly, they don't allow Steam to be run with root privilages. Unfortunatly there is no easy way to turn that feature off. As a result I configured Steam Launcher to launch Steam from a non-elevated user id. I'll admit it is a little janky, but it gets the job done splendidly for me. Figuring this might be helpful to someone else, I will (as best I can) list the steps needed to relaunch XBMC once Steam closes, and seperately list the steps I took to launch XBMC in root (without password prompt!) and Steam not in root.

HOW TO LAUNCH XBMC AFTER STEAM CLOSES IN LINUX

Note: This was performed in Lubuntu and assumes you have a graphical interface

1.
Code:
sudo apt-get install cuddlefish

2. Open cuddlefish

3. Click New

4. Name it something recognizable IE. Steam to XBMC

5. Turn off notification

6. Click Stimulus > Set Application Stops > Set application to Steam

7. Go to the reaction tab

8. Click plus sign at bottom

9. Choose Start Application > Choose XBMC

10. DONE! Test it out! Depending on your situation you will probably want to add Cuttlefish to the list of programs opened in startup.

How to start Steam from a root-privilaged XBMC, with Steam Launcher. Then restart root-privilaged XBMC in Cuttlefish

Note: Running XBMC in root is probably frowned upon, and certainly a potential security risk. Only do this if you are sure of what you are doing! Also make sure you change the username and paths in the instructions to your own username and file paths, obviously.

1. Edit default.py in
Code:
~/.xbmc/addons/script.SteamLauncher/default.py

2. Change the third line to:
Code:
os.system('killall -9 xbmc.bin && sudo -u username steam -bigpicture')

3. Change username to a username on the computer (IE. whatever username you normally log in to)

4. Create a new document called xbmcroot

5. Put this in the document:
Code:
#!/bin/bash
xbmc

6. Save, then right click the doc > properties > permissions > Allow executing (you may need to change the owner to root with chown)

4. Create a new document called xbmcrootcuttlefish

5. Put this in the document:
Code:
#!/bin/bash
sudo /absolute/path/to/xbmcroot

6. Save, then right click the doc > properties > permissions > Allow executing

7. Set up Cuttlefish as in above tutorial BUT use Start Program Advanced in the reaction tab.

8. For the executable, choose xbmcrootcuttlefish

9. Open a terminal and type:
Code:
sudo visudo

10. Add these lines to the end of your sudoers file:
Code:
#custom xbmc
username ALL = NOPASSWD: /absolute/path/to/xbmcroot

11. Save and exit. All done!

If everything worked you should be able to use root XBMC to open non-root Steam, then re-open root XBMC using Cuttlefish when Steam exits. All without inputing a password, desirable for a seamless transition.

Obviously, to reiterate: This is potentially dangerous, from a security angle as well as by allowing you to muck around in root for probably too long. Also these instructions are as best as I could type them. I am not too great at giving instructions but I tried to keep it simple. At worst they will at least point people in the right direction.

Also... I am hardly an adept at coding and had to figure most of this out myself... so expect it to be janky and probably inefficient. But it works perfectly for me, and hopefully this will be usefull to someone else out there!
Reply
#30
Thanks for the info about cuttlefish, looks to have similar functionality to u dev and eventghost. Another way of doing things is always welcome and Im guessing cutlefish would work without root privileges. I have gotten xbmc to restart in linux using another script found in malte's excellent addon, Rom Collection Browser. Works well so far apart from xbmc throwing a pop up error saying 'Remote communication server - failed to start'. I havent had time to look into it but here it is before I update the first post.

See first post.

The script file needs to be made executable. The following will do this

Code:
chmod +x $HOME/.xbmc/addons/script.SteamLauncher/resources/scripts/applaunch.sh
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 89

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Steam Launcher - Start Steam Big Picture Mode from within Kodi7