• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1825
  • Last Modified:

Putty and X11 Forwarding... (One more time...)

Greetings,

Have a copy of the Debian Putty client on Windows and while logged into a Redhat Enterprise Linux AS4 session trying to run "xclock &" and have it display the clock on my laptop. When I do I get the error:   Error: Can't open display: localhost:0.0

What am I doing wrong?

My setup is:

1. In putty session enable X11 forwarding and set "display location" to "localhost:0.0"
2. once logged into the Linux server issue the command: "DISPLAY=localhost:0.0"
3. In /etc/ssh/sshd_config set "X11Forwarding yes"
4. issue command "xclock &" and get the error....

I have also tried substituting "localhost" for map laptop's IP address and still nothing. I can also ping my laptop from the server successfully and disabled the client firewall on my laptop.

TIA,

David
0
adgarcia13
Asked:
adgarcia13
  • 5
  • 3
  • 3
  • +2
1 Solution
 
AdamsConsultingCommented:
You likely don't need to set a display location for step 1, just enable X11 forwarding and leave that blank. This could be needed, depending on where your xwindows manager on windows is listening though.
You don't need to do step #2 and that may be messing you up.
Other than that, you just need an xwindows manager running on your windows workstation. I use Xming.

Did you restart SSH after enabling X11forwarding, and log back in?
0
 
omarfaridCommented:
You just check the X forwarding box and do not specify any display. You need to have your X server started on your PC.
0
 
ai_ja_naiCommented:
You don't have X server running, that's why you get error. putty can't act like a client, you have to use Cygwin/X (http://x.cygwin.com/) or WeirdX (http://www.jcraft.com/weirdx/) or xming (http://www.straightrunning.com/XmingNotes/).
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
ai_ja_naiCommented:
Also, ensure that X is running on the server, by issuing 'startx'
0
 
adgarcia13Enterprise ArchitectAuthor Commented:

Sorry I should have been more clear. I am putty'd into a Linux Server on a different machine on the network. This Linux server is running an X Windows Manager/Server instance already.

There are no firewalls blocking traffic back to the laptop from the server, and I can ping the laptop from the Linux server just fine.

I have tried everything recommended above and still I get the following error on the Linux Server when I issue the command "xclock &" hoping the display will open on the laptop:

" Error: Can't open display: "

TIA,

David
0
 
Maciej SsysadminCommented:
You should have Xserver running on the host, from which you are connecting.
0
 
Maciej SsysadminCommented:
0
 
ai_ja_naiCommented:
ok, try anyway what I suggested you before: Cygwin/X (http://x.cygwin.com/) or WeirdX (http://www.jcraft.com/weirdx/) or xming (http://www.straightrunning.com/XmingNotes/). They sure can do what you need
0
 
Maciej SsysadminCommented:
Oops.. sorry ai_ja_nai, I looked only on last post. I didn't see that you wrote it already.
0
 
ai_ja_naiCommented:
np
0
 
adgarcia13Enterprise ArchitectAuthor Commented:
Sorry if I am not getting your point. I believe what I hear you saying (from looking at the links you have sent me) is that I have to have an X Server running on my Windows machine as well?

The X server is already running on the Linux host, I am simply trying to get that X Server to open a display or Window on my laptop through my putty session.

Are you saying in order to do that I need 2 X Servers running? one on the Windows client and one on the Linux server?

The only thing running on my laptop at the moment is my debian putty client. I was under the assumption that the X Manager or Server on my Linux system would be able to open an X windows display on my laptop, by me simply using the putty client, setting X-11 forwarding, and once logged into the Linux Server via my putty session, have the X Windows manager or server on my Linux system open a display on my laptop.
0
 
ai_ja_naiCommented:
Yuo need a  X client to connect to a X server. Putty simply is not; it's just a ssh/telnet client for Windows. Yes, it can allow X sessions encrypting and forwarding, but it can't display them.
You need a software that acts like a client, that are able to display X sessions, like the ones I suggested before
0
 
adgarcia13Enterprise ArchitectAuthor Commented:
Got it. Thanks, I'll look to secure the X client software you referred me to.

David
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now