You are not logged in.

#1 2012-11-04 15:14:28

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

[solved] Unable to mount drives with thunar

Hi,
after a recent update the drives in the thunar side panel ceased to show up. Mounting as root works fine.
I have thunar-volman, polkit... and gvfs installed and up to date. I do not know how the mechanism works, but I thought these might help to locate the problem:

udevadm monitor (on plugging in):

KERNEL[788.414652] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0 (scsi)
KERNEL[788.414721] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0 (scsi)
KERNEL[788.414944] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0 (scsi_disk)
KERNEL[788.414987] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
KERNEL[788.415036] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/bsg/5:0:0:0 (bsg)
UDEV  [788.418060] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0 (scsi)
KERNEL[788.418115] add      /devices/virtual/bdi/8:16 (bdi)
UDEV  [788.421127] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0 (scsi)
UDEV  [788.421741] add      /devices/virtual/bdi/8:16 (bdi)
UDEV  [788.422329] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0 (scsi_disk)
UDEV  [788.423152] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
UDEV  [788.424107] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/bsg/5:0:0:0 (bsg)
KERNEL[789.624464] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/block/sdb (block)
KERNEL[789.624536] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/block/sdb/sdb1 (block)
UDEV  [789.823378] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/block/sdb (block)
UDEV  [789.944891] add      /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host5/target5:0:0/5:0:0:0/block/sdb/sdb1 (block)

/etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-override.pkla (I am in the storage group):

[storage group mount override]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Can anyone give me a hint where the problem could be hidden? Or where to find more information on this "show drives in side panel"-mechanism?

Last edited by CommanderCool (2012-11-06 21:54:49)

Offline

#2 2012-11-04 15:46:07

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 91
Website

Re: [solved] Unable to mount drives with thunar

try this:

[Mount a system-internal device]
Identity=*
Action=org.freedesktop.udisks2.filesystem-mount-system-internal
ResultActive=yes

Offline

#3 2012-11-04 16:07:07

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

Re: [solved] Unable to mount drives with thunar

That change has no effect.

Offline

#4 2012-11-04 16:51:21

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: [solved] Unable to mount drives with thunar

I don't use Thunar .... so I'm afraid I can't help with that.
But I wanted to point out that since you're using the latest polkit ( as you mentioned ), the old pkla files won't work.
The new polkit uses "rules" files written in javascript.

So, for example, since I wanted to mount internal drives as normal user, I created  /etc/polkit-1/rules.d/10-auth.rules with the following content :

 polkit.addRule(function(action, subject) {
               if (action.id="org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("storage")) {
                       return polkit.Result.YES;
                   }
               }
           );

This takes effect immediately, and I can mount internal drives in e.g. Nautilus without authentication.

Again, the main point is that old pkla files won't work anymore.

Offline

#5 2012-11-04 16:54:51

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

Re: [solved] Unable to mount drives with thunar

That is quite a useful piece of information. I will look into that later when I have time. Thanks so far.

Offline

#6 2012-11-04 20:51:05

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] Unable to mount drives with thunar

Have you seen this?
https://www.archlinux.org/news/consolek … by-logind/

I suspect you are not properly logged in.  What is the output of the following?  Is it similar to what's listed below?

$ loginctl list-sessions
   SESSION        UID USER             SEAT            
         1       1000 <yourself>              seat0
