Re: NEWBIE : Detect and restart closed apps.
- From: "Jacques Basteyns" <eurolysine.cp@xxxxxxxxxx>
- Date: Fri, 3 Nov 2006 15:53:11 +0100
"Greg Hackney" <hackney@xxxxxxxxxx> wrote in message
news:Gqq2h.199$Mw.171@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jacques Basteyns wrote:display
Say that on the server we start the Xclock app (as an example) for
on each ThinClient.
$ Xclock -update 1 -display <IP address of client_1> &
$ Xclock -update 1 -display <IP address of client_2> &
$ Xclock -update 1 -display <IP address of client_3> &
ps output shows 3 Xclock process then 2 when one user close the app.
This is fine but we cannot tell which user has close the app.
#!/bin/sh
USERS="user1 user2 user3"
SLEEPTIME=600
while true
do
for i in $USERS
do
PID="`pgrep -U $i Xclock`"
if [ $? -ne 0 ]
then
echo run program to start $i
fi
done
sleep $SLEEPTIME
done
This works when you have 3 users issuing each the xclock start command.
But it fails if only one user(at the server) is issuing it 3 time (to
display xclock on each ThinClient)
as if we had USERS="UniqueUser" in above script. That's the problem we try
to solve.
Anyway, thanks for your interest.
JBA
.
- Follow-Ups:
- Re: NEWBIE : Detect and restart closed apps.
- From: Greg Hackney
- Re: NEWBIE : Detect and restart closed apps.
- References:
- NEWBIE : Detect and restart closed apps.
- From: Jacques Basteyns
- Re: NEWBIE : Detect and restart closed apps.
- From: Greg Hackney
- NEWBIE : Detect and restart closed apps.
- Prev by Date: Re: Hello world program loads unused Oracle SO libraries
- Next by Date: Re: Ok...............where is my Opera Browser?
- Previous by thread: Re: NEWBIE : Detect and restart closed apps.
- Next by thread: Re: NEWBIE : Detect and restart closed apps.
- Index(es):