This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Starting a xterm window
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Cc: Ugly Leper <ugly dot leper at gmail dot com>
- Date: Fri, 23 Jun 2017 15:50:16 +0100
- Subject: Re: Starting a xterm window
- Authentication-results: sourceware.org; auth=none
- References: <CAKqBF1jvZT1ZT30Wcj7x6_o83e4F2Wc2MCpW_o+cwrzVh_V=TQ@mail.gmail.com>
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