网上抄的实现自动挂载的功能

http://gentoo-wiki.com/HOWTO_ivman
http://www.fedoraforum.org/forum/showthread.php?t=108500

终于解决了,从Gentoo forum连接到FedoraForum= =
原文地址: http://www.fedoraforum.org/forum/sho...d.php?t=108500
4楼
简单翻译如下:
创建文件/usr/share/hal/fdi/policy/10osvendor/95-ntfs-permissions.fdi(注: Gentoo可以创建为/etc/hal/fdi/policy/95userpolicy/95-ntfs-permisissons.fdi)
代码:<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

<!-- Mount external ntfs drives with user privileges -->
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@block.storage_device:storage.no_partitions_hint" bool="false">
<match key="volume.partition.msdos_part_table_type" exists="true">
<match key="volume.partition.msdos_part_table_type" int="0x07">
<merge key="volume.mount_option" type="string">umask=0222</merge>
</match>
</match>
</match>
</match>
</match>
</device>
</deviceinfo>重启hal服务(service haldaemon restart)(注:Gentoo为/etc/init.d/hald restart)
然后编辑/usr/share/hal/scripts/hal-system-storage-mount
在所有的MOUNTOPTIONS过程之后(在fi之后,被注释掉的echo之前)加入以下这行:
代码:fi

MOUNTOPTIONS="$MOUNTOPTIONS,$HAL_PROP_VOLUME_MOUNT_OPTION"

# echo "options = '$MOUNTOPTIONS'"
gnome-volume-manager与拔插设备管理gnome中用gnome-volume-manager来管理拔插设备的播放管理,比如,在
gconf-editor中:

/desktop/gnome/volume_manager/automount_drives (针对移动硬盘)
gnome-volume-manager 是否要在插入可移动存储驱动器时自动挂载驱动器。

/desktop/gnome/volume_manager/automount_media (针对移动usb盘)
gnome-volume-manager 是否要在插入可移动存储介质时自动挂载介质。


如上个blog所说,将gnome-volume-manager加入/etc/xdg/xfce4/xinitrc
中也能在xfce中实现移动设备的自动挂载控制。[@more@]

emerge gnome-volume-manager
rc-update add dbus default

To configure gnome-volume-properties or use System > Preferences > Removable Drives and Media

In the input tabs when entering commands to execute when media/devices are inserted, %d will be replaced with the device name and %m will be replaced with the path to the mounted volume.

[ edit]
rc-update add hald default
Access Rights

As of gnome 2.12, users must be a member of the plugdev group in order for removable media to be mounted on insertion. To add via commandline:

sudo gpasswd -a user plugdev

Or through the GUI System > Administration --> Users and Groups and checking the "Enable access to external storage devices automatically" option in "Properties" User privileges tab.

你可能感兴趣的:(#gentoo)