You are not logged in.

#1 2019-04-12 12:34:29

konikoko
Member
Registered: 2019-04-12
Posts: 2

Thunar won't mount hdd: Not authorized to perform operation

Hi everyone,

I installed arch a couple of days ago and I have a problem with thunar.
I can't mount my hard disks from within the file manager.
I have the following things installed:
- i3wm, thunar, thunar-volman (I can mount usb without any problems)
I don't have a login manager. I use startx.

Here is my .xinit file:

#!/bin/sh

udiskie -2 &
numlockx &
exec i3

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

What I tried so far after googling and searching in the arch wiki and the forums:

  • Installing polkit, lxsession (for lxpolkit), udiskie and udisks2

  • udiskie permissions - creating the file listed but only with the udisks2 options

  • Adding udiskie -2 & to my xinit file

I don't want the disk to mount on boot. Only when I choose so in thunar.
If I understand it correctly, I think polkit should ask me for a password when trying to mount the disk
(or is it lxpolkit?). Should I put lxpolkit & in my xinit?

here is the output for lsblk -f:

sda                                                                            
├─sda1 vfat                            B42A-958C                                           
├─sda2                                                                         
└─sda3 ntfs                            68943DCC943D9E0E                                    
sdb                                                                            
└─sdb1 ntfs   Harde schijf     06288CC2288CB1EB                                    
sdc                                                                            
├─sdc1 vfat                            6348-D89F                           
├─sdc2 swap                          c811688a-3604-4a9b-a0cd-ce3f5114b0d1                
└─sdc3 ext4                           361f76a1-e537-48cc-9b49-d4ec81af42cb  
sdd                                                                            
└─sdd1 ext4   WD-320GB       be7bdda7-1497-4556-803e-1cc95549d0ca                
sde                                                                            
└─sde1 vfat   ARCH_201904   0C15-D73B                               
sr0     

it's the WD-320GB disk that I want to mount in thunar. 

                                     
Sorry if the problem is due to me not reading the wiki thoroughly.
Thanks in advance,

Offline

#2 2019-04-12 13:06:50

Skunky
Member
Registered: 2018-01-25
Posts: 230

Re: Thunar won't mount hdd: Not authorized to perform operation

Hi take a look at gvfs

Offline

#3 2019-04-12 13:11:16

seth
Member
Registered: 2012-09-03
Posts: 52,114

Re: Thunar won't mount hdd: Not authorized to perform operation

First and foremost fix your xinitrc, https://wiki.archlinux.org/index.php/Xinit#xinitrc (see  the second blue note)
Since however this is an internal disk, you'll require a polkit agent (or alter the mounting rules)

Is automounting on accessing the mount path an option? (add "noauto,x-systemd.automount" as options in fstab)

Online

#4 2019-04-12 13:11:49

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: Thunar won't mount hdd: Not authorized to perform operation

mounting ntfs needs root permission. you can see mounting any filesystem except ntfs needs password.
See here: https://bbs.archlinux.org/viewtopic.php … 6#p1839046
you need to add exec lxpolkit (not sure may its in /usr/lib/lxpolkit-1/) to your i3 startup file, then you'll get the password asking dialog on disk mount.

Last edited by mmdamin (2019-04-12 13:14:36)

Offline

#5 2019-04-12 13:13:44

seth
Member
Registered: 2012-09-03
Posts: 52,114

Re: Thunar won't mount hdd: Not authorized to perform operation

sdd                                                                            
└─sdd1 ext4   WD-320GB       be7bdda7-1497-4556-803e-1cc95549d0ca                

it's the WD-320GB disk that I want to mount in thunar.

Online

#6 2019-04-12 13:24:12

konikoko
Member
Registered: 2019-04-12
Posts: 2

Re: Thunar won't mount hdd: Not authorized to perform operation

mmdamin wrote:

mounting ntfs needs root permission. you can see mounting any filesystem except ntfs needs password.
See here: https://bbs.archlinux.org/viewtopic.php … 6#p1839046
you need to add exec lxpolkit (not sure may its in /usr/lib/lxpolkit-1/) to your i3 startup file, then you'll get the password asking dialog on disk mount.

this did the trick: I added

lxpolkit & 

to my .xinitrc file

Thanks!

seth wrote:

First and foremost fix your xinitrc, https://wiki.archlinux.org/index.php/Xinit#xinitrc (see  the second blue note)
Since however this is an internal disk, you'll require a polkit agent (or alter the mounting rules)

Thanks for pointing out my wrong .xinitrc file.
I added (what I think is) the last if block in /etc/X11/xinit/xinitrc
My .xinitrc looks like this now:

#!/bin/sh

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi


lxpolkit &
udiskie -2 &
numlockx &
exec i3

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

Is this correct? (I think it is but just making sure)

Thanks everyone for replying!

Offline

#7 2019-04-12 13:26:31

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Thunar won't mount hdd: Not authorized to perform operation

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB