xboxdrv in xbmcbuntu help
#1
Does anyone know of a way to use xboxdrv to control xbmc, but also control external apps launched using advanced launcher? I followed these instructions at http://forum.xbmc.org/showthread.php?tid=98824 and got the controller working in xbmc without any problems, but I can't figure out how to load a new configurations when running external programs. I've got a script set up as:

Code:
#!/bin/bash
killall -STOP xbmc.bin
killall xboxdrv

xboxdrv -c limbo.xboxdrv
/opt/limbo/bin/wine --bottle default --workdir 'C:\\Program Files\\limbo' --wait-children --cx-app limbo.exe
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv
killall -CONT xbmc.bin

The config file I have set up works fine if I load it from the xbmcbuntu desktop and then run the program, but it doesn't seem to load when I run the script. The program loads, without any problems, but the controller doesn't work. When I exit the program, the controller still controls XBMC without any problems. Any ideas?
Reply
#2
(2012-06-25, 15:30)doccosgrove Wrote: Does anyone know of a way to use xboxdrv to control xbmc, but also control external apps launched using advanced launcher? I followed these instructions at http://forum.xbmc.org/showthread.php?tid=98824 and got the controller working in xbmc without any problems, but I can't figure out how to load a new configurations when running external programs. I've got a script set up as:

Code:
#!/bin/bash
killall -STOP xbmc.bin
killall xboxdrv

xboxdrv -c limbo.xboxdrv
/opt/limbo/bin/wine --bottle default --workdir 'C:\\Program Files\\limbo' --wait-children --cx-app limbo.exe
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv
killall -CONT xbmc.bin

The config file I have set up works fine if I load it from the xbmcbuntu desktop and then run the program, but it doesn't seem to load when I run the script. The program loads, without any problems, but the controller doesn't work. When I exit the program, the controller still controls XBMC without any problems. Any ideas?

Code:
xboxdrv -c limbo.xboxdrv

Maybe you need to indicate de complete path for limbo.xboxdrv ??
Reply
#3
Good idea, but that didn't help. I tested it again from the desktop, and I have to use sudo to stop xboxdrv and to start it with the new config (though not with the xbmc config file I load in local.rc). Could that be the issue? I have to map buttons to the keyboard keys (aka XK_Left, etc.), if that makes any difference. Is there a way to not have to use sudo for those commands?
Reply
#4
I have found this :

Quote:Create a uinput group and add users to it as appropriate. Anyone who wants to run xboxdrv needs to be part of this group.
Code:
groupadd uinput
gpasswd -a username uinput

Does the user who start XBMC is member of the uinput group?
Reply
#5
Sorry, I've been away. The user is a member of the uinput group. It doesn't seem to help. I'm able to start xboxdrv without any problem on startup. I just can't seem to kill the process from within the script in order to start a new process with the new config file. If I ssh into the box and run 'sudo kill xboxdrv', then 'sudo xboxdrv -c limbo.xboxdrv' it loads the config just fine. It just won't load it from the script or without sudo, and it seems I'm not linux savy enough to figure out how to make that work. I feel like I'm missing something basic, but I don't know what.
Reply
#6
Because xboxdrv is started with root access, you also need root access to close it and restart it. You could try to edit the /etc/sudoers file (but read documentation before) to give to your XBMC user the root right on the xboxdrv service.

There is also this :
Quote:UINPUT ISSUES
On Ubuntu 9.04 the permissions of the uinput device have changed to
0640, meaning only root has access to the device. To change this back
so that users in the group root have access the device and in turn can
run xboxdrv without sudo you have to create a file called
/etc/udev/rules.d/55-permissions-uinput.rules with the content:

KERNEL=="uinput", MODE="0660", GROUP="root"
Reply
#7
That sounds extremely promising. I'll try it as soon as I get home. Thanks Angelscry.
Reply
#8
(2012-07-05, 15:35)doccosgrove Wrote: That sounds extremely promising. I'll try it as soon as I get home. Thanks Angelscry.
Try the second solution before the first one.
Reply
#9
(2012-07-05, 15:35)doccosgrove Wrote: That sounds extremely promising. I'll try it as soon as I get home. Thanks Angelscry.

I too would be very interested in what you find out.

I am running xbmcbuntu with the XBOX1-remote, but want to have the gamepad (XBOX1) avaliable too, for exiting to LXDE and using the gamepad to play around in Google Earth.



Reply
#10
Hi, I have been struggling with this same issue for the past couple of weeks and wanted to say the suggestion regarding creating the 55-permission file has gotten me closer to having xbmc respond like I want.

I do have a few differences in my script file though:

killall -STOP xbmc.bin
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/zsnes.xboxdrv & /usr/bin/zsnes && fg
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv
killall -CONT xbmc.bin


Unfortunately, when I select the rom for zsnes in advanced launcher, the script just launches zsnes into its main menu. Does anyone have a suggestion on getting zsnes to launch into the rom selected? Thanks for the help!

Ps. I am new to both Linux and xbmc so if anything I have stated is not correct, please correct it for me as I am still learning. Thanks
Reply
#11
http://forum.xbmc.org/showthread.php?tid=85724&page=315

Following the instructions posted by Angelscry, I am now able to load zsnes directly into a rom from xbmc and control using an xbox360 wireless controller. GNU/Linux is such an amazing thing.
Reply
#12
(2012-07-16, 20:24)Steve314 Wrote: Hi, I have been struggling with this same issue for the past couple of weeks and wanted to say the suggestion regarding creating the 55-permission file has gotten me closer to having xbmc respond like I want.

I do have a few differences in my script file though:

killall -STOP xbmc.bin
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/zsnes.xboxdrv & /usr/bin/zsnes && fg
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv
killall -CONT xbmc.bin


Unfortunately, when I select the rom for zsnes in advanced launcher, the script just launches zsnes into its main menu. Does anyone have a suggestion on getting zsnes to launch into the rom selected? Thanks for the help!

Ps. I am new to both Linux and xbmc so if anything I have stated is not correct, please correct it for me as I am still learning. Thanks
Under linux, to pass arguments into an .sh script you must use $1 (for the 1st argument), $2 (for the 2nd argument), etc...
So if under Advanced Launcher your SNES launcher arguments are :

Code:
-m -s -v 22 "%rom%"

The simple thing to do is to first change them to :

Code:
"%rom%"

and then modify your script like this :

Code:
killall -STOP xbmc.bin
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/zsnes.xboxdrv & /usr/bin/zsnes -m -s -v 22 "$1" && fg
killall xboxdrv

xboxdrv -c /usr/share/doc/xboxdrv/examples/xbmc.xboxdrv
killall -CONT xbmc.bin

I may works...
(2012-07-16, 20:55)Steve314 Wrote: http://forum.xbmc.org/showthread.php?tid=85724&page=315

Following the instructions posted by Angelscry, I am now able to load zsnes directly into a rom from xbmc and control using an xbox360 wireless controller. GNU/Linux is such an amazing thing.
Oupsss... to late... Blush

Reply
#13
So Steve314, does that mean you're able to control both xbmc and zsnes with the controller, or just zsnes? If you've got them both working, could you please post your script? I'm having no luck with this no matter what I try. I've added killall to my sudoers file so that it doesn't require a password to execute, and I can kill xboxdrv without a problem when I ssh into the box while xbmc is running, but I can't get it to kill xboxdrv from my run script no matter what I try.
Reply

Logout Mark Read Team Forum Stats Members Help
xboxdrv in xbmcbuntu help0