Help configuring GVFS with pcmanfm 0.9.2 - not authorized

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
karabaja4
Posts: 11
Joined: Wed Dec 31, 2008 12:23 am

Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by karabaja4 »

I have a problem with GVFS daemon and new pcmanfm 0.9.2 alpha which uses GVFS by default. I'm using no DE with Arch Linux and it's kinda pain to configure GVFS properly.

Firstly, GVFS wouldn't run at all (pcmanfm2 didn't show the drive at all) so I had to add this:

Code: Select all

if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
       eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi
to my .xinitrc, I'm guessing GVFS has something to do with dbus.

Anyway, that made it start:

Code: Select all

4273 ?        S      0:00 /usr/lib/gvfs/gvfsd
 4282 ?        Ssl    0:00 /usr/lib/gvfs//gvfs-fuse-daemon /home/igor/.gvfs
 ...
 4302 ?        S      0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
 4304 ?        S      0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 4306 ?        S      0:00 /usr/lib/DeviceKit/devkit-disks-daemon
 4307 ?        S      0:00 devkit-disks-daemon: polling /dev/sr0 
 4310 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 4314 ?        S      0:00 /usr/lib/polkit-1/polkitd
 ...
and now the drive is there, but I can't mount it. Here's the problem:

Image

I'm guessing this is a permission error?

I tried:
* chmod-ing /home/user/.gvfs to 0777 (by default it was 0500 if I remember correcly) -> no effect
* editing /etc/udev/rules.d/99-fuse.rules to mode 0775, I thought it had to do something with the fuse module. -> no effect
* running pcmanfm2 as root loses the drive completely.

Any ideas on this, maybe someone has more experience with gvfs?

P.S. I posted on Archlinux forums also, but no response yet - maybe I'll heve better luck here ;)
phillipe
Posts: 41
Joined: Mon Apr 27, 2009 4:12 pm

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by phillipe »

I had that problem too.
And the only way that I found to solve the problem was install polkit-gnome ( pacman -S polkit-gnome ) and add the line below on lxde autostart:
@/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
This is the method used on Gnome and I don't know if has another method, without the polkit-gnome.
==> Phillipe Smith ( SmithuX ) <==
Email: phillipe@archlinux.com.br
WebSite: http://www.smithux.com
karabaja4
Posts: 11
Joined: Wed Dec 31, 2008 12:23 am

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by karabaja4 »

Unfortunetly, the error is still there - even with polkit-gnome-authentication-agent-1 running.

Phillipe, can I please see your ps ax output?
phillipe
Posts: 41
Joined: Mon Apr 27, 2009 4:12 pm

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by phillipe »

karabaja4 wrote:Unfortunetly, the error is still there - even with polkit-gnome-authentication-agent-1 running.

Phillipe, can I please see your ps ax output?
Here is the exit of "ps ax" my friend:

