firestarter and kde4
I have kde set to restore my previous session when I login.
In my kde Autostart directory, I have a script that sleeps for a short while to let kde restore my session and then checks to see if firestarter is running. If not, it starts it using kdesudo. Everything works fine except that every time I login I get two pop up windows. One says that firestarter can't start without root privileges and the other says that kdesudo is being run with no arguments. This is occurring as part of kde restoring my session - before my autostart script kicks in - like kde is treating the kdesudo process and the firestarter process separately. Once I close these two windows, everything, including autostart starting firestarter, works fine. I'm open to any solution to this. What I thought I would do to fix this was to write a script to shutdown firestarter when I logout so that kde wouldn't try to restore it. Code:
#!/bin/bash 1) Where is the best place to put it? I tried putting it in ~/.kde/shutdown, but that didn't do anything. 2) Since it needs root permissions to shutdown firestarter, it needs to run when kdesudo still has access to my screen and time for me to type in a password. It also has to fail gracefully if I don't enter the password. TIA Joe kubuntu karmic/firestarter 1.0.3/kde 4.3.5 |
I don't know anything about kubuntu, but does it have an /etc/rc.d/rc6.d shutdown script? That's where your script should go. Wherever kubuntu has its shutdown script.
|
Not sure that's the problem
I want to preface this reply with the fact that I'm pretty green with respect to startup/shutdown scripts.
In general, you're right that a system level utility like a firewall should be handled by init scripts. There's a k20firestarter script in /etc/rc6.d and an s20firestarter in /etc/rc3.d But, I don't think that's the issue. If it was, wouldn't there be some sort of shutdown or boot up error condition? Is there something I should look for? I'm not really sure, but I think firestarter itself is getting started and shutdown correctly at the system level through the init scripts. What I'm doing (or trying to do) at the user level is to start the gui part that puts the firestarter icon in my task bar in my panel and lets me interact with firestarter. That's the part that kde sees. I don't think it is concerned - or even knows about anything in the init scripts. And, if there was a problem at that level, I don't think it would put anything on my user screen. It would show up in the system logs/dmesg, etc.. Please correct me if I am wrong or just looking in the wrong places, etc.. Joe |
|
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 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 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 |
All times are GMT -5. The time now is 03:36 PM. |