Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System Settings -> Actions Policy module missing
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Sun Sep 22, 2013 8:41 pm    Post subject: System Settings -> Actions Policy module missing Reply with quote

My system policies need tending (eg, it won't let me mount a USB drive). BUT the
module in system settings that does this ("Actions Policy") is missing.

I consulted the gentoo wiki, and added dbus, consolekit and policykit use flags
but since I use a desktop profile I assume these were already set. These three
daemons are running, they do a fine job of preventing me from mounting anything.
emerge -DNup world rebuilt nothing relevant.

Update: I verified that the policykit stack is working correctly:
Code:

jesnow@armstrong ~ $ pkaction --verbose --action-id org.freedesktop.udisks.filesystem-mount
org.freedesktop.udisks.filesystem-mount:
  description:       Mount a device
  message:           Authentication is required to mount the device
  vendor:            The udisks Project
  vendor_url:        http://udisks.freedesktop.org/
  icon:              drive-removable-media
  implicit any:      no
  implicit inactive: no
  implicit active:   yes


I just need to change this behavior but I can't.

Why is the module missing and how can I get it back?

I will not edit xml, period. Human-readable config files are for editing, thanks. You
migrate away from those, you have to provide a working editor.

Thanks to anyone who can help!
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Mon Sep 23, 2013 10:15 am    Post subject: Re: System Settings -> Actions Policy module missing Reply with quote

jesnow wrote:
My system policies need tending (eg, it won't let me mount a USB drive). BUT the
module in system settings that does this ("Actions Policy") is missing.

I consulted the gentoo wiki, and added dbus, consolekit and policykit use flags
but since I use a desktop profile I assume these were already set. These three
daemons are running, they do a fine job of preventing me from mounting anything.
emerge -DNup world rebuilt nothing relevant.

Update: I verified that the policykit stack is working correctly:
Code:

jesnow@armstrong ~ $ pkaction --verbose --action-id org.freedesktop.udisks.filesystem-mount
org.freedesktop.udisks.filesystem-mount:
  description:       Mount a device
  message:           Authentication is required to mount the device
  vendor:            The udisks Project
  vendor_url:        http://udisks.freedesktop.org/
  icon:              drive-removable-media
  implicit any:      no
  implicit inactive: no
  implicit active:   yes


I just need to change this behavior but I can't.

Why is the module missing and how can I get it back?

I will not edit xml, period. Human-readable config files are for editing, thanks. You
migrate away from those, you have to provide a working editor.

Thanks to anyone who can help!


You might be looking for the experimental kde-misc/polkit-kde-kcmodules package which modified the system PolicyKit's .xml files directly in /usr
Obviously nothing should be editing /usr and the module was never working properly
Imagine some package modifying anothers static (intended to be non-modifiable) files in /usr, that's quite serious Quality & Assurance violation

And it's not XML but JavaScript .rules files in /etc/polkit/rules.d/ for user customization -- this support was missing from the KCM module and that's why it's being removed from Portage, more information at:
http://bugs.kde.org/show_bug.cgi?id=308934
https://bugs.gentoo.org/show_bug.cgi?id=438790
https://bugs.gentoo.org/show_bug.cgi?id=480898

The package will still be available in kde-overlay for anyone who wants to use it despite the breakage in /usr it causes
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Mon Sep 23, 2013 1:36 pm    Post subject: Reply with quote

Aha, so that makes it easy, I just have to edit javascript, not xml.

All so simple.

So what do I do now?

All I want to do is mount a usb stick and I have to program in javascript to do it?

Seriously?
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Mon Sep 23, 2013 1:49 pm    Post subject: Reply with quote

Seriously.

Quoting from Bug 480898:

Quote:

Samuli Suominen 2013-09-14 19:40:19 UTC
(In reply to Chris Reffett from comment #5)
...
> kdelibs. Are users unable to edit polkit rules if this isn't installed? I
> wasn't aware of that.

They are not. They can write custom JavaScript .rules to /etc or install the polkit-pkla-compat and keep using the XML .pkla format
Both of which has working examples in manpages etc.


This is fucked up.
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Wed Sep 25, 2013 7:54 am    Post subject: Reply with quote

jesnow wrote:
Seriously.

Quoting from Bug 480898:

Quote:

Samuli Suominen 2013-09-14 19:40:19 UTC
(In reply to Chris Reffett from comment #5)
...
> kdelibs. Are users unable to edit polkit rules if this isn't installed? I
> wasn't aware of that.

They are not. They can write custom JavaScript .rules to /etc or install the polkit-pkla-compat and keep using the XML .pkla format
Both of which has working examples in manpages etc.


This is fucked up.


No desktop has graphical interface for the /etc/polkit-1 files, but you are in luck and this is open source for which anyone can write code for. I bet the KDE developers would be happy if someone wrote something working for http://bugs.kde.org/show_bug.cgi?id=308934

That sad, you don't need to write any .rules for the task you mentioned because ConsoleKit or systemd-logind will tell PolicyKit if the user is local or not and give authorization based on that. This is why it's not a high priority for desktop developers to write such graphical interface since it mostly just works out of box.

For OpenRC and ConsoleKit users, this is the important part:

$ ck-list-sessions |grep 'active = TRUE'
active = TRUE
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Sat Oct 19, 2013 7:06 pm    Post subject: Reply with quote

To close the loop, I followed the excellent guide to getting the whole thing to "just work"
authored by the previous poster.

https://forums.gentoo.org/viewtopic-t-858965.html

It is still pretty messed up that it's necessary to edit some pretty user-unfriendly code
to customize your system. One of the key advantages of linux used to be human readable
configuration files. the minute you go to xml or javascript for configuration, that's over.

But having it mostly "just work" is WAY better than the alternative.

Jon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum