LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-07-2006, 07:06 PM   #1
timothyb89
Member
 
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118

Rep: Reputation: 15
SSH with X through Cygwin to my Linux Box


I'm not sure if this is the best place to get support for Cygwin, but a lot of the things are the same...
Anyway, when I SSH with ssh -XYC remote@192.168.1.104 to get into my machine, I can log in, but I can't start any X11 apps, even with my X server running.
Trying to start Netscape (perl /usr/bin/netscape/netscape ) gives me this error:
Quote:
Gtk-WARNING **: cannot open display:
Also, whenever I try to open xterm (not in SSH) I get the error:
Quote:
xterm Xt error: Can't open display:
xtrem: DISPLAY is not set
But at the same time, I can open xemacs.
Is there anything I can do to get my X server working properly?
 
Old 07-07-2006, 07:31 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
what is $DISPLAY? also do you need to run xhost?
edit: sorry, i totally forgot it was with cygwin.

Last edited by nadroj; 07-07-2006 at 07:39 PM.
 
Old 07-07-2006, 07:36 PM   #3
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
In cygwin, you need something like
X -query server
where server is the name of your linux box, to get an X login.

Google XDMCP for lots of info

You need to have the server configured to accept XDMCP requests. I think this is part of your gdm (or kdm or xdm or whatever display manager you are using) configuration. This is usually turned off by default because it is considered insecure.

Much easier, though not quite as flashy and smooth, is vnc, which gives you a remote desktop without using an X-client on your windows box (cygwin in your case). You need to start vncserver on the server, then use a client on your Windows box (I use tightvnc - it is free and open - I think). This can also be a more secure way, if you tunnel through ssh.
 
Old 07-07-2006, 07:40 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Not sure if the combination of -XY is the case try it with only -Y

Other thoughts if X is running then one can use a command like this.
export DISPLAY=:0

Or use the command ' xhost + ' but when done I would use the command ' xhost - ' to restore to a more secure enviroment.

Brian1
 
Old 07-07-2006, 08:30 PM   #5
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
I apologise - I misunderstood what you were trying to do.
 
Old 07-07-2006, 08:47 PM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Rather than emulating X on Windows with CygWIN/X so you can ssh tunnel an X session over to your Linux box, have you thought about using FreeNX as an alternative?

It's one heck of a lot faster than tunnelling X or using VNC. Download the free Windows NX client from http://www.nomachine.com, and download the FreeNX server for your Linux box from http://freenx.berlios.de The FreeNX server may even be available as a package for your distro. NX uses ssh tunnelling itself, so it's secure. It uses compression of the X protocol for great speed improvement.
 
Old 07-07-2006, 08:54 PM   #7
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by timothyb89
I'm not sure if this is the best place to get support for Cygwin, but a lot of the things are the same...
Anyway, when I SSH with ssh -XYC remote@192.168.1.104 to get into my machine, I can log in, but I can't start any X11 apps, even with my X server running.
Trying to start Netscape (perl /usr/bin/netscape/netscape ) gives me this error:

Also, whenever I try to open xterm (not in SSH) I get the error:

But at the same time, I can open xemacs.
Is there anything I can do to get my X server working properly?
Are you trying to run this from the Cygwin command line? If so, you need to run it in xterm so it will have the DISPLAY variable set.

Or you can use another SSH client with X forwarding, like putty, and it will assume the display :0
 
Old 07-08-2006, 12:48 AM   #8
timothyb89
Member
 
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by spooon
Are you trying to run this from the Cygwin command line? If so, you need to run it in xterm so it will have the DISPLAY variable set.

Or you can use another SSH client with X forwarding, like putty, and it will assume the display :0
As I had mentioned before, I can't start xterm, because it gives me a DISPLAY error.
Also, I tried FreeNX server, and it didn't work too well, so I went and downloaded the one from nomachine.com, and it works a bit better. I just get a connection timeout with their client from my laptop. I also installed the client in my VMwared PCLinuxOS install. I was able to connect perfectly from there... It probably doesn't help that I'm using Windows ME.
I'm going to search around a bit on sourceforge ad see if there are any open source clients.
I guess NX is my soloution to remote access, but I'd still like to get my X server working in Cygwin...

Last edited by timothyb89; 07-08-2006 at 12:52 AM.
 
Old 07-08-2006, 12:51 AM   #9
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
Quote:
what is $DISPLAY?
...........?
 
Old 07-08-2006, 02:00 PM   #10
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Is there a example of this type of setup somewhere?
What info are you following?

I think I am confused as to what you are after as well.
Brian1
 
Old 07-08-2006, 04:53 PM   #11
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by timothyb89
As I had mentioned before, I can't start xterm, because it gives me a DISPLAY error.
Do you have the Cygwin X packages installed? In Cygwin, do "startx".

Alternately, don't use Cygwin and just use Xming which is the same X server without Cygwin.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding SSH (Sun box to Linux box) oswald21 Linux - Newbie 2 07-08-2006 02:06 PM
Cannot ssh to debian box from Gentoo box or Putty, but I can from Cygwin? Pengus Linux - Networking 2 01-20-2006 12:47 PM
SSH with Cygwin UltraSoul Linux - General 0 07-07-2005 12:44 PM
cygwin ssh problem belorion Linux - General 3 02-25-2004 06:11 PM
cygwin ssh and zonealarm Cass Linux - Newbie 1 01-24-2004 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration