2

When running as a normal user nm-applet doesn't allow me to select a wireless network saying "insufficient privileges". But I've edited the polkot policy file

/usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

to have <allow_any>yes</allow_any> for everything. To be extra sure I also have <allow_active>yes</allow_active> and <allow_inactive>yes</allow_inactive> as well.

All of this is on Fedora 17 (polkit-0.104, NetworkManager-0.9.4) without running gnome3, only gnome-settings-daemon.

polkitd, dbus-daemon and dbus-launch are all running. What can be the reason?

3
  • 2
    Which distro? Or at least give us which version of polkit and networkmanager you're running. They've changed a lot since their inception. Oct 19, 2012 at 13:52
  • 1
    Added version info: fedora 17 Oct 19, 2012 at 13:54
  • 2
    Turns out the solution is here: blog.falconindy.com/articles/… Manually starting X by startx and polkit are not cool together :) But you say "startx -- vt01" then everything will be fine. Oct 19, 2012 at 15:54

1 Answer 1

1

As outlined in the link, listed in a comment by the OP:

Turns out the solution is here: blog.falconindy.com/articles/… Manually starting X by startx and polkit are not cool together :) But you say "startx -- vt01" then everything will be fine. – Daniel Oct 19 '12 at 15:54

A number of issues may arise with authenticated sessions when the user starts the X server from the console with startx without any parameters; apparently, a new terminal is launched with the Xserver session, where the established authentication from within the console session is not "transferred" to the newly-created X-session.
As a result of this "loss of authentication", the unprivileged user is not allowed to "speak to privileged processes" and/or ask for authentication.

The suggested workaround is to start the X server from the console with the current VT number passed as a parameter, e.g.:

xinit -- vt01

This will cause xinit to start the X server within the same terminal (with the authenticated session), instead of launching a new TTY.

Similarly, according to a comment to that referenced article, systemd-logind puts the appropriate vt in the environment variable $XDG_VTNR; so, one might create a short script or alias to facilitate the correct xinit process by including

exec /usr/bin/X -nolisten tcp vt$XDG_VTNR "$@"

Note
Arch-linux's version of xorg-xinit includes this line by default as of xorg-xinit-1.3.2-3, according to the blog-post on blog.falconindy.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .