PDA

View Full Version : Gnome panel launcher with root privileges?



SiriusStarr
28th July 2008, 08:54 PM
Hi all,

Quick question: How can I make a panel launcher prompt for the root password and then run an app as root, e.g. the system menu items that require authentication? I want to create a launcher for IPBlock, but it has to be started as root, and I can't figure it out. It sounds like Fedora doesn't have a gksu, so how can I do this?

Thanks,
Sirius

n0ize
29th July 2008, 02:02 AM
in terminal:


su
cd /usr/bin
ln -s consolehelper ipblock

create the file /etc/pam.d/ipblock and insert:


#%PAM-1.0
auth include config-util
account include config-util
session include config-util

create the file /etc/security/console.apps/ipblock and insert:


USER=root
PROGRAM=/usr/sbin/ipblock
SESSION=true

now u can start ipblock with the cmd: ipblock -g
it'll automatically open a root login window for u.

hf ;)