<snip> > > Sure, display :0 is unavailable; checking DISPLAY in the (unwanted) > xterm shows DISPLAY is set to :5. Why's that I wonder? > > Further investigation shows ls -ltr /tmp: > > -r--r--r-- 1 william None 11 Nov 28 17:43 /tmp/.X0-lock > -r--r--r-- 1 william None 11 Dec 13 17:43 /tmp/.X1-lock > -r--r--r-- 1 william None 11 Dec 13 17:55 /tmp/.X2-lock > -r--r--r-- 1 william None 11 Dec 13 19:22 /tmp/.X3-lock > -r--r--r-- 1 william None 11 Dec 15 16:53 /tmp/.X4-lock > -r--r--r-- 1 william None 11 Dec 15 17:00 /tmp/.X5-lock > > Interesting. It looks like every time I start an X session a lock > file is created and doesn't get deleted, so the display number keeps > changing. This doesn't look right, so how do I avoid it? > > -- > Will
What I do is specify the display on the command line. If it fails, I check for an existing operational session with the same display. If it exists, I simply exit the script. If not, I free the lock file and retry the X server start on the chosen display. -- Erik -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
