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 X11R4
dmxchangescreensattributes
DMXChangeScreensAttributes(3X)DMXChangeScreensAttributes(3X)NAME
DMXChangeScreensAttributes - change back-end screen attributes
SYNOPSIS
#include <X11/extensions/dmxext.h>
int DMXChangeScreensAttributes(Display *dpy,
int screen_count,
int *screens,
int mask_count,
unsigned int *masks,
DMXScreenAttributes *attr,
int *error_screen);
DESCRIPTION
DMXChangeScreensAttributes() changes the geometries and positions of the DMX screen and DMX root windows on the back-end X servers.
screen_count specifies the number of screens to be changed. For each screen, the screen number is placed in screens, an attribute mask is
placed in masks, and a DMXScreenAttributes structure is included in attr.
An explanation of the DMXScreenAttributes structure is given in DMXGetScreenAttributes(3X).
The values that are used to compute each value in masks are as follows
DMXScreenWindowWidth
DMXScreenWindowHeight
DMXScreenWindowXoffset
DMXScreenWindowYoffset
DMXRootWindowWidth
DMXRootWindowHeight
DMXRootWindowXoffset
DMXRootWindowYoffset
DMXRootWindowXorigin
DMXRootWindowYorigin
In general, mask_count should be equal to screen_count. However, as a convenience, mask_count may be less than screen_count, and the last
entry in masks will then be used for all of the remaining screens. For example, this allows identical changes to be made to several
screens using only one mask.
RETURN VALUE
On success, 0 is returned. Otherwise, error_screen is set to the value of the first screen in the list that caused the error and a non-
zero value is returned. If screen_count or mask_count is less than 1, or if any of the attribute values are not within the appropriate
bounding boxes, DmxBadValue is returned. If a protocol error occurs, DmxBadReply is returned.
DMXChangeScreensAttributes() can generate BadLength (if the data provided does not match the data implicitly required by the screen_count
and mask_count values), BadValue (if the values in screens are not valid), and BadAlloc errors.
SEE ALSO DMXGetScreenCount(3X), DMXGetScreenAttributes(3X), DMX(3X), Xdmx(1)X Version 11 libdmx 1.0.2 DMXChangeScreensAttributes(3X)