This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: 'run xterm' fails to open a window
Florent Fievez wrote:
2) to both Florent and Ken?
In addition to Gery Herbozo Jimenez's response and question to you,
( "Have you tried just starting the XWin server first and the the
xterm? it looks like the X server doesn't recognize that line
command." ),
a) Have you tried starting 'xterm' without 'run' ?
Yes, it works without problem but a cmd window remain and that is
annoying.
---
Maybe you can close the cmd window after it starts...
Yeah, still a pain...
To explain exactly my situation, I have a Windows cmd script
which try to launch a bash script.
---
I'm not a windows.cmd language expert, but....
SET DISPLAY=127.0.0.1:0.0
---
I don't know if it would make a difference, but I use
DISPLAY=":0" (I only have 1 display, so the extra ".0" should
be superfluous). But also ":0" should connect via a local socket
instead of using IP. Do you have any firewall products that could
be blocking traffic to or from 127.0.0.x?
if defined CYGWIN_ROOT goto :OK
set CYGWIN_ROOT=%~dp0
----
Not sure what ~dp0 is supposed to do. ??
:OK
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/bin
SET PATH=%CYGWIN_ROOT%\bin;%PATH%
%RUN% %CYGWIN_ROOT%\bin\bash /usr/local/bin/rxvtwin.sh %*
---
Is is possible to change that last line to:
%RUN% %CYGWIN_ROOT%\bin\bash -c "DISPLAY=:0 /usr/local/bin/rxvtwin.sh %* "
---that's all 1 line---
What does rxvtwin have in it?
Any reason not just to run it?
It looks like you are running the X server and the rxvt on the same
machine. You might want to look at 'minTTY'. It's a replacement
for the cmd.exe standard window that you can resize and set transparency
on -- i.e. it has more options, I think than rxvt.
It might be more what you want?
run %
-------------------------------
I call it in windows shortcut with a "user@host" as parameter and it
launch a rxvt terminal with a ssh session to the host and background
color depending on host.
If instead of "%RUN% %CYGWIN_ROOT%\bin\bash /usr/local/bin/rxvtwin.sh
%*" I launch "%CYGWIN_ROOT%\bin\bash /usr/local/bin/rxvtwin.sh %*", it
works.
So it seems to be really run which has an issue.
---
If it works locally but not under 'run', maybe you might try reporting
it on the main list -- as it doesn't seem to be strictly an X problem,
but some there might go "eewww, X" ... that belongs in cygwin-x! But
a bug in run is a bug in run... I have a feeling that
your DISPLAY variable isn't getting passed properly to your shellscript.
Another possibility -- get a non-X version of rvxt. I don't know if there is one in the main package base or not...I connected up to a french site with binaries other than the standard ones -- I might have pulled it down there -- has a neat 'server-client' version of rxvt as well --
launch 1 serer, an then each client takes about 200K/client.
Do either of you know what display 'XWin' started itself on?
Yes my server is running on display 0.0 and I specify it in DISPLAY
environment variable.
(I specified it in both bash and cmd script since I don't know if
environment is inherited by bash process when I run it)
----
does your logfile in /var/log/Xwin...(something) also confirm
that it opened the 0.0 display?
I'm not sure your rvxt script is getting DISPLAY -- maybe you
could echo DISPLAY out to a file? i.e. inside rxvt.sh -- put in an
"echo $DISPLAY>/tmp/my_rxvt.out" (or some place where you can store it
temporarily)...see if it stores the value you think it is storing.
Maybe try putting DISPLAY=":0" in the script?
for cygwin path='C:\cygwin':
C:\cygwin\bin\bash.exe -c 'DISPLAY=:0 xterm'
or C:\cygwin\bash\bash.exe -c 'xterm -display :0'
for cygwin path= 'C:\': (my value)
C:\bin\bash.exe -c 'DISPLAY=:0 xterm'
or C:\bash\bash.exe -c 'xterm -display :0'
The above two commands work on WinXP and Vista using cygwin1.5
It don't work as I expected since what I have explained before.
---
I thought you said it DID work? Oh...the above also
is assuming your PATH variable has already included /usr/bin under
your cygwin dir.
Hopefully, something will help...:-)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/