Code: Select all

 3058 ?        Ss     0:00 /usr/sbin/syslog-ng
 3072 ?        Ss     0:00 /usr/bin/dbus-daemon --system
 3075 ?        Ss     0:00 /usr/sbin/hald
 3076 ?        S      0:00 hald-runner
 3104 ?        S      0:00 hald-addon-input: Listening on /dev/input/event1 /dev/input/event2 /dev/input/event3
 3117 ?        S      0:03 hald-addon-storage: polling /dev/sr0 (every 2 sec)
 3118 ?        S      0:03 hald-addon-storage: polling /dev/sr0 (every 2 sec)
 3124 ?        S      0:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
 3160 ?        Ss     0:00 /usr/sbin/crond -S -l info
 3167 tty1     Ss+    0:00 /sbin/agetty -8 38400 tty1 linux
 3168 tty2     Ss+    0:00 /sbin/agetty -8 38400 tty2 linux
 3169 ?        Ss     0:00 /usr/sbin/lxdm-binary
 3171 ?        Ss     0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
 3179 tty7     Ss+    8:42 /usr/bin/X vt7 -nolisten tcp
 3180 ?        Ssl    0:00 /usr/bin/mpd /etc/mpd.conf
 3184 ?        S<     0:00 /sbin/udevd --daemon
 3189 ?        Sl     0:00 /usr/sbin/console-kit-daemon --no-daemon
 3261 ?        Ss     0:00 /usr/bin/lxsession -s LXDE -e LXDE
 3280 ?        S      0:00 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
 3281 ?        S      0:27 lxpanel --profile LXDE
 3282 ?        S      0:05 dbus-launch --exit-with-session pcmanfm2 -p LXDE --desktop -d
 3283 ?        S      0:00 /bin/bash /usr/bin/adeskbar
 3284 ?        S      0:17 parcellite
 3285 ?        S      0:00 /usr/bin/python /usr/share/adeskbar/adeskbar
 3293 ?        S      0:02 devilspie
 3306 ?        S      0:00 /usr/lib/polkit-1/polkitd
 3308 ?        S      0:06 xbindkeys
 3310 ?        S      0:00 /usr/lib/gamin/gam_server
 3331 ?        S      0:53 conky -c /home/phillipe/.conky/lxde_conkyrc
 3339 ?        S      0:00 /usr/lib/menu-cache/menu-cached
 3369 ?        S      0:00 dbus-launch --autolaunch 2277c52bc988a041395a95e44a6950ae --binary-syntax --close-stderr
 3370 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 3870 ?        S      0:02 openbox --replace
 3877 ?        S      0:00 /usr/lib/GConf/gconfd-2
 3983 ?        S      0:00 sh /tmp/adeskbar.sh
 3984 ?        S      0:00 /bin/sh /usr/bin/thunderbird
 3996 ?        S      0:00 /bin/sh /usr/lib/thunderbird-3.0/run-mozilla.sh /usr/lib/thunderbird-3.0/thunderbird-bin
 4000 ?        Sl     1:19 /usr/lib/thunderbird-3.0/thunderbird-bin
 4231 ?        S      0:00 dbus-launch --exit-with-session pcmanfm2
 4232 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 4234 ?        S      0:00 /usr/lib/gvfs/gvfsd
 4240 ?        S      0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
 4241 ?        S<     0:00 /sbin/udevd --daemon
 4245 ?        S      0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 4247 ?        S      0:00 /usr/lib/DeviceKit/devkit-disks-daemon
 4248 ?        S      0:01 devkit-disks-daemon: polling /dev/sr0 
 4252 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 7054 ?        S      0:00 dbus-launch --exit-with-session pcmanfm2
 7055 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 7057 ?        S      0:00 /usr/lib/gvfs/gvfsd
 7063 ?        S      0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
 7065 ?        S      0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 7067 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 7130 ?        Z      0:00 [sh] <defunct>
23401 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
23403 ?        S      0:00 /usr/lib/gvfs/gvfsd
23408 ?        S      0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
23411 ?        S      0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
23413 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
23563 ?        Sl     0:03 /usr/lib/chromium/chromium
23564 ?        S      0:00 /usr/lib/chromium/chromium
23565 ?        S      0:00 /usr/lib/chromium/chromium --type=zygote
23576 ?        Sl     0:00 /usr/lib/chromium/chromium --type=renderer --lang=pt-BR --force-fieldtest=DnsImpact/_disabled_prefe
23581 ?        Sl     0:00 /usr/lib/chromium/chromium --type=extension --lang=pt-BR --force-fieldtest=DnsImpact/_disabled_pref
23586 ?        Sl     0:00 /usr/lib/chromium/chromium --type=extension --lang=pt-BR --force-fieldtest=DnsImpact/_disabled_pref
23598 ?        Sl     0:03 /usr/lib/chromium/chromium --type=renderer --lang=pt-BR --force-fieldtest=CacheSize/CacheSizeGroup_
23603 ?        S      0:00 [flush-8:0]
23619 ?        S      0:00 roxterm
23621 ?        S      0:00 gnome-pty-helper
23623 pts/0    Ss     0:00 /bin/zsh
23646 pts/0    R+     0:00 ps ax
==> Phillipe Smith ( SmithuX ) <==
Email: phillipe@archlinux.com.br
WebSite: http://www.smithux.com
IgnorantGuru
Posts: 30
Joined: Sat Feb 27, 2010 7:35 pm
Contact:

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by IgnorantGuru »

FWIW I also use Openbox without a DE and couldn't get an earlier git version of the new pcmanfm to work. It kept giving me repeated mount errors and then seg faulted. It would not restart - just seg faulted after that.

