LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 800|回复: 2

请问 kde 3.5 下如何 automount 优盘?

[复制链接]
发表于 2006-4-6 15:05:32 | 显示全部楼层 |阅读模式
hal dbus 都装了,好像还装了 pmount,emerge kdebase 时 USE 里也有hal,用户加入了plugdev 组。现在插入优盘,会弹出窗口问是否挂载,但挂载时有错,显示 /etc/fstab 或 /etc/mtab 里没有相关条目,请问该怎么办? 装ivman吗?哪个版本的ivman好?
发表于 2006-4-6 17:17:03 | 显示全部楼层
Setup KDE to Mount Devices

KDE gives you the power to mount devices such as CDROMs or USB sticks through a single click in a graphical interface. To accomplish this goal you need to have KDE compiled with hal in your USE variable and to have dbus and hal installed on your system. You should also add dbus and hal to the default runlevel and add yourself to the plugdev group.

Code Listing 3.4: Setup device mounting

# emerge --noreplace dbus hal
# rc-update add dbus default
# rc-update add hald default
Add <user> to the plugdev group
# gpasswd -a <user> plugdev

You can also have your devices automatically mounted without interaction, you just need to install ivman and add it to the default runlevel.

Code Listing 3.5: Setup auto-mounting

# emerge --noreplace ivman
# rc-update add ivman default

看看有没有哪步做漏了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-6 18:52:20 | 显示全部楼层
Post by torres
看看有没有哪步做漏了。

谢谢兄弟的回复,搞定了 说说一点心得。
需要软件 hal dbus pmount,另外,emerge kdebase 或者 kdebase-kioslaves时,USE里要加上hal。
装了hal 和 dbus 后,kde可以对移动设备做出反应。具体的挂载工作由hal 和 pmount 或者 hal 和 fstab-sync 来完成,fstab-sync 是先自动修改 /etc/fstab,然后挂载,而 pmount 可以不用修改/etc/fstab 就完成挂载,kde 建议采用 pmount。
使用pmount的方法是,在 /usr/share/hal/fdi/policy/20thirdparty/ 下创建一个到 /usr/bin/pmount-hal 的链接,并取一个数字开头的名字。(网上很多老的howto是说在/usr/local/etc/hal/device.d/下创建这个链接,大概新版的hal改变的位置了)
eg.
  1. ln -s /usr/bin/pmount-hal /usr/share/hal/fdi/policy/20thirdparty/50-pmount.hal
复制代码

这样插入优盘后,会弹出个窗口,问是否挂载,桌面上也会多出个图标,点击即可挂载。

如果想让优盘插入后自动挂载,那就再装个ivman,并在开机时启用ivman服务。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表