ubuntu and privilege elevation in i3wm

Solution 1:

Elevation uses several components:

  • the program must be running in a ConsoleKit or systemd-logind session – ideally, all of your X11 programs should be in the same session.

    If your distribution uses systemd, run loginctl show-session "$XDG_SESSION_ID" and look for "State=active".

    Otherwise, run ck-list-sessions and verify that it shows your X11 session as both "local = TRUE" and "active = TRUE".

  • the session must have a PolicyKit agent – this is the piece of software that displays elevation prompts.

    Run /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 and see if it helps.

To test elevation, you can use pkexec /bin/sh or pkaction.

Solution 2:

AFAIK, privilege elevation has nothing to do with the window manager. Use gksudo for GUI apps that require root privileges.

For example:

gksudo synaptic &