Personally, I'm disappointed to see that pcmanfm went in the gvfs direction. If I wanted all that gnome stuff I would use gnome. And I don't like fuse running on my system, and gvfs seems to require that. I think volume management should be optional and bring in only optional dependencies, especially for a lightweight file manager. It's silly to not be able to navigate a local filesystem with pcmanfm, just because it's trying to use gvfs for things that can be done directly. I haven't looked into all the details, but I see this is what people voted for (not that I think popular opinion is a good way to design). I think a more modular approach would have been better. IMO this is not a good default for a lightweight DE like LXDE.

So for now I'm sticking with 0.5.2 for the simple reason that it works.
Check out my blog for useful scripts, mods and tips... http://igurublog.wordpress.com
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by maces »

Hi,

having the same problem here on my archlinuxpc. Did you file a bug report?

maces
karabaja4
Posts: 11
Joined: Wed Dec 31, 2008 12:23 am

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by karabaja4 »

maces wrote:Hi,

having the same problem here on my archlinuxpc. Did you file a bug report?

maces
No, because I don't think it's a bug in the code, it's just an unknown GVFS dependency/module/setting that is missing, I just can't figure out which one (other than already mentioned polkit-gnome-authentication-agent-1).

However, if you feel that a bug report would be appropriate, I'd be happy to report one, or you can do the same.

PCMan replied on bbs.archlinux.org regarding this (I posted the same thread as here), but it didn't help much:
PCMan at bbs.archlinux.org wrote:You need launch policy-kit-gnome to do the authentication for you.
In modern Linux it's not possible to work completely without policy-kit.
It's a pain, but it seems to be inevitable.
I hate gnome component, too. However, currently there is no other alternatives, unless you want to use the one provided by kde.
karabaja4
Posts: 11
Joined: Wed Dec 31, 2008 12:23 am

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by karabaja4 »

I found the problem (kinda). For some reason polkit refuses to acknowledge the action permission marked as "active" as the action that is needed to mount the drives with pcmanfm 0.9.2. Anyway, the solution is to edit the file:
/usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy
and replace in each category this line:
<allow_any>no</allow_any>
with this one:
<allow_any>yes</allow_any>
I'd rather that I don't have to touch the "any" line, but I tried to modify active/inactive settings, it doesn't seem to have an effect.

>>>

IMPORTANT: After some testing I discovered one more thing: it seems that after this move you don't need gnome authentication agent or the polkit-gnome package at all so you can remove it :D You also don't need to have consolekit session running (ck-launch-session).

To sum things up, the things you need are dbus session in .xinitrc (described in the first post), GVFS (obviously) and the above permission changed.
grogers3.14
Posts: 8
Joined: Fri Jan 29, 2010 6:27 pm

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by grogers3.14 »

I just added 2 packages tp the AUR which you may like. One is gvfs-lite, which is gvfs with few dependencies, and gnome-mount-lite, because pcmanfm would not mount my drives without it. Hope you like them!

gvfs-lite http://aur.archlinux.org/packages.php?ID=36042
gnome-mount-lite http://aur.archlinux.org/packages.php?ID=36041
karabaja4
Posts: 11
Joined: Wed Dec 31, 2008 12:23 am

Re: Help configuring GVFS with pcmanfm 0.9.2 - not authorized

Post by karabaja4 »

grogers3.14 wrote:I just added 2 packages tp the AUR which you may like. One is gvfs-lite, which is gvfs with few dependencies, and gnome-mount-lite, because pcmanfm would not mount my drives without it. Hope you like them!

gvfs-lite http://aur.archlinux.org/packages.php?ID=36042
gnome-mount-lite http://aur.archlinux.org/packages.php?ID=36041
Thanks so much for this!

Just a note, it seems that gnome-mount is using HAL to mount the drives, it would be better if we could avoid that component because HAL will soon become deprecated...

EDIT: nevermind, I just saw u added gnome-disk-utility instead of gnome-mount as a dependency... So we can remove the gnome-mount-lite package? ;)

EDIT2: something's wrong. I still get gnome-mount missing error with your gvfs-lite and gnome-disk-utility from the repo..

EDIT3: Something's missing from your gvfs-lite PKGBUILD that's causing the gnome-mount error. I just wrote a new one following the template from official gvfs PKGBUILD, now it works for me. I have no idea what exactly was the problem with your version (at least on my configuration), but I'm too lazy to try to find out.

EDIT4: I did a few experiments on gvfs without dependencies. Turns out you must be careful what you exclude. Some of these dependencies we threw out are needed for support on CD drivers, FTP remote folders, Bluetooth devices etc. You must only exclude what you don't need, excluding everything is not such a good idea.
Locked