How annoying is this: You need to make changes to your
menu order and gmenu won\’t allow you to do it. You need to be
logged in as root and that means opening an xterm and
su\’ing as root then launching the app. Well, there
is hope and its called \”consolehelper\”. This application uses
PAM and a GUI dialog box to ask for the root password. This makes
using those admin type apps convienient to use from the GUI.
Here\’s how its done.

  1. Locate the application binary.
  2. Move it to another place, i.e /usr/sbin/
    instead of usr/bin
  3. In the application binaries\’ original directory make a
    symbolic link from the binary name to
    /usr/bin/consolehelper. e.g ln -s
    /usr/bin/consolehelper gmenu
  4. Go to /etc/pam.d and create a file with the
    same name as the binary application, i.e touch
    gmenu
  5. Open the file with your editor of choice (use VIM! Its got
    that mountain fresh scent!), and add these lines to the file:

    #%PAM-1.0
    auth       sufficient   /lib/security/pam_rootok.so
    auth       required     /lib/security/pam_pwdb.so
    session    optional     /lib/security/pam_xauth.so
    account    required     /lib/security/pam_permit.so
    

  6. Now go to /etc/security/console.apps directory
    and create another file with the same name as the application
    binary. e.g touch gmenu
  7. Add these lines to the file:
    
    USER=root
    PROGRAM=/path/to/application/binary/
    SESSION=true
    FALLBACK=true
    

Thats all there is to it. Now when you click on the icon for the
application, consolehelper will actually run first and ask for roots
password if you are not root.