You are not logged in.
Pages: 1
Please excuse me, if this is a double post.
I have Arch on Openbox. Installed it few days ago. I couldn't get Thunar to open other partitions. Looking in these forums and googling, I did the following;
I created the file /etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-overide-pkla and put the following in it.
[storage group mount override]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Rebooted, but Thunar still didn't open other partitions, stating that I am not allowed to as the user.
Then, reading this, http://lgogua.blogspot.com/2014/11/how- … t-not.html?, I added the following to the file /etc/polkit-1/rules.d
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks") == 0) {
return polkit.Result.YES;
}
});
This immediately opened the other partitions in Thunar, without rebooting.
The file /etc/polkit-1/50-default.rules look like this now,
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
// DO NOT EDIT THIS FILE, it will be overwritten on update
//
// Default rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks") == 0) {
return polkit.Result.YES;
}
});
I am not really supposed to edit that file, for the next upgrade would change it, but Thunar opened the other partitions for now. If you guys can show me a way, how to open open other partitions with Thunar, without changing the file /etc/polkit-1/50-default.rules, I'd be much obliged. I am new to Arch.
I have gvfs, thunar-volman installed. Thank you.
Last edited by chdslv (2015-08-27 15:48:05)
Offline
'/etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-overide-pkla' should have been:
'/etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-overide.pkla'
But this format is no longer used by polkit which now uses .rules files written in javascript language.
That's why this is without effect, and you can delete this file entirely, it is useless.
As polkit will read all the *.rules files in '/etc/polkit-1/rules.d', you could write what you need in a new .rules file.
Call it for example '/etc/polkit-1/rules.d/60-unlock-udisks2.rules':
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
//
// Unlock all udisks2 actions for everybody
//
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks") == 0) {
return polkit.Result.YES;
}
});In fact this works for udisks2 too, because the test 'action.id.indexOf("org.freedesktop.udisks") == 0' means
the action.id string begins with "org.freedesktop.udisks" and
this is the case for udisks2 where the action.id string begins with "org.freedesktop.udisks2",
so it also begins with "org.freedesktop.udisks".
Doing this, you open the door to any actions done using udisks2 by anybody on your machine. This is not very secure.
But it works.
Normally this should not be required with systemd-logind, polkit and udisks2 default configuration;
and being in an Active session. So maybe there is another way to solve your issue...
Last edited by berbae (2015-08-27 15:13:31)
Offline
Thank you very much berbae for trying to help me.
This--/etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-overide-pkla--was a writing mistake. Actually, there was a . between override & pkla.
Anyway, I took your advice in the other thread and deleted .pkla file, together with the localauthority folder, and deleted the lines I copied into /etc/polkit-1/rules.d.
I existed the openbox to see what hadn't started, and I had found I had written /usr/lib/polkit-1-gnome/polkit-gnome-authentication-agent-1 &, instead of /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &, so I corrected that. Now, the other partitions open, but with asking for my password, which quite alright by me. Problem solved.
Thank you, berbae! ![]()
Offline
Pages: 1