$ loginctl session-status 1
1 - <yourself> (1000)
           Since: Sun, 2012-11-04 08:35:21 MST; 5h 12min ago
          Leader: 575 (slim)
            Seat: seat0; vc7
         Display: :0.0
          Remote: user root
         Service: slim; type x11; class user
           State: active
          CGroup: name=systemd:/user/<yourself>/1
                  ├   575 /usr/bin/slim -d
                  ├   997 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/x...
                  ├  1007 /usr/bin/dbus-launch --sh-syntax --exit-with-sessi...
                  ├  1008 /usr/bin/dbus-daemon --fork --print-pid 6 --print-...
                  ├  1013 /usr/bin/pulseaudio --start
                  ├  1020 /usr/lib/pulse/gconf-helper
                  ├  1022 /usr/lib/GConf/gconfd-2
                  ├  1030 xfce4-session
                  ├  1033 /usr/lib/xfce4/xfconf/xfconfd
                  ├  1036 /usr/bin/gpg-agent --sh --daemon --enable-ssh-supp...
                  ├  1039 xfce4-panel --display :0.0 --sm-client-id 26c9eaf7...
                  ├  1040 xfsettingsd --display :0.0 --sm-client-id 2095747e...
                  ├  1041 xfdesktop --display :0.0 --sm-client-id 290770c3d-...
                  ├  1051 /usr/lib/gvfs/gvfsd
                  ├  1056 xfce4-power-manager --restart --sm-client-id 2861b...
                  ├  1078 /usr/bin/python2 /usr/bin/fusion-icon
                  ├  1081 /usr/lib/gvfs//gvfsd-fuse -f /run/user/1000/gvfs
                  ├  1095 /usr/bin/tpb -d
                  ├  1098 /bin/bash /home/dkb/lightsOn.sh
                  ├  1113 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
                  ├  1159 /usr/lib/polkit-gnome/polkit-gnome-authentication-...
                  ├  1162 xfce4-power-manager
                  ├  1169 /usr/lib/gvfs/gvfsd-trash --spawner :1.9 /org/gtk/...
                  ├  1206 /usr/lib/at-spi2-core/at-spi-bus-launcher
                  ├  1243 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/ac...
                  ├  1250 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnom...
                  ├  1257 /usr/lib/xfce4/panel/wrapper /usr/lib/xfce4/panel/...
                  ├  1262 /usr/lib/xfce4/panel/wrapper /usr/lib/xfce4/panel/...
                  ├  1263 /usr/lib/xfce4/panel-plugins/xfce4-orageclock-plug...
                  ├  1266 compiz --replace --sm-disable --ignore-desktop-hin...
                  ├  1269 emerald --replace
                  ├  1569 /usr/lib/gvfs/gvfsd-network --spawner :1.9 /org/gt...
                  ├  1574 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.9 /org/gtk/...
                  ├  1863 dbus-launch --autolaunch 8fc091c727ff7fa918c76aae0...
                  ├  1864 /usr/bin/dbus-daemon --fork --print-pid 5 --print-...
                  ├  1872 /usr/lib/gvfs/gvfsd
                  ├  1876 /usr/lib/gvfs//gvfsd-fuse -f /root/.gvfs
                  ├  1888 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
                  ├  1903 /usr/lib/dconf/dconf-service
                  ├ 15254 /usr/lib/opera/opera
                  ├ 15480 /usr/bin/Terminal
                  ├ 15482 gnome-pty-helper
                  ├ 15483 bash
                  ├ 15645 sleep 50
                  ├ 15676 loginctl session-status 1
                  └ 15677 less
(END)

Offline

#7 2012-11-06 17:32:42

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

Re: [solved] Unable to mount drives with thunar

Thanks for your reply. I seem to be logged in correctly as far as I understand:

1 - ccool (1000)
           Since: Tue, 2012-11-06 17:43:59 CET; 24min ago
          Leader: 640 (slim)
            Seat: seat0; vc7
         Display: :0.0
          Remote: user root
         Service: slim; type x11; class user
           State: active
          CGroup: name=systemd:/user/ccool/1
                  ├  640 /usr/bin/slim -nodaemon
                  ├ 2713 /usr/bin/openbox --startup /usr/lib/openbox/openbox-...
                  ├ 2729 volumeicon -b
                  ├ 2804 /usr/bin/python2 -O /usr/share/wicd/gtk/wicd-client....
                  ├ 2805 /usr/lib/polkit-gnome/polkit-gnome-authentication-ag...
                  ├ 2904 dbus-launch --autolaunch 9ee8650173b18cadf4f19399000...
                  ├ 2905 /usr/bin/dbus-daemon --fork --print-pid 5 --print-ad...
                  ├ 2907 /usr/lib/at-spi2-core/at-spi-bus-launcher
                  ├ 2911 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/acce...
                  ├ 2914 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-...
                  ├ 2942 /usr/lib/xfce4/xfconf/xfconfd
                  ├ 2945 /usr/lib/gvfs/gvfsd
                  ├ 2949 /usr/lib/gvfs//gvfsd-fuse -f /run/user/1000/gvfs
                  ├ 9076 lxterminal
                  ├ 9077 gnome-pty-helper
                  ├ 9078 /bin/bash
                  ├ 9628 loginctl session-status 1
                  └ 9629 less

Concerning opensrcrox's post I was not successful with the mentioned rule. I suppose it is less a problem of mounting permissions (I had that one before; that is why I created the .pkla in the first place) but more a problem of the drives not showing up.

