This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 'run xterm' fails to open a window


Florent Fievez wrote:
I've exactly the same issue, so if you find a solution, please post it ! ;-) 2009/11/3 Ken Brown <kbrown@cornell.edu> wrote::
"'run xterm' fails to pen a window":
I don't know if this is a problem with run, or xterm, or something else. ...
Obviously I have no good reason to want to start an xterm via 'run xterm' in
an xterm window, but this issue is causing problems in a script I'm writing.
[Briefly, I have a desktop shortcut with target '\path\to\run.exe bash -c
foo.sh'. The script foo.sh calls xterm, which starts with no visible
window, exactly as above.]
---

I have two responses, 1, mostly to Florent Fieves, the other to both
Florent, and Ken Brown who wrote that he also has the problem


1) to Florent Fievee, (you don't need to answer if you have no good
reason, but if you do, I'm curious as to your reasoning) -- Why did you copy Ken's complete note as into your response, when you
simply has to say "me too"?



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' ?

b) I see you have started 'Xwin'. Do either of you know what display
'XWin' started itself on? If you specified no value, it probably created the display ":0.0".


     If you then open a 'client' program that needs to attach to your
    Xwin display, "you" need to ensure that the new client knows what
     "X display" your client connects to (usually, ":0.0").  A well
     behaved X client won't make assumptions about what display to use.

If you were running entirely under *nix, any X clients you opened
afterwards would use the the display passed in the Environment via
'DISPLAY'. However, both of you appear to be starting Xwin with
no preset value of 'DISPLAY' AND passing >>NO<< (of DISPLAY) to the 'X client' program, 'xterm', in order to tell it
what 'X display' to use.



You both appear to be doing the same thing. You both start an Xserver
in background (which is normal and what I do as well). You then appear
to be starting a client ('xterm'), in a separate "session" (an empty
Xsession, with no display). In order for an X client to display to an Xserver, it needs to know what display to open it's output window
on.


Suggestions: 1) Don't use the cygwin command 'run.exe' unless you are
calling Windows programs.


 2) Explicitly tell xterm what display to use.  Set the value of
 the environment var 'DISPLAY' before you all xterm.

 Ex. Using the Windows 'Run' command (from the start menu, using the
 builtin Windows 'Run' option on the start menu):

<Your cygwin path>\bin\bash.exe -c 'DISPLAY=:0 xterm'

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 under the 1.5.x series
of Cygwin.


Linda


-- 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]