[SOLVED] usb automount in thunar as unprivileged user
Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
[SOLVED] usb automount in thunar as unprivileged user
Hi there,
my new system is installed and it runs fine.
So only one question is unsolved.
How does the filemanager thunar automount usb devices for unprivileged users?
Usbmount, udisks2, gvfs-packages are installed.
Thank you for an answer.
eat64sgs
my new system is installed and it runs fine.
So only one question is unsolved.
How does the filemanager thunar automount usb devices for unprivileged users?
Usbmount, udisks2, gvfs-packages are installed.
Thank you for an answer.
eat64sgs
Last edited by eat64sgs on Thu Jan 14, 2016 7:01 pm, edited 2 times in total.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
You need 1) consolekit installed
and 2) a magic line in your xinitrc:
exec dbus-launch startxfce4 --with-ck-launch
and 2) a magic line in your xinitrc:
exec dbus-launch startxfce4 --with-ck-launch
..gnutella..
Re: usb automount in thunar as unprivileged user
Hello machinebacon,
thanks for your answer.
Unfortunately it doesn't work.
I get following message:
'Not authorized to perform operation
(polkit authority not available and caller is not uid 0).'
Openbox is my windowmanager. The magig line in my .xinitrc is:
'exec dbus-launch --with-ck-launch --exit-with-session openbox-session'
What can I do?
eat64sgs
thanks for your answer.
Unfortunately it doesn't work.
I get following message:
'Not authorized to perform operation
(polkit authority not available and caller is not uid 0).'
Openbox is my windowmanager. The magig line in my .xinitrc is:
'exec dbus-launch --with-ck-launch --exit-with-session openbox-session'
What can I do?
eat64sgs
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
Hi eat62sgs,
then you need the magic in /etc/polkit-1 and in /usr/share/polkit-1/actions
http://crunchbang.org/forums/viewtopic.php?id=34355 (achtung achtung, long read)
Before you waste your time, try adding thunar-volman (and log in again) -- maybe this fixes it already. Though, I remember it was a serious PITA to fool policykit/consolekit/dbus/whatchacallit
If this also fails, you have four alternatives:
- use "sudo automount" to mount them all
- create entries in your /etc/fstab for you USB drives
- install pmount and run it as root like "sudo pmount /dev/sdc"
- install systemd and let it take care of the elevated privileges
- use a login manager (lightdm), however, I don't remember/know if this will fix it (still)
I would simply do it manually with pmount. If the USB drive is one you often use, stick its entry into /etc/fstab
then you need the magic in /etc/polkit-1 and in /usr/share/polkit-1/actions
http://crunchbang.org/forums/viewtopic.php?id=34355 (achtung achtung, long read)
Before you waste your time, try adding thunar-volman (and log in again) -- maybe this fixes it already. Though, I remember it was a serious PITA to fool policykit/consolekit/dbus/whatchacallit
If this also fails, you have four alternatives:
- use "sudo automount" to mount them all
- create entries in your /etc/fstab for you USB drives
- install pmount and run it as root like "sudo pmount /dev/sdc"
- install systemd and let it take care of the elevated privileges
- use a login manager (lightdm), however, I don't remember/know if this will fix it (still)
I would simply do it manually with pmount. If the USB drive is one you often use, stick its entry into /etc/fstab
..gnutella..
Re: usb automount in thunar as unprivileged user
Sorry
/offtopic
Seriously Julius how can you all this o.O
Mightily impressed!
/offtopic
cheerio
simon
/offtopic
Seriously Julius how can you all this o.O
Mightily impressed!
/offtopic
cheerio
simon
Someone told me that I am delusional, I almost fell off my unicorn.
Re: usb automount in thunar as unprivileged user
Oh yeah,
a lot of work.
I will see how I solve it and rewrite.
eat64sgs
a lot of work.
I will see how I solve it and rewrite.
eat64sgs
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
It has always been problematic, if you check google and enter the error message you'll see that it happens everywhere from Arch to Zenwalk.
..gnutella..
Re: usb automount in thunar as unprivileged user
^ This and I *personally* wouldn't use Thunar on a non-bloated system.machinebacon wrote:
I would simply do it manually with pmount. If the USB drive is one you often use, stick its entry into /etc/fstab
Thunar comes *standard* with things like the XFCE4 Panel etc.
Sure you can disable some things, but if you're in doubt you could be hooked up with some stuff that you don't need.
I don't mean to be offensive, but Thunar isn't that lightweight compared to other graphical alternatives (pcmanfm or rox-filer).
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
To each his own, but we have to get a fact straight: Thunar has ho dependency on xfce4-panel or any other 'module' of the xfce4 desktop, apart from a shared library (that is needed for a optional integration of notification daemon or volume management applet)
Of course the best is to simply use coreutils.
Code: Select all
user@grill:~$ depends thunar
thunar
Depends: libatk1.0-0
Depends: libc6
Depends: libcairo2
Depends: libdbus-1-3
Depends: libdbus-glib-1-2
Depends: libexo-1-0
Depends: libgdk-pixbuf2.0-0
Depends: libglib2.0-0
Depends: libgtk2.0-0
Depends: libgudev-1.0-0
Depends: libice6
Depends: libnotify4
Depends: libpango-1.0-0
Depends: libsm6
Depends: libthunarx-2-0
Depends: libxfce4ui-1-0
Depends: libxfce4util7
Depends: libxfconf-0-2
Depends: thunar-data
Depends: desktop-file-utils
Depends: shared-mime-info
Depends: exo-utils
user@grill:~$ depends pcmanfm
pcmanfm
Depends: libatk1.0-0
Depends: libc6
Depends: libcairo2
Depends: libfm-gtk4
Depends: libfm4
Depends: libfontconfig1
Depends: libfreetype6
Depends: libgdk-pixbuf2.0-0
Depends: libglib2.0-0
Depends: libgtk2.0-0
Depends: libpango-1.0-0
Depends: libpangocairo-1.0-0
Depends: libpangoft2-1.0-0
Depends: libx11-6
..gnutella..
Re: usb automount in thunar as unprivileged user
I'm glad that it isn't so with linuxbbq, but I'm 100% sure that you'll get the xfce4-panel with the standard 'sudo apt-get install thunar' in a netinstall with Ubuntu ;)
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: usb automount in thunar as unprivileged user
^ likely something to do with the apt prefs. --no-install-recommends as default in BBQ. ;)
Re: usb automount in thunar as unprivileged user
well at least this is a good example of the amount of additional stuff dumped on your system as soon as you step away from the commandline, even for something as simple as file management. to each his own, indeed, and you use what makes you most comfortable.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: usb automount in thunar as unprivileged user
wux is right. xfce4-panel is a recommended package for thunar in both ubuntu and debian.
http://packages.ubuntu.com/wily/thunar
https://packages.debian.org/jessie/thunar
One more reason to disable recommends.
http://packages.ubuntu.com/wily/thunar
https://packages.debian.org/jessie/thunar
One more reason to disable recommends.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
"apt-cache depends thunar" shows the full list. BBQ is set up to not install recommends. This is the BBQ forums, so I was under the impression the OP will use LinuxBBQ ;)
..gnutella..
Re: usb automount in thunar as unprivileged user
My apologies, it was more that I stay away from such things because of the dependencies that other ditros seems to like ;)
Ofcourse it's each of his/her own (that's why I put a *personally* in the first message), but I tried to be helpfull to the OP.
Thunar isn't bad, but I thought it can be handy to call other lighter graphical filemanagers.
I don't expect that a Nautilus or Thunar user to go straight to the coreutils (there are exeptions), that was more or less the idea behind the post.
Ofcourse it's each of his/her own (that's why I put a *personally* in the first message), but I tried to be helpfull to the OP.
Thunar isn't bad, but I thought it can be handy to call other lighter graphical filemanagers.
I don't expect that a Nautilus or Thunar user to go straight to the coreutils (there are exeptions), that was more or less the idea behind the post.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
Hello all,
thank you for your posts.
I think, my problem is not Thunar. I get the same message when I try to mount a usb stick with gvfs-mount or gigolo.
I can't also shutdown my system without password or with the login manager lightdm. I have always no permissions. So I can only shutdown with sudo.
Perhaps I need a special Policykit rule?
Have anybody ideas?
eat64sgs
thank you for your posts.
I think, my problem is not Thunar. I get the same message when I try to mount a usb stick with gvfs-mount or gigolo.
I can't also shutdown my system without password or with the login manager lightdm. I have always no permissions. So I can only shutdown with sudo.
Perhaps I need a special Policykit rule?
Have anybody ideas?
eat64sgs
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
..gnutella..
Re: usb automount in thunar as unprivileged user
Yes, it is.
On another Unstable system om my desltop PC there is no polkit rule, no udev rule and usbmount is not installed. And mounting works and shutdown from login manager (lightdm) too.
I also edited /etc/sudoers, /etc/shutdown.allow and created a rule in /etc/sudoers.d. But nothing helped to solve the problem.
eat64sgs
On another Unstable system om my desltop PC there is no polkit rule, no udev rule and usbmount is not installed. And mounting works and shutdown from login manager (lightdm) too.
I also edited /etc/sudoers, /etc/shutdown.allow and created a rule in /etc/sudoers.d. But nothing helped to solve the problem.
eat64sgs
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: usb automount in thunar as unprivileged user
Okay, so this is the (working) result - on top of a noX base install I first
and added this line at the bottom of ~/.xinitrc:
With startx I got to an ugly desktop, XFCE4 asked me if I want a panel, I picked the default one and opened a terminal:
opened Thunar, clicked Edit -> Preferences -> Advanced -> Enable Volume Management -> Clicked the blue
"Configure" (this opens thunar-volmand) and ticked the boxes for automatic mount etc.
then I rebooted, logged in, used startx again, and got to the desktop. Plugged in the USB drive and this happened:
I did not install xfdesktop4 and icons because I just wanted to make this shit work quickly. Adding it will make no difference in function. Power management (shutdown, reboot, hibernate, suspend) all work perfectly from the menu. No problems on the way. Good luck.
Nota bene:
xfce4-session needs x11-xserver-utils that pulls in gcc5
ck-launch-session is coming from consolekit
libpam-ck-connector needs libpam-runtime
policykit-1 needs dbus and also pulls in systemd via libpam-systemd
gvfs-* pulls in libgtk-3-0, just like policykit-1-gnome
There is no need for a lightdm, but it would work if you add one on top, for whatever reason.
A personal note:
Quite a lot of rubbish for something that can be scripted in bash and executed automatically. But that's just my opinion. And the reason we made LinuxBBQ.
I would also appreciate if you - as sign of respect and friendliness towards other users on this forums - post an introduction here: http://www.linuxbbq.org/bbs/viewforum.php?f=7
Code: Select all
sudo apt-get install dbus dbus-x11 xorg xinit xauth x11-xserver-utils xfwm4 xfce4-panel xfce4-session consolekit stterm # just wanted a quick unbloated terminal emulator
Code: Select all
exec dbus-launch startxfce4 --with-ck-launch
Code: Select all
sudo apt-get install thunar thunar-volman libpam-ck-connector policykit-1 libpam-mount udisks2 upower gvfs gvfs-bin gvfs-backends policykit-1-gnome
"Configure" (this opens thunar-volmand) and ticked the boxes for automatic mount etc.
then I rebooted, logged in, used startx again, and got to the desktop. Plugged in the USB drive and this happened:
I did not install xfdesktop4 and icons because I just wanted to make this shit work quickly. Adding it will make no difference in function. Power management (shutdown, reboot, hibernate, suspend) all work perfectly from the menu. No problems on the way. Good luck.
Nota bene:
xfce4-session needs x11-xserver-utils that pulls in gcc5
ck-launch-session is coming from consolekit
libpam-ck-connector needs libpam-runtime
policykit-1 needs dbus and also pulls in systemd via libpam-systemd
gvfs-* pulls in libgtk-3-0, just like policykit-1-gnome
There is no need for a lightdm, but it would work if you add one on top, for whatever reason.
A personal note:
Quite a lot of rubbish for something that can be scripted in bash and executed automatically. But that's just my opinion. And the reason we made LinuxBBQ.
I would also appreciate if you - as sign of respect and friendliness towards other users on this forums - post an introduction here: http://www.linuxbbq.org/bbs/viewforum.php?f=7
..gnutella..