-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use quotes or spaces correctly in /etc/default/xboxdrv #52
Comments
I would expect you'd have to use escape before each whitespace, as in: ...=--device-name="Xbox\ 360\ Wireless\ Receiver\ (XBOX)" I can't test this at the moment - could someone else test it...? |
I believe that's one of the many combinations I tried (including numbered version of the escape code for space, to avoid using a real space after all.) |
what does your uxvars looks like with any of the above lines you tried?
|
I think I might have the solution, and it looks like a systemd whitespace handling issue. I've updated my fork to look like this: I won't be able to test this until this weekend, but if you'd like to try it you can clone my fork and try it: https://github.com/mainmachine/ubuntu_xboxdrv |
I looked up what I could on Systemd variable parsing and already tried exactly that before I submitted the bug report. :( I spent a good few hours going slowly insane trying to find a work around. :( |
hmmm... just read your other issue report - you're on Trusty? IIRC Trusty uses Upstart by default; It'll only use Systemd if you set it to do that - are you actually using Systemd? If not then we should look at the /etc/init/xboxdrv.conf and how those *_OPTIONS are handled there... |
Doh! Of course, you're right. I can't tell you what an idiot I feel for blaming systemd now. ;) In my defence it's because I'm on 15.10 on my main box and on jessie on my Pi (which is systemd too.) From my heart: sorry! :) This Trusty box is "relatively" unhackedaboutwith, so I wouldn't have moved to systemd. So can't be systemd'isms then! Tomorrow in the morning I can reinstall the package on the Trusty box and get the same bug up to continue supplying info. From memory, other than $PAD_OPTIONS, I believe xboxdrv.conf just imports most of the relevant variables and uses them in the xboxdrv command line as just Additionally, again from memory, for it to make a change to the device name, I think the --device-name option actually needs to be in the $CONTROLLER#_OPTIONS variables - I just gave the above as a rough example of the difficult in escaping/quoting variables with embedded spaces. Sorry again for leading you down the wrong path re systemd! |
Heh, don't beat yourself up too much for it! 😉 I typically run 14.04 (or current LTS) on servers and 15.10 (or latest) on desktop machines. Aside from systemd, the only major difference that I've had to keep an eye on is Kernel updates. I'll update the Upstart service to use the bracketed variables. It shouldn't break anything, and might fix the problem you reported. |
Hi @mainmachine, thanks for all help here! And I like your improvements in your fork to support blank spaces and quotes. Do you mind to create a pull request to send back your improvements and fix this issue on systemd? |
I haven't had a chance to test it yet, but if you (or someone else) have done so (or if you're willing to roll the dice ;) ), then certainly! I am fairly certain that at a bare minimum it won't break anything, and I'm hoping it might resolve some issues I've been seeing in some games with my wireless xbox360 pads. |
I was able to test my changes, and unfortunately systemd does not like this:
It will appear to work, but if you do a
It complains about not understanding one of the options. Sorry about the lack of detail, but I'm going from memory. Suffice it to say it needs a little more work. :/ |
Thank you for all testing and feedback, @mainmachine! |
Sorry for delay, guys. I also tried ${VARIABLE} on a non-systemd system when I was trying to this to work and it also didn't help the problem, sorry. I still think the right way to do this would be using a regular xboxdrv config file but I suspect that would break compatibility with installations already out there. :( xxx |
Hiya :)
I was trying to add the option --device-name="Xbox 360 Wireless Receiver (XBOX)" to the options in /etc/default/xboxdrv in order to get xboxdrv to properly emulate xpad device names but came across an issue whereby it doesn't seem to be possible to give commands with spaces or quotes in the arguments in any of the options in this file. All attempts to use normal bash style escaping fail.
Examples that don't work...
...=--device-name="Xbox 360 Wireless Receiver (XBOX)"
...=--device-name=Xbox 360 Wireless Receiver (XBOX)
...=--device-name='Xbox 360 Wireless Receiver (XBOX)'
...="--device-name="Xbox 360 Wireless Receiver (XBOX)""
...="--device-name='Xbox 360 Wireless Receiver (XBOX)'"
...='--device-name="Xbox 360 Wireless Receiver (XBOX)"'
etc
(also tried without the '()'s in case they were upsetting something)
All attempts either result in the option being truncated (so the device name becomes just Xbox and not Xbox 360 Wireless....) or the escape or quote characters get included and it still gets truncated (with the device name still being truncated, i.e. Xbox\ "Xbox 'Xbox and so on.)
I'm guessing /etc/init.d/xboxdrv gets processed by system.d or similar and that this might be a systemd shell related issue.
If it's not possible to get around this problem, why not either-
Or-
Regards
Julie
x
The text was updated successfully, but these errors were encountered: