Thank you very much neutronscott for your help, this has worked like a charm. Looks like I was way off. Thanks again.
There's just many different ways it can be solved. Instead of keeping a PID file (my original trial) I just ask screen if the session is running. It makes it so elegant, eh?
Thanks for the Thanks!
---------- Post updated 06-23-11 at 09:50 AM ---------- Previous update was 06-22-11 at 02:13 PM ----------
Oh man, I couldn't sleep last night because I was thinking I didn't test all cases. So first thing today I run 'chkscreen' while attached to 'server1' session and I was right. bug
Sorry. Using '-r' checks if there is a session you can attach to, which is false if you're already attached.
So change
to read
And it shouldn't start extra servers when you're viewing the screen anymore. Sorry.
This User Gave Thanks to neutronscott For This Post:
hi all
How can I make a program start up automatically after the computer restart/startup in fedora?
something like:
... Establish a shell then run some of command code.
Thanks for Help!! (1 Reply)
I need a shell script to kill apache and restart it, in case the number of processes keeps growing. The logic is like the below, but I don't know how to get the number and neither the syntax. Could somebody kindly help?
if no_of_processes (ps ax ¦ grep httpd) > 200
then
killall httpd... (14 Replies)
I'm wondering how I should make a script that can start, stop, and restart another script.
What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH,... (7 Replies)
Hi All,
is there a way or script that i can check my AIX 5.3 OS will restart before i made restart? is there a script that can check all the startup files are ok before restarting. it is because i was stuck last time when i restart my PC because some startup files were missing:o. (2 Replies)
Please anyone tell me
In my last interview the HR asks me how to monitor, start,stop & kill the various processes and subprocesses.
Please anyone explain me clearly. It's my personal request (3 Replies)
Is there any functional difference between:
issuing separate stop/start commands like this;
super (handler) (instance) stop
super (handler) (instance) start
versus issuing a single recycle command like this;
super (handler) (instance) restart (3 Replies)
Hi all
I have networker running on a RHEL 5.7 and over time it hangs. So the solution backup team proposed is to check if the process is hung, to stop and start it.
Unfortunately for me, the rc script only allows three commands, start, stop and status (no restart option) so I managed to set... (15 Replies)
Hello,
I'l like to create a script that restart a service (/etc/init.d/httpd restart) and also check if after restart the service is actually running. Sometimes it happen that at the first try the service fails to restart.
Thanks (2 Replies)
Discussion started by: bazzola
2 Replies
LEARN ABOUT SUSE
gnome-session-save
GNOME-SESSION-SAVE(1) General Commands Manual GNOME-SESSION-SAVE(1)NAME
gnome-session-save - Saves or ends the current GNOME session
SYNOPSIS
gnome-session-save [--logout] [--force-logout] [--logout-dialog] [--shutdown-dialog] [--gui] [--kill [--silent]]
DESCRIPTION
gnome-session-save can be used from a GNOME session to save a snapshot of the currently running applications. This session will be later
restored at your next GNOME session.
The --gui option will report errors in dialog boxes instead of printing to stderr.
If called with the --logout option, the current GNOME session will be ended, unless logging out has been inhibited by an application. The
--force-logout option can be used to end the session regardless of the inhibition state.
When the --logout-dialog option is given, the standard dialog displaying logout options is displayed. When --shutdown-dialog option is
given, the standard dialog displaying shutdown options is displayed.
The --kill and --silent options are deprecated. The --kill option is equivalent to the --logout-dialog option. If --silent is used with
--kill, then it will behave as if --logout was used.
The session is not saved when gnome-session-save is called with any of the options ending the session.
SEE ALSO gnome-session(1)BUGS
If you find bugs in the gnome-session-save program, please report these on http://bugzilla.gnome.org.
GNOME GNOME-SESSION-SAVE(1)