public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Starting xterm as a DOS Command Prompt one-liner
@ 2020-11-26  9:08 Fergus Daly
  2020-11-28 14:14 ` Fergus Daly
  0 siblings, 1 reply; 2+ messages in thread
From: Fergus Daly @ 2020-11-26  9:08 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

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!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-28 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26  9:08 Starting xterm as a DOS Command Prompt one-liner Fergus Daly
2020-11-28 14:14 ` Fergus Daly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).