|
|
一直很奇怪按照arch的wiki里的hal(中文)部份介绍不能让kde4自动mount ntfs的盘.原来是中文没更新(有可能是我火星了)
打开 /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi 这个文件,找到以下部份..红色字体的几行就是我们要加进入的.
<match key="volume.fstype" string="ntfs">
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
<merge key="volume.fstype" type="string">ntfs-3g</merge>
<merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
<append key="volume.mount.valid_options" type="strlist">uid=</append>
<append key="volume.mount.valid_options" type="strlist">gid=</append>
<append key="volume.mount.valid_options" type="strlist">umask=</append>
<append key="volume.mount.valid_options" type="strlist">dmask=</append>
<append key="volume.mount.valid_options" type="strlist">fmask=</append>
<append key="volume.mount.valid_options" type="strlist">locale=</append>
<append key="volume.mount.valid_options" type="strlist">utf8</append>
</match>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
<merge key="volume.fstype" type="string">ntfs-3g</merge>
<merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
<append key="volume.mount.valid_options" type="strlist">-u=</append>
<append key="volume.mount.valid_options" type="strlist">-g=</append>
<append key="volume.mount.valid_options" type="strlist">-m=</append>
<append key="volume.mount.valid_options" type="strlist">-a</append>
<append key="volume.mount.valid_options" type="strlist">-i</append>
<append key="volume.mount.valid_options" type="strlist">-C=</append>
<append key="volume.mount.valid_options" type="strlist">-W=</append>
</match>
保存退出......然后运行
/etc/rc.d/hal restart (如果不是在root.就用sudo /etc/rc.d/hal restart)
OK..运行 dolphin . 点左边ntfs的盘符.发现能mount上.中文也没问题.hal介绍要重新做一个/sbin/mount.ntfs-3g文件的步骤也省了(不确定是否真的不需要)
我把这部份也贴了
If you use KDE, you may have problem with filenames containing non-latin characters. This happens because KDE's mounthelper is not parsing the policies and locale option correctly. There is a workaround for this:
1) Remove this symlink: rm /sbin/mount.ntfs-3g
2) Replace it with a new bash script containing:
#!/bin/bash
/bin/ntfs-3g $1 "$2" -o locale=en_US.UTF-8,$4 #put your own locale here
3) Make it executable: chmod +x /sbin/mount.ntfs-3g
4) Add "NoUpgrade = sbin/mount.ntfs-3g" to /etc/pacman.conf.
Here's an alternative solution for the problem with non-latin characters:
1) Open a shell as root
2) Type: "mv /sbin/mount.ntfs-3g /sbin/mount.ntfs-3g.sav"
3) Create the file /sbin/mount.ntfs-3g containing:
#!/bin/bash
/sbin/mount.ntfs-3g.sav $1 $2 -o locale=de_DE.UTF-8
Change locale accordingly to your system.
4) Make the newly created file executable
" chmod +x /sbin/mount.ntfs-3g "
PS: 谁有空把Hal的中文翻译更新一下吧. |
|