public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Starting a xterm window
@ 2017-06-09 10:14 Ugly Leper
  2017-06-23 14:50 ` Jon Turney
  0 siblings, 1 reply; 5+ messages in thread
From: Ugly Leper @ 2017-06-09 10:14 UTC (permalink / raw)
  To: cygwin

>> /usr/bin/xterm: Xt error: Can't open display: :0.0
>> /usr/bin/xterm: DISPLAY is not set

Thanks for all suggestions. Both the following fragments seem to work
flawlessly. Both incorporate a waiting time for XWin to gain traction
before xterm is called:

1. Starting a xterm console from a .cmd file in a Windows Command
Prompt box: include the lines

bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul
timeout 2 > nul 2> nul
bin\xterm -display :0.0

2. Starting a xterm console from a script in a bash (or mintty) shell:
include the lines

run XWin -clipboard -nolock -multiwindow 2>/dev/null &
sleep 2
/bin/xterm -display :0.0

You can vary the pause e.g. timeout 3 or sleep 4. Maybe as brief a
fuse as timeout 1 or sleep 1 will be adequate; but that would make me
nervy about getting the same failure as in >> at the top of this post.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Starting a xterm window
  2017-06-09 10:14 Starting a xterm window Ugly Leper
@ 2017-06-23 14:50 ` Jon Turney
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Turney @ 2017-06-23 14:50 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Ugly Leper

On 09/06/2017 11:14, Ugly Leper wrote:
>>> /usr/bin/xterm: Xt error: Can't open display: :0.0
>>> /usr/bin/xterm: DISPLAY is not set
> 
> Thanks for all suggestions. Both the following fragments seem to work
> flawlessly. Both incorporate a waiting time for XWin to gain traction
> before xterm is called:
> 
> 1. Starting a xterm console from a .cmd file in a Windows Command
> Prompt box: include the lines
> 
> bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul
> timeout 2 > nul 2> nul
> bin\xterm -display :0.0
> 
> 2. Starting a xterm console from a script in a bash (or mintty) shell:
> include the lines
> 
> run XWin -clipboard -nolock -multiwindow 2>/dev/null &
> sleep 2
> /bin/xterm -display :0.0
> 
> You can vary the pause e.g. timeout 3 or sleep 4. Maybe as brief a
> fuse as timeout 1 or sleep 1 will be adequate; but that would make me
> nervy about getting the same failure as in >> at the top of this post.

You could also write something like 'startxwin /usr/bin/xterm -- -nolock'

You might want to take a look at the manpages for xinit, startx, 
startxwin.  These are the standard tools for starting an X server and 
client(s), while allowing for the fact that the X server is not ready to 
accept connections instantly after being started.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Starting a xterm window
  2017-06-07 16:30 ` Hans-Bernhard Bröker
@ 2017-06-08 17:13   ` cyg Simple
  0 siblings, 0 replies; 5+ messages in thread
From: cyg Simple @ 2017-06-08 17:13 UTC (permalink / raw)
  To: cygwin

On 6/7/2017 12:29 PM, Hans-Bernhard Bröker wrote:
> Am 07.06.2017 um 17:18 schrieb Ugly Leper:
>> If I want to enter xterm straight from a Windows command prompt I try
>>
>> G:\> bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul &
>> G:\> bin\xterm -display :0.0
> 
> I'm less than convinced that the '&' at the end of the first command is
> a valid idea.
> 

Probably not since this is from a Windows CMD.

>> /usr/bin/xterm: Xt error: Can't open display: :0.0
>> /usr/bin/xterm: DISPLAY is not set
>>
>> Any ideas? (This used to work, it really did ...)
> 
> WFM, without the '&', and each line copy-pasted individually, so there's
> some time for X to start before its services are required.
> 

And you're using a Cygwin shell instead of a Windows shell.  That may be
more of an issue for the OP.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Starting a xterm window
  2017-06-07 15:18 Ugly Leper
@ 2017-06-07 16:30 ` Hans-Bernhard Bröker
  2017-06-08 17:13   ` cyg Simple
  0 siblings, 1 reply; 5+ messages in thread
From: Hans-Bernhard Bröker @ 2017-06-07 16:30 UTC (permalink / raw)
  To: cygwin

Am 07.06.2017 um 17:18 schrieb Ugly Leper:
 > If I want to enter xterm straight from a Windows command prompt I try
 >
 > G:\> bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul &
 > G:\> bin\xterm -display :0.0

I'm less than convinced that the '&' at the end of the first command is 
a valid idea.

 > /usr/bin/xterm: Xt error: Can't open display: :0.0
 > /usr/bin/xterm: DISPLAY is not set
 >
 > Any ideas? (This used to work, it really did ...)

WFM, without the '&', and each line copy-pasted individually, so there's 
some time for X to start before its services are required.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Starting a xterm window
@ 2017-06-07 15:18 Ugly Leper
  2017-06-07 16:30 ` Hans-Bernhard Bröker
  0 siblings, 1 reply; 5+ messages in thread
From: Ugly Leper @ 2017-06-07 15:18 UTC (permalink / raw)
  To: cygwin

Just getting a problem: this used to work but has stopped!
From within bash I can type

$ run XWin -clipboard -nolock -multiwindow 2>/dev/null &
$ /bin/xterm -display :0.0

and I am in a xterm window. Good; as intended.

If I want to enter xterm straight from a Windows command prompt I try

G:\> bin\run bin\XWin -clipboard -nolock -multiwindow 2>nul &
G:\> bin\xterm -display :0.0

but line 2 gives

/usr/bin/xterm: Xt error: Can't open display: :0.0
/usr/bin/xterm: DISPLAY is not set

Any ideas? (This used to work, it really did ...)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2017-06-23 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-09 10:14 Starting a xterm window Ugly Leper
2017-06-23 14:50 ` Jon Turney
  -- strict thread matches above, loose matches on Subject: below --
2017-06-07 15:18 Ugly Leper
2017-06-07 16:30 ` Hans-Bernhard Bröker
2017-06-08 17:13   ` cyg Simple

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