I am still building this Ubuntu 5.10 (Breezy) computer for a friend.
When I open Xine from the Applications menu in Gnome desktop and play a DVD, the DVD playback is jittery and tends to jump a little.
If I open a Terminal and type in "hdparm -d1 -dma -c1 /dev/dvd", this fixes the problem.
I dont want the end user to have to type this command for two reasons:
1) They shouldnt need to.
2) They need the SU password to do it.
So, I was thinking of doing the following (but it doesnt seem to work)
1) I made the following shell script and placed it in /usr/bin:
sudo -u <username> hdparm -d1 -dma -c1 /dev/dvd
2) I added the following to /etc/sudoers file:
user ALL=(ALL) NOPASSWD: /etc/default/hdparm -d1 -dma -c1 /dev/dvd
3) I edited the menu item in Gnome so that it ran my shell script.
What happens is that xine launches, but the hdparm command does not get executed properly.
If I type "sudo -u <username> hdparm -d1 -dma -c1 /dev/dvd" in the command line I get the following:
setting 32-bit IO_support flag to 1
HDIO_SET_32BIT failed: Permission denied
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Permission denied
HDIO_GET_MULTCOUNT failed: Invalid argument
IO_support = 0 (32-bit)
using_dma = 0 (off)
readahead = 256 (on)
It appears that hdparm is being run with user priviledges but it needs SU priviledges.
I must be doing something wrong, but I cannot work it out
..... I tried
Can somebody point out where I am getting this wrong?