In a potentially related matter, I am running another machine with a very similar setup, where all mountable devices appear double in the side panel of thunar.

I am actually a little lost here. Maybe it has something to do with me changing to systemd recently?

Last edited by CommanderCool (2012-11-06 18:02:51)

Offline

#8 2012-11-06 17:40:02

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: [solved] Unable to mount drives with thunar

As far as the double icons in the side panel, this has been common and you might get hints here: https://bbs.archlinux.org/viewtopic.php?id=151856&p=2


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#9 2012-11-06 18:02:06

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

Re: [solved] Unable to mount drives with thunar

Ok, I checked that double icons problem and it was resolved as indicated in the mentioned post. Back to the original problem.

Offline

#10 2012-11-06 18:06:35

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [solved] Unable to mount drives with thunar

don't use these crappy polkit rules, they are nothing but a workaround.
CommanderCool, please post your slim.conf and ~/.xinitrc.

Offline

#11 2012-11-06 18:24:36

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: [solved] Unable to mount drives with thunar

lol .. the "crappy" rules are sometimes too much of an inconvenience ... but occasionally unavoidable.
CommanderCool .... you listed your original pkla .... but you didn't mention which udisks you have currently installed.
The reason I'm asking is your loginctl status doesn't show gvfs-udisks2-volume-monitor .....
That could be part of the problem.

Offline

#12 2012-11-06 18:30:20

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: [solved] Unable to mount drives with thunar

@ opensrcrox:  In his OP he states he has gvfs installed and that pulls in udisks2.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#13 2012-11-06 18:35:25

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [solved] Unable to mount drives with thunar

opensrcrox wrote:

lol .. the "crappy" rules are sometimes too much of an inconvenience ... but occasionally unavoidable.

your rule makes it possible for a user in the storage group (which should not be used anymore) to mount internal drives. Why would you want to use udisks to mount internal drives? Why not just use fstab?
These kind of rules are one of the reason why so many people have permission problems since the switch to logind. Instead of actually fixing the problem by setting up the user session properly they used polkit rules to work around the problem.

Offline

#14 2012-11-06 18:36:18

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: [solved] Unable to mount drives with thunar

bgc1954 , indeed ... but I'm curious as to why his gvfs-udisks2-volume-monitor isn't listed in the loginctl status output.
The journal should provide some clues ....

Offline

#15 2012-11-06 18:39:49

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: [solved] Unable to mount drives with thunar

It doesn't in mine either and I'm running thunar as I post this.  Maybe CommanderCool check this post for some other ideas: https://bbs.archlinux.org/viewtopic.php … 5#p1188775

Edit: @65kid, I'm glad you agree on /etc/fstab settings. wink

Last edited by bgc1954 (2012-11-06 18:41:25)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#16 2012-11-06 18:50:09

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: [solved] Unable to mount drives with thunar

65kid .... I'm with you on that whole authentication maelstrom.
In my case, I used "wheel" instead of "storage", specifically because I had to quickly come up with a "hack" to make it work using a couple of
examples in the polkit man page. 
I substituted "storage" in the rule because the OP mentioned he's in the storage group.
fstab is obviously more convenient.

Offline

#17 2012-11-06 21:54:16

CommanderCool
Member
Registered: 2012-09-05
Posts: 29

Re: [solved] Unable to mount drives with thunar

.xinitrc:

exec openbox-session

As I tried out just now, adding dbus-launch resolves the issue. I once commented that out (as supposed to?).
I will mark this as solved, but is there a better solution? Should I post anything else?
Also, is there anything wrong with using udisks for usb drives?
Thanks to all of you anyways.

slim.conf:

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        ./:/bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments   -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth 

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	yes

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce4,icewm,wmaker,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host, master.

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       System halting...
reboot_msg         System rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        icono

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
focus_password      yes

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       parallel-dimensions

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

Offline

#18 2012-11-06 22:05:18

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [solved] Unable to mount drives with thunar

it's usually better to remove dbus-launch and use the the .xinitrc from /etc/skel/.xinitrc (part of xorg-xinit). It contains a loop to execute all files in /etc/X11/xinit/xinirc.d/, which also contains a file to launch dbus.

using udisks is fine, my discussion with opensrcrox was about using udisks for something that it is not supposed to be used for (mounting internal drives). wink

Offline

Board footer

Powered by FluxBB