Linux killall -CONT (suspend/resume xbmc)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
wellspokenman Offline
Senior Member
Posts: 107
Joined: Jul 2012
Reputation: 1
Post: #1
Like many others I use Adv Launcher to play roms, and I also use RCB. After (finally) getting my ps3 controller to connect I found two problems: 1) while in the rom the ps3 controller will still trigger commands back in xbmc, and 2) the ps3 controller is only usable in the xbmc menu if I connect it before xbmc launches - which is obviously impractical in an auto-login xbmcbuntu environment.

(as an aside, 1) and 2) would both be fixed by using qtsixa to set the controller as an input device rather than a joystick - but I don't know if it will work as both. The qtsixa gui warns against having them as both, but I can just edit the /var/lib/sixad/profiles and setup a sixaxis controller to be all keyboard presses while also enabling both of the joysticks - anyone with experience at this is also welcome to chime in.)

The work around recommended for 1) is to suspend/resume xbmc with an intermediate script that is given to RCB/Adv Launcher in place of your emulator:

Code:
#!/bin/bash
killall -STOP xbmc.bin
/usr/bin/zsnes -s -m -v 22 "$1"
killall -CONT xbmc.bin

But it doesn't work - it launches the rom just dandy but after quitting zsnes (with a sixaxis button bound to Esc) xbmc is just sitting there like a quadriplegic after a house fire.

Ideas anyone?
find quote
wellspokenman Offline
Senior Member
Posts: 107
Joined: Jul 2012
Reputation: 1
Post: #2
nevermind - just spent hours hard coding the qtsixa profiles to keyboard codes, then passing that on to mednafen, zsnes and mupen. This works around the issue, but it was something I didn't want to take on because the key codes used by qtsixa are weird. Anyone, done now so this thread can be closed.
find quote
wellspokenman Offline
Senior Member
Posts: 107
Joined: Jul 2012
Reputation: 1
Post: #3
Found out why it didn't work, now I'm going share that information in the hope the it helps someone. So far, by the way, since asking for help with this xbmcbuntu stuff, I've asked two questions and wound up fixing them both myself. In the process I've actually wound up solving several problems for other users. Would that such benevolence were bidirectional.

The script suggested above came from another thread but it cannot work - killall doesn't have a STOP feature. That's something that only kill has. But killl, as we all probably know by now, want's pids not words. Here's a simple solution using xargs to take the stdin and give it to kill:

#!/bin/bash
pgrep -f xbmc.bin | xargs kill -STOP
/usr/bin/zsnes -s -m -v 22 "$1"
pgrep -f xbmc.bin | xargs kill -CONT
(This post was last modified: 2012-08-04 13:53 by wellspokenman.)
find quote
leepenny Offline
Fan
Posts: 524
Joined: Jul 2010
Reputation: 17
Post: #4
I thank you
find quote