You are not logged in.
Pages: 1
I am using spaceFM to mount/unmount devices. I created
/etc/udev/rules.d/10-my-media-automount.rules
/etc/udev/rules.d/11-mnt-auto-mount.rules
according to this: https://wiki.archlinux.org/index.php/Ud … if_present
but I am not able unmnount. Here is the error I am getting:
Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address (polkit-error-quark, 0)
Error unmounting /dev/sdb1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operationLast edited by Lockheed (2012-05-20 11:12:12)
Offline
Use udev rules OR udisks - not both.
Offline
I only added /etc/udev/rules.d/11-mnt-auto-mount.rules trying to solve this issue. It changed nothing.
Offline
Was it working at any stage?
Offline
No. If it worked, there would be no point in trying to fix it by making changes.
The issue might be related to recent upgrade od udisks to udisks2, but I am not sure about it as it might have started before the upgrade.
Last edited by Lockheed (2012-05-19 11:16:43)
Offline
OK, firstly remove the irrelevant udev rules.
Now, your devices automount correctly, but fail to umount - right? How are you trying to umount them?
Offline
in spaceFM, I rightclick on the device, and then UNMOUNT.
Also, now I am getting 'Error: Read-only file system' when I try to copy something on it.
/etc/udev/rules.d/10-my-media-automount.rules
# vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=udevrules:
#
# /etc/udev/rules.d/10-my-media-automount.rules
# start at sdb to ignore the system hard drive
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
# import some useful filesystem info as variables
IMPORT{program}="/sbin/blkid -o udev -p %N"
# get the label if present, otherwise assign one based on device/partition
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# create the dir in /media and symlink it to /mnt
ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"
# global mount options
ACTION=="add", ENV{mount_options}="noatime,users,exec"
# filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=100,dmask=000,fmask=111,utf8"
# automount ntfs filesystems using ntfs-3g driver
ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
# automount all other filesystems
ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
# clean up after device removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"
# exit
LABEL="my_media_automount_end"Last edited by Lockheed (2012-05-19 18:12:28)
Offline
Why do you still have udev rules? I have just installed spacefm, I have no udev rules for removable media, but I do have udisks, and I start my X session correctly i.e. with consolekit. Spacefm calls udisks to automount my devices when I plug them in, and I can unmount them successfully as you describe above i.e. right click -> unmount. This works with both udisks and udisks2.
Offline
I have this rule because if I remove it, the write speed of USB drives drips by a factor of 10. And I also have consolekit starting my X session.
Offline
OK - so udev is mounting the devices with the 'mount' command, and then you're trying to umount them with udisks, via spacefm. That's why it's not working.
That udev article has a set of rules using pmount - spacefm can also use pmount, so that might work better for you.
Offline
It looks like pmount doesn't support mount parameters, like noatime, which would make it just as slow as udisks.
Do I need to change something in spaceFM to make it use pmount?
Last edited by Lockheed (2012-05-20 10:24:47)
Offline
I have the same problem with Thunar + Udisks. Udisk mount automaticly the devices but I am not able to umount them through Thunar GUI. I have to umount them by shell.
I don't have any udev rules in /etc/udev/rules.d/
Last edited by I am Gianluca (2012-05-20 11:02:09)
Laptop: Acer Aspire S3 | Linux Mint Cinnamon 64-bit
Offline
Thanks everyone.
I solved the problem solved with this:
https://bbs.archlinux.org/viewtopic.php?id=112397&p=1
Offline
Pages: 1