public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Is there a one-liner to start a xterm window (and close XWin at the end of the session)?
@ 2020-07-17 12:48 Fergus Daly
  2020-07-17 13:03 ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: Fergus Daly @ 2020-07-17 12:48 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: Fergus Daly

At the moment I initiate a xterm session with a 4-line cmd script at the Cygwin root directory as follows:
@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
Not wishing to mend what isn't broken, can anybody recommend a slicker opener (and closer)?
(All the lines, and all their components, seem to be essential.
Line 1 is a necessary precursor. Line 2 induces an apparently essential pause.
Line 3 opens the xterm session, which can then be progressed to its conclusion.
At which: resumption of the cmd script at line 4 kills the now redundant XWin session.
Thus guaranteeing a neat finish with no straggling processes.)
Thank you for any easement! A one-liner would be perfect.
Fergus  

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

* Re: Is there a one-liner to start a xterm window (and close XWin at the end of the session)?
  2020-07-17 12:48 Is there a one-liner to start a xterm window (and close XWin at the end of the session)? Fergus Daly
@ 2020-07-17 13:03 ` Jon Turney
  2020-07-17 14:46   ` Fergus Daly
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Turney @ 2020-07-17 13:03 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Fergus Daly

On 17/07/2020 13:48, Fergus Daly via Cygwin wrote:
> At the moment I initiate a xterm session with a 4-line cmd script at the Cygwin root directory as follows:
> @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
> Not wishing to mend what isn't broken, can anybody recommend a slicker opener (and closer)?
> (All the lines, and all their components, seem to be essential.
> Line 1 is a necessary precursor. Line 2 induces an apparently essential pause.
> Line 3 opens the xterm session, which can then be progressed to its conclusion.
> At which: resumption of the cmd script at line 4 kills the now redundant XWin session.
> Thus guaranteeing a neat finish with no straggling processes.)
> Thank you for any easement! A one-liner would be perfect.

"xinit /usr/bin/xterm -- -nolock -multiwindow"

(Although you might want to use startx instead, as perhaps that will 
behave better if an X server is already running for display :0)

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

* RE: Is there a one-liner to start a xterm window (and close XWin at the end of the session)?
  2020-07-17 13:03 ` Jon Turney
@ 2020-07-17 14:46   ` Fergus Daly
  2020-07-17 18:02     ` Bob McGowan
  0 siblings, 1 reply; 4+ messages in thread
From: Fergus Daly @ 2020-07-17 14:46 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Fergus Daly, Jon Turney

On 17/07/2020 13:48, Fergus Daly via Cygwin wrote:
>> At the moment I initiate a xterm session with a 4-line cmd script at the Cygwin root directory as follows:
>> @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
>> Not wishing to mend what isn't broken, can anybody recommend a slicker opener (and closer)?
>> (All the lines, and all their components, seem to be essential.
>> Line 1 is a necessary precursor. Line 2 induces an apparently essential pause.
>> Line 3 opens the xterm session, which can then be progressed to its conclusion.
>> At which: resumption of the cmd script at line 4 kills the now redundant XWin session.
>> Thus guaranteeing a neat finish with no straggling processes.)
>> Thank you for any easement! A one-liner would be perfect.

Jon Turney replied:

> "xinit /usr/bin/xterm -- -nolock -multiwindow"
> (Although you might want to use startx instead, as perhaps that will 
> behave better if an X server is already running for display :0)

Thank you! This works beautifully at the bash prompt without all the hassle
about on-ing and off-ing XWin so it is already a great easement.

So I tried rewriting as a one-line cmd script* at the Cygwin root directory:
@bin\xinit.exe bin\xterm -- -nolock -multiwindow
(and then variations beginning with start / run) and got an error message ending in:
bin/xinit: giving up
bin/xinit: unable to connect to X server: Connection refused
bin/xinit: server error

Is there some way I can incorporate your one line  into a Windows command single line
that starts the xterm process, rather than the 4-line Windows script at the top of this post? 

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

* Re: Is there a one-liner to start a xterm window (and close XWin at the end of the session)?
  2020-07-17 14:46   ` Fergus Daly
@ 2020-07-17 18:02     ` Bob McGowan
  0 siblings, 0 replies; 4+ messages in thread
From: Bob McGowan @ 2020-07-17 18:02 UTC (permalink / raw)
  To: cygwin

On 7/17/20 7:46 AM, Fergus Daly via Cygwin wrote:
> On 17/07/2020 13:48, Fergus Daly via Cygwin wrote:
>>> At the moment I initiate a xterm session with a 4-line cmd script at the Cygwin root directory as follows:
>>> @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
>>> Not wishing to mend what isn't broken, can anybody recommend a slicker opener (and closer)?
>>> (All the lines, and all their components, seem to be essential.
>>> Line 1 is a necessary precursor. Line 2 induces an apparently essential pause.
>>> Line 3 opens the xterm session, which can then be progressed to its conclusion.
>>> At which: resumption of the cmd script at line 4 kills the now redundant XWin session.
>>> Thus guaranteeing a neat finish with no straggling processes.)
>>> Thank you for any easement! A one-liner would be perfect.
> 
> Jon Turney replied:
> 
>> "xinit /usr/bin/xterm -- -nolock -multiwindow"
>> (Although you might want to use startx instead, as perhaps that will
>> behave better if an X server is already running for display :0)
> 
> Thank you! This works beautifully at the bash prompt without all the hassle
> about on-ing and off-ing XWin so it is already a great easement.
> 
> So I tried rewriting as a one-line cmd script* at the Cygwin root directory:
> @bin\xinit.exe bin\xterm -- -nolock -multiwindow
> (and then variations beginning with start / run) and got an error message ending in:
> bin/xinit: giving up
> bin/xinit: unable to connect to X server: Connection refused
> bin/xinit: server error
> 
> Is there some way I can incorporate your one line  into a Windows command single line
> that starts the xterm process, rather than the 4-line Windows script at the top of this post?
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
> 
You might try using forward slashes for the Cygwin portion of the command:

   @bin\xinit.exe bin/xterm -- -nolock -multiwindow
                     ^
Bob

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

end of thread, other threads:[~2020-07-17 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 12:48 Is there a one-liner to start a xterm window (and close XWin at the end of the session)? Fergus Daly
2020-07-17 13:03 ` Jon Turney
2020-07-17 14:46   ` Fergus Daly
2020-07-17 18:02     ` Bob McGowan

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).