Use the CD or DVD Device Icons in KDE
Updated: 07/15/2005
General Information
KDE can place icons for specific devices such as CD-Roms, DVD-Roms, Cameras, etc. The idea is to click on this icon and the device will automatically be mounted and Konqueror will open showing the contents of the mounted device.Requirements
Configuration
How to give users mount permissions.Note: Make sure that you change "user1" to be the username you are using.
Using the following command, add the line vfs.usermount=1 to your sysctl.conf file.| # | echo "vfs.usermount=1" >> /etc/sysctl.conf |
/etc/sysctl.conf only take effect after a reboot; however, this setting can be made dynamically using the following command:| # | sysctl -w vfs.usermount=1 |
|
# ls -dl /dev/acd* crw-r----- 1 root operator 4, 12 Feb 15 11:34 /dev/acd0 crw-r----- 1 root operator 4, 13 Feb 15 11:34 /dev/acd1 |
Note: If you see other devices such as /dev/acd0t01, you may ignore them.
Notice that the devices are in the operator group. Users will need to be members of the operators group in order to mount these drives. To make a user a member of the operators group, use the following command:| # | pw usermod user1 -G operator |
|
# groups user1 user1 operator |
Note: This command will not change the primary group, but will change your user so that the only other group he is invited to be a member of is operator. If you want a user to be a member of both operator and wheel user the following command:
|
# pw usermod user1 -G operator,wheel # groups user1 user1 wheel operator |
| # | chmod 660 /dev/acd0 /dev/acd1 |
|
# # # |
mkdir /home/user1/cdrom mkdir /home/user1/cdrom1 chown user1:user1 /home/user1/cdrom /home/user1/cdrom1 |
|
# # |
echo "/dev/acd0 /home/user1/cdrom cd9660 ro,noauto 0 0" >> /etc/fstab echo "/dev/acd1 /home/user1/cdrom1 cd9660 ro,noauto 0 0" >> /etc/fstab |
For /dev/acd0
|
# # # # # # # # # # # # # # # # |
cat << EOF >> /home/user1/Desktop/CD [Desktop Action Eject] Exec=kdeeject %v Name=Eject [Desktop Entry] Actions=Eject Dev=/dev/acd0 Encoding=cd9660 Icon=cdrom_mount MountPoint=/home/user1/cdrom ReadOnly=false Type=FSDevice UnmountIcon=cdrom_unmount X-KDE-Priority=TopLevel EOF |
For /etc/acd1
|
# # # # # # # # # # # # # # # # |
cat << EOF >> /home/user1/Desktop/CD1 [Desktop Action Eject] Exec=kdeeject %v Name=Eject [Desktop Entry] Actions=Eject Dev=/dev/acd1 Encoding=cd9660 Icon=cdrom_mount MountPoint=/home/user1/cdrom1 ReadOnly=false Type=FSDevice UnmountIcon=cdrom_unmount X-KDE-Priority=TopLevel EOF |
| # | chown user1:user1 /home/user1/Desktop/CD1 /home/user1/Desktop/CD1 |
Author: Jared Barneck
jared at bsdcertification dot com