You are not logged in.
Pages: 1
we now have pcmanfm + gvfs - does anybody know how to mount devices as user?
pcmanfm+gvfs+udisks I know how it works http://www.ab9il.net/linux/pcmanfm-usb-mount.html
but without udisks?
Offline
ok - just ckecked, that there is udisk2 on new rolling - so it should work like this - I just try
Offline
ok - it works, but only for usb - devices
open a terminal (sakura) and get root
leafpad /etc/polkit-1/localauthority/50-local.d/55-storage.pkla
copy the following lines into the file
[Storage Permissions]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks2.drive-detach;org.freedesktop.udisks2.luks-unlock;org.freedesktop.udisks2.inhibit-polling;org.freedesktop.udisks2.drive-set-spindown
ResultAny=yes
ResultActive=yes
ResultInactive=no
safe and close and then type
addgroup tux plugdev
close X and start it new
Offline
if you want to mount also internal devices as user, 55-storage.pkla should look like this
[Storage Permissions]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.drive-eject;org.freedesktop.udisks2.drive-detach;org.freedesktop.udisks2.luks-unlock;org.freedesktop.udisks2.inhibit-polling;org.freedesktop.udisks2.drive-set-spindown;
ResultAny=yes
ResultActive=yes
ResultInactive=no
the only thing, I cannot eject the CD, where slitaz booted...
Offline
I just set the topic to not resolved, because I do not find a solution to mount/umount-eject CDs
first strange thing: pcmanfm does not print anything when opend with terminal, so I dont get any messages.
The only thing I could find was in messages:
Apr 28 19:50:08 (none) daemon.warn udisksd[1410]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Apr 28 19:50:08 (none) daemon.notice dbus[1327]: [system] Successfully activated service 'org.freedesktop.UDisks2'
Apr 28 19:50:08 (none) daemon.notice udisksd[1410]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Apr 28 19:50:11 (none) user.debug kernel: eth0: no IPv6 routers present
Apr 28 19:57:50 (none) user.debug kernel: ISO 9660 Extensions: RRIP_1991A
Apr 28 19:57:50 (none) daemon.warn udisksd[1410]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Apr 28 19:57:50 (none) daemon.notice udisksd[1410]: Mounted /dev/sr1 at /run/media/tux/SliTaz core-4in1 on behalf of uid 1000
Apr 28 20:00:41 (none) daemon.warn udisksd[1410]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
Apr 28 20:00:41 (none) daemon.notice udisksd[1410]: Cleaning up mount point /run/media/tux/SliTaz core-4in1 (device 11:1 is not mounted)
Apr 28 20:00:41 (none) daemon.notice udisksd[1410]: Unmounted /dev/sr1 on behalf of uid 1000
so the SliTaz CD is unmounted, but eject is denied
and when I put a CD in a second device - there is nothing to find
perhaps somebody has an idea....
Offline
Hi kultex
to mount as user without "Not Authorized" message I use this one without
adding tux to plugdev-group
add the file /etc/polkit-1/localauthority/50-local.d/50-mount.pkla
[Mount a system-internal device]
Identity=*
Action=org.freedesktop.udisks2.*
ResultAny=yes
ResultActive=yes
ResultInactive=yes
It work with Hdd and USB but with CD I have some Problems too.CDs (Drives)
don't show up in pcmanfm when i insert a CD.If I mount them in terminal,(su to root), to /media/cdrom they are visible and accessible in pcmanfm (for tux)and surprise,surprise
I can eject them with a rightclick on the Icon (as tux),
but not with the eject-button at the CD-Drive
F**k
Offline
I solved inserting a CD
it needs kernelpolling - as root
echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs
to make it permanent, add this line to /etc/init.d/system.sh or /etc/init.d/local.sh
Edit: found something to try
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.eject-*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Offline
mixed results:
-->found something to try<---
makes no difference: Hdd = yes, Usb = yes, CD = does not show up
(yes, i did addgroup tux plugdev..;-)
using your new file and adding in terminal
echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs
The CD shows up in pcmanfm BUT rightclick > eject = Not authorized...The eject-button at the CD-drive is now working but pcmanfm doesn't notice that the CD is gone,
still showing the content.
Offline
Part 2
using my file and your echo 5000 line:
the CD shows up, rightclick > unmount work, CD-drive eject button work,
BUT rightclick > eject doesn't work no more.The CD stops and I get this error message:
Error ejecting /dev/sr0: Command-line `eject "/dev/sr0"'
exited with non-zero exit status 1:
eject: /dev/sr0: Input/output error
This is not "Not authorized" ...
Offline
When booting to the desktop with a live cd an unknown process mounts the live cd.
Busybox eject doesn't run umount prior to eject, and reports input/output error on failed eject.
Util-linux-eject umounts prior to ejecting is a workaround.
Stopping whatever is auto mounting the cd is a better solution.
Offline
@mojo I think its not unknown - its udev, that does all the mount things - if I add kernel polling before I enter a CD in the second CD-Rom it shows up in pcmanfm, but I cannot mount it as user, because there are no polkit rools.
So this means that we are also stuck here in the ash / bash problem - what soulutions do we have - I see two
1) solution - we get pcmanfm to use Util-linux-eject (I dont think so)
2) solution - we remove the udev CD rules and write our own udev rules to mount CD/DVD via fstab - then when I quote sixofeights lines - "If I mount them in terminal,(su to root), to /media/cdrom they are visible and accessible in pcmanfm (for tux)and surprise,surprise I can eject them with a rightclick on the Icon (as tux)" - it should be possible to eject.
somebody sees another solution?
The fstab thing reminds me, that salckware / porteus did this - I just posted it here:
http://forum.slitaz.org/topic/udev-changes-for-50#post-26835
the important file is the udev-fstab-update.txt (last attachment - the first attachment is not working)
Offline
struggling around the whole day with this s..t and the only thing is that you just have to install util-linux-eject and evrything is working fine
Offline
Hi there!
My current SliTaz system is so far from latest Rolling, but it also based on the Cooking packages. And I fairly want to test brand new Rolling included all the latest improvements! Sad, but on mirror I can find only Rolling dated April, 27.
So. On my current system. Reading system logs:
/var/log/messages:
May 1 10:18:24 (none) daemon.err udevd[930]: failed to execute '/lib/udev/udisks-part-id' 'udisks-part-id /dev/mmcblk0': No such file or directory
A lot of lines like above. Looking at pkgs.slitaz.org I found that udev package have only /usr/lib/udev/udisks-part-id, so I symlinked it to /lib/udev/udisks-part-id.
And a lot of lines like this:
May 1 10:18:43 (none) daemon.warn udisksd[1263]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
So I just touched empty file /etc/crypttab.
Now, my USB Flash. It has two partitions. Maybe something wrong with its FS, but now I can see only one partition. Here is "fdisk -l" about it:
[c]Disk /dev/sdb: 8103 MB, 8103395328 bytes
250 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 15500 * 512 = 7936000 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1016 7871488 1b Hidden Win95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 32, 33) logical=(0, 33, 3)
Partition 1 has different physical/logical endings:
phys=(980, 21, 1) logical=(1015, 201, 62)
Partition 1 does not end on cylinder boundary
/dev/sdb2 * 1016 1022 40960 b Win95 FAT32
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(980, 21, 2) logical=(1015, 202, 1)
Partition 2 has different physical/logical endings:
phys=(985, 46, 21) logical=(1021, 23, 18)
Partition 2 does not end on cylinder boundary[/c]
And, when I insert this flash, I see sdb1 mounted in the PCManFM.
Next, my internal HD. Here "fdisk -l":
[c]Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 637 5116671 12 Compaq diagnostics
/dev/sda2 * 638 18021 139636980 7 HPFS/NTFS
/dev/sda3 18022 19457 11534639+ f Win95 Ext'd (LBA)
/dev/sda5 18022 18152 1050624 83 Linux
/dev/sda6 18153 19062 7307264 83 Linux
/dev/sda7 19062 19457 3173679+ 83 Linux[/c]
And here is my /etc/fstab:
[c]# /etc/fstab: Information about static filesystems.
#
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts rw,gid=5,mode=0620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
#/dev/cdrom /media/cdrom iso9660 user,ro,noauto 0 0
#/dev/sda3 /home ext3 defaults 0 2
#/dev/hdb1 /mnt/data btrfs defaults 0 2
#datasvr:/nfs/home /home nfs tcp,nolock 0 0
#/dev/sda5 swap swap defaults 0 0
/dev/sda6 /mnt/slitaz ext3 defaults 0 0
/dev/sda2 /mnt/acer ntfs-3g defaults 0 0[/c]
I can't see already mounted partitions (sda2, sda6) on the left PCManFM panel.
And, of course, I have no CD-ROM on my notebook, so problem with eject not touched me.
Offline
(Auto)mounting via pcmanfm works just after something like [c]addgroup tux disk[/c]
I did this in TazPanel - Settings groups gui. But only in deleted on server last rolling. I'm glad it's saved by me.
In 5.0rc1 all of this is broken.
Offline
az_ua
you are right, but until now I have no idea why??????
Offline
Comparing 'last-before-rc1-april-rolling' and RC1, rolling does not contains '/etc/polkit-1' dir when unpacking cat'ed from 4 parts rootfs. This directory created after system loaded.
'/etc/polkit-1/localauthority/90-mandatory.d/org.freedesktop.udisks2.pkla' where is disk group option located, presents in both versions after system boot.
But 'polkitd' is even NOT in process list with RC1. (I know about show root tasks in lxtask.) Now running old-rolling and I can't find from where it starting. Text search from midnight commander gives no result. Also in RC1 a lot of files, using while booting (in /etc) are smaller (size in bytes).
Offline
udisks2
/etc/polkit-1/localauthority/90-mandatory.d/org.freedesktop.udisks2.pkla
gives a regular user who is a member of disk group permission to automount removeable drives.
If udisks2 is installed and user is a member of disk group it should automount flash/thumb drives.
slitaz-boot-scripts-5.5 on the repo has the section removed from /etc/init.d/bootopts.sh which adds user tux on boot to groups audio cdrom video tty plugdev
It was added back,tagged 5.5.1,commit in wok but failed to build.
http://cook.slitaz.org/cooker.cgi?pkg=slitaz-boot-scripts
slitaz-boot-scripts-5.5.1 is built and on the repo.
http://cook.slitaz.org/cooker.cgi?pkg=slitaz-boot-scripts
Offline
Loading full 5.0-rc1 with no changes.
tty root login,
Recharging, -gi htop,
killing all about dbus, gvfs
[c]mkdir /run/dbus[/c]
[c]/etc/init.d/dbus start[/c]
Starting LXDE as user tux
Starting pcmanfm, and I can now see and mount volumes. I was not even did anything with groups or /etc/polkit files. And polkitd became still running now, due to dbus was just fixed.
http://forum.slitaz.org/topic/slitaz-50rc1/page/2#post-29623
upd: this is already fixed in wok before
Offline
@mojo - this was not the problem, because Christophe added a 55 polkit.pkla, which allowed evry user to mount.
http://hg.slitaz.org/slitaz-configs/rev/8b5547f31bf4
Christophe already added az_uas note:
http://hg.slitaz.org/wok/rev/d4cf16d55526
so lets see, what it gives on next rolling
Offline
Hi all,
After these 2 commits:
http://hg.slitaz.org/slitaz-boot-scripts/rev/b14f03e7493f
http://hg.slitaz.org/wok/rev/d4cf16d55526
I use last files, you can also get them form Hg or wait a few hours untill I release packages and sync mirror, then just update the system, reboot... to get access to your internal HD partitions and external USB devices. Here is what I get and what you should get when an usb stick is inserted:
[attachment=29630,1446] [attachment=29630,1447]
Huge huge thanks to Kultex for all the testing, debugging and polkit config files!
Best regards,
- Christophe
Offline
from http://cook.slitaz.org/cooker.cgi?pkg=libfm
libtool: install: /usr/bin/install -c .libs/gtk-fileprop-x-desktop.soT /home/slitaz/wok/libfm/install/usr/lib/libfm/modules/gtk-fileprop-x-desktop.so
libtool: install: /usr/bin/install -c .libs/gtk-fileprop-x-shortcut.lai /home/slitaz/wok/libfm/install/usr/lib/libfm/modules/gtk-fileprop-x-shortcut.la
->
.libs/gtk-fileprop-x-desktop.soT
.libs/gtk-fileprop-x-shortcut.lai
->
.soT ?
.lai ?
Results in /usr/lib/libfm directory is not present.
Offline
Pages: 1
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]