I had that all set up, but maybe it's incorrect. There may be a blank missing or needed in the part about firestarter.
Here's what I have in sudoers:
Code:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Users can start the firewall with no password
bigbird ALL=NOPASSWD:/usr/sbin/firestarter
shelelia ALL=NOPASSWD:/usr/sbin/firestarter
My user is bigbird. It is a member of the admin group.
Here's part of what's in my $HOME/.kde/Autostart/mystart script which does all my startup stuff.
Code:
ps -f -u "$USER" > "$PS" # the -f is necessary because most of the restores are done by kdeinit and the
# actual name of the application being restored just shows up as an argument
## Desktop Independent stuff
## Start the Firewall
sleep 10 ## Give Wifi a small chance to start up first
if [[ ! $(grep "firestarter" ${PS}) ]]
then
kstart --iconify --skiptaskbar kdesudo "/usr/sbin/firestarter --starthidden"
fi
That works except for the --starthidden part. That's probably one of those weird quoting issues in bash.
If I take the quotes off, then kdesudo grabs the --starthidden option and complains that it doesn't exist.
If I can't fix the problem, I just won't run the gui unless I need to configure a new application, etc..
I found out that $home/.kde/shutdown is the place to put scripts for kde to run when it's closing (although I saw at least one comment saying that it doesn't work.)
What I don't know how to do is to close the firestarter gui from a script. It has a command line option that stops the firewall, but it doesn't close it and the gui keeps running.
I could use ps to get its pid and then kill it, but that doesn't sound like a very good idea to do on a regular basis and it would still have to be rigged somehow to run as root - preferably without asking me for a password every time I want to log out or shutdown. It all seems to come back to getting sudoers to work right.
Any ideas would be appreciated.
Joe