How to run an executable from dvd

Mikkel L. Ellertson mikkel at infinity-ltd.com
Fri Apr 6 17:05:46 UTC 2007


A.J. Bonnema wrote:
> 
> So I need to find a way to have hda mounted with exec permission *by
> default*. So I don't have do a manual mount every time I insert a dvd or
> cd.
> 
> I found no such option in either ControlCenter or in gnome.
> 
> Do you have any idea how you can do that?
> 
Easy way:
Create an entry in /etc/fstab to mount the DVD. But you will have to
use the mount command every time you want to mount a DVD.

Hard way:
Create a file in /usr/share/hal/fdi/policy/95userpolicy/ called
dvd.fdi with something like:

<deviceinfo version="0.2">
 <device>
       <match key="storage.drive_type" string="cdrom">
        <append key="volume.mount.valid_options"
type="strlist">ro</append>
        <merg key="volume.mount.valid_options"
type="strlist">sync</append>
        <append key="volume.mount.valid_options"
type="strlist">dirsync</append>
        <append key="volume.mount.valid_options"
type="strlist">noatime</append>
        <append key="volume.mount.valid_options"
type="strlist">nodiratime</appe
        <append key="volume.mount.valid_options"
type="strlist">quiet</append>
        <append key="volume.mount.valid_options"
type="strlist">remount</append>
        <append key="volume.mount.valid_options"
type="strlist">exec</append>
        </match>
 </device>
</deviceinfo>

I am not sure I have it correct, and I have not tested it. I am
still learning to create HAL rules. I am not sure if the "append
key" in the first rule will replace the old mount option list.
Hopefully, someone that know HAL or XML will correct me.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!




More information about the fedora-list mailing list