2009-11-30, 09:55
The DVD player in my XBMC HTPC makes a lot of noise. When I issue the command 'eject -x 4 /dev/cdrom', it falls back to reading a 4 speed and all the noise is gone. For testing purposes, I connect over ssh, make this setting and all works fine. Now after I change DVD's, the setting is discarded and I have to issue the 'eject' command again.
So, what I wanted to do was:
a) reduce the drive speed in general (by default for the entire system), but that doesn't seem possible
b) map a button on my remote to issue the 'eject -x 4 /dev/cdrom' command when in XBMC, so I just have to press the button to reduce the CD speed after inserting a new DVD
Now, I tried the following:
1) map an unused key (i.e. mytv) in 'remote.xml' to do the following:
<mytv>System.Exec('eject -x 4 /dev/cdrom')</mytv>
Now when I do that, XBMC is windowed and a terminal screen is displayed shortly (less than a second). I cannot resume XBMC and have to kill it from the command line. Also, the DVD read speed is not reduced.
I also tried <mytv>System.Exec('sh /home/name/.xbmc/scripts/setcdspeed.sh')</mytv> with 'setcdspeed.sh' being:
#! /bin/sh
eject -x 4 /dev/cdrom
But with the same result...
2) since the 'System.Exec' command didn't seem to work, I tried to use the 'RunScript' command, like this:
<mytv>RunScript(/home/name/.xbmc/scripts/setcdspeed.py)</mytv>
With setcdspeed.py being:
import os
os.popen("eject -x 4 /dev/cdrom")
But this doesn't seem to do anything either.
Can somebody shed some light on this?
I'm sure I'm doing something wrong, but I can't find what...
Thanks!
So, what I wanted to do was:
a) reduce the drive speed in general (by default for the entire system), but that doesn't seem possible
b) map a button on my remote to issue the 'eject -x 4 /dev/cdrom' command when in XBMC, so I just have to press the button to reduce the CD speed after inserting a new DVD
Now, I tried the following:
1) map an unused key (i.e. mytv) in 'remote.xml' to do the following:
<mytv>System.Exec('eject -x 4 /dev/cdrom')</mytv>
Now when I do that, XBMC is windowed and a terminal screen is displayed shortly (less than a second). I cannot resume XBMC and have to kill it from the command line. Also, the DVD read speed is not reduced.
I also tried <mytv>System.Exec('sh /home/name/.xbmc/scripts/setcdspeed.sh')</mytv> with 'setcdspeed.sh' being:
#! /bin/sh
eject -x 4 /dev/cdrom
But with the same result...
2) since the 'System.Exec' command didn't seem to work, I tried to use the 'RunScript' command, like this:
<mytv>RunScript(/home/name/.xbmc/scripts/setcdspeed.py)</mytv>
With setcdspeed.py being:
import os
os.popen("eject -x 4 /dev/cdrom")
But this doesn't seem to do anything either.
Can somebody shed some light on this?
I'm sure I'm doing something wrong, but I can't find what...
Thanks!