The Computer Oracle

ubuntu and privilege elevation in i3wm

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Switch On Looping

--

Chapters
00:00 Ubuntu And Privilege Elevation In I3wm
00:56 Answer 1 Score 1
01:13 Accepted Answer Score 9
01:59 Answer 3 Score 0
02:20 Thank you

--

Full question
https://superuser.com/questions/389397/u...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ubuntu #privileges

#avk47



ACCEPTED ANSWER

Score 9


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.




ANSWER 2

Score 1


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

For example:

gksudo synaptic &



ANSWER 3

Score 0


A more recent answer could be to install lxpolkit.

sudo apt-get install lxpolkit

And then add the following to your ~/.config/i3/config:

exec --no-startup-id lxpolkit

A similar approach may work with other authentication agents listed here https://wiki.archlinux.org/title/Polkit#Authentication_agents

source: https://www.reddit.com/r/i3wm/comments/chjnng/how_do_i_fix_authentication_agent_in_i3wm/