This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: closing xfree86


>From a script, you might try :

ps | grep Xwin | sed 's/ *\([0-9]*\).*/kill \1/' | sh

in english, that is :
get a process list
pull out the line that has Xwin
use sed to find the first unber in a list, and print "kill #"
send that output to sh

Or, you might try :

Xwin.exe -commands &
XWINPID=$!
...
...
kill $XWINPID

What that does, is stores the PID of the last executed program. ($! is a bash
variable for that).  Then, as long as you have the XWINPID in your scope, you
can use it to kill the Xwin server.

Hope these 2 options help
Brian



--- Shane Shields <locutusenterprises@yahoo.com> wrote:
> we are using the startxwin.bat to open xfree, start an
> ssh session on a linux server and run a program
> remotely. when the ssh session finishes the x server
> on the windows machine respawns leaving a background x
> window (full screen). does anyone know how to stop
> that respawn. In linux you can do a killall -SIGTERM X
> in a script but I cant find an equivalent in windows.
> 
> can anyone help?
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]