Mounting pendrive and cdrom automatically
It i plug the pendrive or insert cd to cdrom it will be automatically mounted.
How would i do this? I don't want to mount these manually from terminal. |
You'll need to write udev rules to handle this. Found in /etc/udev/rules.d
Here's some reading to do: http://www.reactivated.net/writing_udev_rules.html |
Make sure you are a member of the cdrom and plugdev groups. Simply run the command groups to find out what groups your user name is a member of. For reference, here is what I get:
Code:
bash-3.1$ groups |
Hi,
The mounting point can be controlled in the static '/etc/fstab' file. 'udev' & 'hal' should control the device itself. If you want to write rules for the 'udev' then look at 'Writing udev rules'. :hattip: The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links! |
Quote:
|
Quote:
Code:
groups: cannot find name for group ID 100 Code:
You are not privileged to mount the volume "Softwares" |
Quote:
|
cola, it sounds like things have been tampered with. Group 100 is the "users" group, and it's not good that your system doesn't know that.
For the permissions subject, Edit /etc/fstab and add the "users" option to allow normal users to mount it. |
Quote:
Code:
#/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0 Note that the entry for cdrom is commented out since hal and udev mount CDs automatically. I don't know why you get this when you run the groups command: Code:
groups: cannot find name for group ID 100 |
Quote:
|
@tommcd,
cat /etc/fstab Code:
/dev/hda5 swap swap defaults 0 0 |
Quote:
|
Quote:
|
Quote:
|
Look above, the link has been posted twice. Writing udev rules will take care of this.
|
All times are GMT -5. The time now is 04:55 PM. |