[mythtv-users] Eject option on Optical menu

Leighton Brough brough at baremetalsoft.com
Wed Oct 18 16:06:40 UTC 2006


JP Bussoli wrote:
> On 10/16/06, *Leighton Brough* <brough at baremetalsoft.com 
> <mailto:brough at baremetalsoft.com>> wrote:
>
>     I can see from the logs that the Eject option on the DVD menu
>     performs a
>     umount command. This does unmount the disk and makes it possible
>     for me
>     to manually eject it, but it doesn't actually automatically eject.
>     What
>     do I need to do to make this work?
>
>     The relevant lines from /etc/fstab look like this:
>
>     /dev/cdrom             /mnt/cd   iso9660  
>     user,noauto,unhide      0      0
>     /dev/dvd               /mnt/dvd  udf      
>     user,noauto,unhide      0      0
>
>     I've got the monitor CD/DVD setting checked, as this is the only way I
>     can see to get MythGallery to view a DVD or CD containing images or
>     video files. This is something else I'd like to know more about:
>     is it
>     possible to get the gallery into this mode from the main menu, or does
>     it only happen in response to inserting a disk (or on detection of a
>     disk at startup of the frontend)?
>
>     Thanks,
>     Leighton
>     _______________________________________________
>     mythtv-users mailing list
>     mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>     http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>     <http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users>
>
>
> I had a similar problem and I was able to resolve it by adding my 
> "mythtv" user to the sudoers list and allowing the mythtv user to use 
> the command eject. I also made an eject script so that I could easily 
> map it to my remote using irexec. The following is the line that I use 
> in my /etc/sudoers file to allow access to eject.
>
> mythtv,%mythtv  ALL=NOPASSWD:/usr/bin/eject,/sbin/mount 
> /cdrom,/sbin/umount /cdrom
>
> And the eject script that I use is super simple
> eject.sh:
>
> #!/bin/sh
> sudo /usr/bin/eject /dev/dvd-sr0
>
> I do not call my optical drives out in my fstab either. I hope that 
> this helps.
>
> JP

Thanks for the suggestions, it got me started in the right direction. 
Much like you, I'm now using "eject". I customised the Eject option on 
the optical menu to do "EXEC /usr/bin/eject -T" (which is enough since I 
only have the one eject-able drive).

I've also configured autofs to auto-mount my CD/DVDs and any cards in my 
5-in-1 memory card reader. With a 1 second unmount timeout, this seems 
to work really well. I've added symlinks to the autofs mounts for all of 
the devices above in my MythGallery images directory. I've also turned 
off the CD/DVD monitoring in the mythfrontend settings. As far as I can 
tell in the first 24 hours, it seems CD and DVD playing works well, I 
can easily access images or video on memory cards or disks, and it's 
easy to extract any removable media. So far so good...

Cheers,
Leighton





More information about the mythtv-users mailing list