Starting xterm as a DOS Command Prompt one-liner

Fergus Daly fergusd84@outlook.com
Thu Nov 26 09:08:46 GMT 2020


This one-line DOS command to start an xterm terminal:
D:\cygwin> bin\run bin\XWin -clipboard -nolock -multiwindow 2> nul & 
timeout 4 > nul 2> nul & 
bin\xterm -display :0.0 2> nul & 
bin\kill -KILL -- -1
(broken here after each "&" for clarity of presentation only) works, and is a
neat and convenient alternative to starting xterm at the bash or mintty prompt
with the single line
$ /bin/xinit /bin/xterm -- -nolock -multiwindow 2> /dev/null
(The "> nul" phrases in all the above just suppress notifications.)
Question 1:
I find the timeout .. chunk necessary to give XWin enough time to load
before the xterm .. chunk draws upon it.
Is there a different conjunction to "&" that says "wait till this is
enacted before moving on" (which is actually what I thought "&" did!)?
Question 2:
The final kill .. chunk only operates after the xterm terminal is closed,
and its purpose is to kill XWin, which otherwise hangs about.
Is there some other way of assuring that the un-needed XWin is killed,
maybe (I dunno) by adding a qualifier to the initial "run XWin" chunk?
Thank you!



More information about the Cygwin mailing list