Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

gksu: Turn warning back on

Problem

Gksu (yes, the long-gone program throws a notice message if you have sudo NOPASSWD access, indicating you were able to do this operation without a password/authentication. And if you check the box to hide this notice in the future, you won't ever see again.

Solution

Use gconftool-2 to control it. Apparently the gksu uses the slightly-less-deprecated gconf idea (binary registry, sounds familiar? And now replaced with dconf which is different somehow?).

Show the current status.

gconftool-2 --get /apps/gksu/display-no-pass-info

Turn the warnings back on.

 gconftool-2 --set /apps/gksu/display-no-pass-info --type boolean true

Backstory

I was checking on one of my favorite utilities, xdgmenumaker, and it is authored by a guy named gapan. Well, one of his other pinned repositories is salixtools-gtk, which had a nifty user management program. I was setting up a system for an offsite user who will have to manage local users, and I found salixtools-gtk's gtkusersetup program really nice.

I learned that it takes a user with access to /etc/shadow so either a member of Debian group shadow, or some setgid business, or sudo. Or, as the .desktop file for that project suggets, gksu. Which I had forgotten about; I don't normally use root functions from a graphical environment so hadn't needed it. But of course all good things must have ended before I came around, because now "they" want you to use policykit or other loennart-level dumb things.

I got really scared when I couldn't find a ~/.config file for gksu anywhere. Come to find out it's buried in some binary thingy (worse than the xfce4 xml files that only update upon a normal exiting of xfce4) that you can't just use Unixy tools to control. I forget exactly how I learned it was gconf. I think I used strace to read what it was doing or maybe got lucky examining other possible places on my $HOME filesystem. I shouldn't have to search so hard.

Comments