Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running XWindow programs in Cygwin

Tags:

cygwin

x11

I installed all the necessary packages for running GUI programs in Cygwin.

Right now, I have to do these things to launch an XWindow program:

1) /bin/startxwin.sh
2) It starts a separate window (the X Window?)
2) In that X Window, ssh -X user@server (this is the remote box where I want to run that box's programs)
3) Then in that X Window, I can launch GUI programs like "xclock".

My question is, can I directly do ssh -X user@server under my original Cygwin window, and launch GUI programs directly, instead of launching a separate X Window and doing it there?

Any instructions are appreciated!!!!

like image 329
Saobi Avatar asked Feb 05 '26 14:02

Saobi


2 Answers

If you want a nice GUI , AFAIK you need an X server to display graphics from your remote "X client".

If what bother you is to manually lauch the X server (?) you may still launch your X server at startup. On my work desktop I do that personnaly (while it don't use X server provided by Cygwin but a commercial one).


Edit: accordinly to the whole comments, You must try with : export DISPLAY=xxx:0.0 , xxx being you the IP address of the machine hosting the x server and add it in your .profile file (or .bashrc file should be fine, but I remember .profile is better for that kind of stuff, nevertheless I may wrong ..)

like image 192
yves Baumes Avatar answered Feb 09 '26 12:02

yves Baumes


No, you have to launch X Window server (run startxwin.sh). "ssh -X" is actually not nesessary. You can set environment variable like

export DISPLAY=Cygwin:0.0

in normal cygwin window then launch GUI programs directly.

like image 41
kcwu Avatar answered Feb 09 '26 11:02

kcwu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!