You are not logged in.

#1 2015-02-17 23:07:15

Link64
Member
Registered: 2015-02-10
Posts: 10

[SOLVED] Unable to mount drives with Thunar / udisks2

Hello everyone,

I recently tried to install arch on my laptop with windows installed as a dual-boot. However everything worked fine and I came around most problems with the help of the wiki (I am still an absolute newbie).

Right now I am just trying to optimize my system for me, and since there are many shared files on an NTFS partition of my hard drive and also since I am really lazy and don't want to mount it as root and then drag the files from the drive to my home directory and then give change the owner from root back to myself and everything, I thought I could probaply use udisks2 within thunar to make it easier for me to access data on that drive.

Anyways, after reading the wiki article about udisks I also installed polkit and set up a 50-udiskie.rules file like that:

polkit.addRule(function(action,subject) { 
 if(action.id == "org.freedesktop.udisks2.filesystem-mount" ||
    action.id == "org.freedesktop.udisks2.encrypted-unlock" ||
    action.id == "org.freedesktop.udisks2.eject-media" ||
    action.id == "org.freedesktop.udisks2.power-off-drive" ||
    action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" ||
    action.id == "org.freedesktop.udisks2.encrypted-unlock-other-seat" ||
    action.id == "org.freedesktop.udisks2.eject-media-other-seat" ||
    action.id == "org.freedesktop.udisks2.power-off-drive-other-seat"
   {
    return polkit.Result.YES;
   }
});

That one kinda works, but somehow, it doesn't. Whenever I reboot my system I have to manually restart polkit and udisks2 using systemctl to apply those rules (At least it looks like that for me). After doing that, the problem is gone, that it tells me that I have "No permission to perform this operation."

Whenever I worked around this error by restarting the services, I get the next one. Thunar tells me that there is "No object for D-Bus interface." This does not happen to devices (of any compatible file system) that were just plugged in on a USB-port. It only happens on my  two additional internal partitions.

Thank you in advance for the help and I hope I get my problems solved. tongue


------------------------
Another thing that may have nothing to do with this but kinda confuses me is, that after installing polkit, xfce did not allow me to shutdown anymore. So did systemctl shutdown and everything. After rebooting as root, this problem is just gone but I have never added a rule for that yikes

Last edited by Link64 (2015-02-18 11:07:12)

Offline

#2 2015-02-18 09:24:05

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [SOLVED] Unable to mount drives with Thunar / udisks2

Link64 wrote:

after reading the wiki article about udisks I also installed polkit and set up a 50-udiskie.rules file like that:...

Where did you find this polkit rule? Because in the wiki I see a '/etc/polkit-1/rules.d/50-udisks.rules' which is different than the one you posted.
If you don't use udiskie, the name of the rule is just '50-udisks.rules', but at the udiskie site, the rule is also different from the one you posted, so...
This rule is only needed if you are in a non-active session:

$ loginctl show-session $XDG_SESSION_ID|grep Active
Active=yes

If you use systemd logind, this should be already the case and the '50-udisks.rules' should not be necessary.
Can you give details about these points please?

Offline

#3 2015-02-18 11:06:57

Link64
Member
Registered: 2015-02-10
Posts: 10

Re: [SOLVED] Unable to mount drives with Thunar / udisks2

Okay. I've found the udiskie policies in its own git, where I've been redirected somewhere. Anyways, it works now with the right filename and action-ids. I didn't expect the file name to be relevant. Anyways, thank you, this should be considered as solved.

Would you please give me a link or something to a relevant article that describes the way polkit works for a beginner? Thanks.

Offline

Board footer

Powered by FluxBB