Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use i3wm (www.i3wm.org) as the window manager for ubuntu 11.10 x64.

it seems that whatever piece of magic that controls elevation is not functioning properly. It's not an issue with i3wm perse, but rather something provided by gnome and unity that im missing, and need to implement manually.

example:

in unity, if i run software center, i am prompted for my admin password, and everything works as expected. in i3wm, running software center does not prompt, and thus i cant install anything. (unless i do sudo software-center from the CLI)

is there some process / application i should be using to have apps ask for admin passwords when required?

it'd be great to get that bit of functionality in i3.

share|improve this question
    
Is this still unanswered? –  mloskot Jun 8 '12 at 9:23

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
:) adam@wtfhax:~$ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 (polkit-gnome-authentication-agent-1:9795): polkit-gnome-1-WARNING **: Failed to register client: The name org.gnome.SessionManager was not provided by any .service files –  adam Feb 13 '12 at 17:00
    
ah, that works just fine actually. i tried doing some administrative stuff while that command was running, and was prompted as expected. adding /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 to my xinitrc solved the problem permanently :) thank you! –  adam Feb 13 '12 at 17:52
    
@adam: Be careful with adding stuff to xinitrc like that. It is best when all programs run inside the same CK session, including the agents. –  grawity Feb 13 '12 at 18:02
2  
i actually thought about that, and added it to the .i3/config file, and had it run at login. –  adam Feb 13 '12 at 20:56

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

For example:

gksudo synaptic &
share|improve this answer
    
that much makes sense, but i3wm has a nice launcher (mod+d) that i use to fire up software, and afaik, i cant modify it to call things in such a way. –  adam Feb 13 '12 at 16:57
    
I highly doubt you can't modify it, specially if it's open source. And if you can't modify how software is launched, it's horrible. Even Windows allows that... –  m0skit0 Feb 13 '12 at 18:57
1  
@adam mod+d and then type in gksudo synaptic hit ENTER and you'll be prompted for password. All works like charm. –  mloskot Mar 13 '13 at 23:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.