Kodi Community Forum
[LIVE/LINUX] Package of xboxdrv for Xbox 360 Controller support on XBMC Live - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LIVE/LINUX] Package of xboxdrv for Xbox 360 Controller support on XBMC Live (/showthread.php?tid=57304)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


- smithr99 - 2010-10-09

alexpigment Wrote:When you said that your script appends certain files, are you referring to steps 6b and 7b in my original post? If so, I know how to resolve it for at least 6b. That step was only necessary because my directions assumed you were using the tarball from the original dropbox URL. I think you could instead take the SH file after editing then re(zip?) into a new tarball and host that one instead.
yep, its the xboxdrv_for_XBMC_live.9.04.jaunty.sh that gets appended. The tarball that is hosted on the google code page is now at V2 (not sure if you'd noticed). I edited that SH script and took out the call to the xboxdrv that was in there. My own script now asks you how many controllers you wish to install it for, and then appends this newer xboxdrv_for_XBMC_live.9.04.jaunty.sh accordingly

alexpigment Wrote:With regards to the RC.local file, I'm not sure there's really anything that can be done to avoid adding more lines when running it multiple times, but I guess you could somehow check for the words "xboxdrv_for_XBMC_live.9.04.jaunty.sh" and if it exists, then don't write anything to the file. Keep in mind, I know nothing about coding and have no idea how you would do this.
it was more the ...jaunty.sh file that I had a problem with appending too many times. Essentially if you run the script more than once, it appends the data onto the end of the file, thereby creating repetition in the file.
There is a commented out line that I added into my script that you can un-comment if you wish the script to backup your ...jaunty.sh file, just in case people want to do this.
If the file gets backed up, it wont append the file, it'll just create a new one

If I've got time tomorrow, I may edit the script so it takes this problem away


The other file that gets overwritten is the rc.local file. In order to get the script to do this (if you want it to) you need to run the script using sudo to obtain the correct priviledges.

hopefully this will help people in future with these issues. I know I've gained a load of helpful knowledge from these forums and just wanted to give something back Smile


- smithr99 - 2010-10-10

i've updated the script so it doesn't append the ...jaunty.sh file - all it does now is replicate the file and writes the requested number of xboxdrv calls into it.

All files that are overwritten (rc.local and ...jaunty.sh) are now placed in a BACKUP folder created during the script


- alexpigment - 2010-10-10

sorry for the delayed response (ACL has been taking up most of my time this weekend)

so i downloaded v2 of the script, then ran it per your instructions on the previous page, but the second part gave me the following error:

xbmc@XBMCLive:~$ ./xboxdrv.v2.sh
-bash: ./xboxdrv.v2.sh: /bin/bash^M: bad interpreter: No such file or directory

I verified that the file xboxdrv.v2.sh does exist in that directory, so I'm not sure what's going on there.


- smithr99 - 2010-10-11

alexpigment Wrote:sorry for the delayed response (ACL has been taking up most of my time this weekend)

so i downloaded v2 of the script, then ran it per your instructions on the previous page, but the second part gave me the following error:

xbmc@XBMCLive:~$ ./xboxdrv.v3.sh
-bash: ./xboxdrv.v3.sh: /bin/bash^M: bad interpreter: No such file or directory

I verified that the file xboxdrv.v3.sh does exist in that directory, so I'm not sure what's going on there.

did you chmod +x the xboxdrv.v3.sh file ?


- alexpigment - 2010-10-11

smithr99 Wrote:did you chmod +x the xboxdrv.v2.sh file ?

Yep. Here were my exact steps:

Code:
$ wget http://xboxdrv.googlecode.com/files/xboxdrv.v2.sh
$ sudo chmod +x xboxdrv.v2.sh
$ ./xboxdrv.v2.sh

The first step worked because i had xboxdrv.v2.sh in /home/xbmc/ afterward. The second step seemed to work because it didn't give me any errors. The last step was the only thing that didn't work.


- smithr99 - 2010-10-11

its cos ive edited the bloody file in bloody shitty winblows notepad. i'll sort it tonight


- smithr99 - 2010-10-12

v3 is now up. have just tested this and it works fine on my ubuntu server box - therefore should work fine on XBMC live.
apologies for confusion - damn windows was inserting hidden characters into the file, making it unreadable in linux

one more reason to hate microsoft !

grab the new code here ...
http://code.google.com/p/xboxdrv/downloads/detail?name=xboxdrv.v3.sh&can=2&q=

ps if anyone else wnats to contribute to this script or any other parts of the xboxdrv code, just drop me a line and I can add you onto the google code page


- Flomaster - 2010-10-21

not working for me

Code:
xbmc@XBMCLive:~$ wget http://xboxdrv.googlecode.com/files/xboxdrv.v3.sh
--2010-10-20 19:17:54--  http://xboxdrv.googlecode.com/files/xboxdrv.v3.sh
Resolving xboxdrv.googlecode.com... 74.125.155.82
Connecting to xboxdrv.googlecode.com|74.125.155.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5954 (5.8K) [application/x-shellscript]
Saving to: `xboxdrv.v3.sh'

100%[======================================>] 5,954       3.04K/s   in 7.5s

2010-10-20 19:18:09 (797 B/s) - `xboxdrv.v3.sh' saved [5954/5954]

xbmc@XBMCLive:~$ chmod +x xboxdrv.v3.sh
xbmc@XBMCLive:~$ ./xboxdrv.v3.sh
-bash: ./xboxdrv.v3.sh: /bin/bash^M: bad interpreter: No such file or directory

-=Jason=-


new approach - lcapriotti - 2010-10-21

Someone asked me to draft a script for beta3, and I used an updated PPA I have found on launchpad. Here is the draft script.

Since beta3 you could place the script on ~/.xbmc/live.d (or /etc/xbmc/init.d), chmod +x it, and it will be automatically run with root privileges.

It's totally untested - I don't have the HW - but you may want to have a look at this different approach.


- Flomaster - 2010-10-25

l.capriotti, so I just put your script in that location chmod it, then what? manually run the script? restart xbmc or computer and everything is taken care of for me?

-=Jason=-


- Flomaster - 2010-10-28

do I donwload the script and just

sh scriptname.sh

? ? ? ?

-=Jason=-


- Flomaster - 2010-10-29

I guess I'll just go about it the manual way then and do line by line entry

-=Jason=-


- alexpigment - 2010-10-29

Flomaster Wrote:I guess I'll just go about it the manual way then and do line by line entry

-=Jason=-

I guess he forgot to check back in on this thread Smile Honestly, I sometimes wish I would just learn how to code for XBMC (or in general) so a lot of these stupid things that require so much manual installation and tweaking could just be built in to the software. Fairly soon I'm going to make a full tutorial on taking a fresh ION box and making it an emu/rom center with the xbox 360 controllers with a list of "what hardware you need" (where to get them, total cost), "what software you need" (provide links), and outline every single detail and step as if the reader doesn't know their face from their ass. People need some hand-holding on this stuff. I remember the first time I touched the linux console while trying to use XBMC and had *no idea what I was doing*.


- Flomaster - 2010-10-29

alexpigment Wrote:I guess he forgot to check back in on this thread Smile Honestly, I sometimes wish I would just learn how to code for XBMC (or in general) so a lot of these stupid things that require so much manual installation and tweaking could just be built in to the software. Fairly soon I'm going to make a full tutorial on taking a fresh ION box and making it an emu/rom center with the xbox 360 controllers with a list of "what hardware you need" (where to get them, total cost), "what software you need" (provide links), and outline every single detail and step as if the reader doesn't know their face from their ass. People need some hand-holding on this stuff. I remember the first time I touched the linux console while trying to use XBMC and had *no idea what I was doing*.

Alex I had it working before with Dharma Beta2 and did it line by line, but was intrigued by the script method and figured I could just install that way, but im at the point where I can no longer wait and want to start using my controller, but I still need to setup RCB as well as my emulators.

there is no doubt in my mind about installing, I just wanted to try out the scripts


-=Jason=-


- smithr99 - 2010-10-29

which script were you talking about ?

the one i did you just run using
Code:
$ ./scriptname.sh

you need to chmod it as +x first though to make it executable

Code:
$ sudo chmod +x scriptname.sh