Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2009-02-16
13
Medium Priority
?
1,822 Views
Last Modified: 2012-05-06
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
Comment
Question by:adgarcia13
  • 5
  • 3
  • 3
  • +2
13 Comments
 
LVL 4

Expert Comment

by:AdamsConsulting
ID: 23656145
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
 
LVL 40

Expert Comment

by:omarfarid
ID: 23656225
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
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 23659143
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 23659150
Also, ensure that X is running on the server, by issuing 'startx'
0
 

Author Comment

by:adgarcia13
ID: 23678106

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
 
LVL 23

Expert Comment

by:Maciej S
ID: 23679260
You should have Xserver running on the host, from which you are connecting.
0
 
LVL 23

Expert Comment

by:Maciej S
ID: 23679267
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 23679542
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
 
LVL 23

Expert Comment

by:Maciej S
ID: 23679641
Oops.. sorry ai_ja_nai, I looked only on last post. I didn't see that you wrote it already.
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 23679754
np
0
 

Author Comment

by:adgarcia13
ID: 23684306
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
 
LVL 16

Accepted Solution

by:
ai_ja_nai earned 2000 total points
ID: 23684622
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
 

Author Closing Comment

by:adgarcia13
ID: 31547640
Got it. Thanks, I'll look to secure the X client software you referred me to.

David
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question