Starting xterm as a DOS Command Prompt one-liner
Fergus Daly
fergusd84@outlook.com
Sat Nov 28 14:14:44 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, ..
As a trivial postscript: starting xterm from Windows with the single line
above is as frugal a start-up as any I have come across: ps gives
PID PPID PGID WINPID TTY UID STIME COMMAND
1122 1121 1122 7232 pty0 197609 13:57:34 /usr/bin/ps
1120 1 1120 12216 cons0 197609 13:57:32 /usr/bin/xterm
1115 1 1115 11964 ? 197609 13:57:30 /usr/bin/XWin
1121 1120 1121 4228 pty0 197609 13:57:32 /usr/bin/bash
i.e. just 1 x bash + 1 x XWin + 1 x xterm.
Even the one-line xterm startup
$ xinit xterm -- -nolock -multiwindow
from a bash shell, recently shared here, gives the somewhat lengthy
PID PPID PGID WINPID TTY UID STIME COMMAND
1745 1739 1745 3548 ? 197609 14:01:42 /usr/bin/xterm
1740 1739 1740 6564 cons0 197609 14:01:41 /usr/bin/XWin
1737 1 1737 10976 cons0 197609 13:59:39 /usr/bin/bash
1739 1737 1739 12004 cons0 197609 14:01:41 /usr/bin/xinit
1748 1747 1748 6800 pty1 197609 14:01:44 /usr/bin/ps
1746 1745 1746 10316 pty0 197609 14:01:42 /usr/bin/xterm
1747 1746 1747 8820 pty1 197609 14:01:42 /usr/bin/bash
i.e. 2 x bash + 1 x xinit + 1 x XWin + 2 x xterm.
BTW the switch -clipboard is redundant in the proffered line above, its omission
rendering the sequence shorter still.
More information about the Cygwin
mailing list