LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-26-2007, 11:17 AM   #1
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Rep: Reputation: 15
Need help forwarding X11 via SSH


I have two computers both running Debian (testing). The host PC has ssh installed and running, I'm using Putty on the client PC to make the ssh connection. I have no problems making the ssh connection and logging into the host with Putty, but when I try to run an application (gimp for instance) I'm getting the following message:

The application 'gimp' lost its connection to the display localhost:10.0;
Most likely the X server was shut down or you killed/destroyed the application.

Any help would be most appreciated.
 
Old 04-26-2007, 11:41 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
PuTTY can establish the ssh connection with tunneling. However, PuTTY is NOT an "X Client". You have to run something else on your M$ Windoze machine to actually see the X windows.

Commercial Product
eXceed from Hummingbird (my favorite - been using its various versions for years)

Non-Commercial ("free") Product
xming - Built out of the Cygwin stuff
Seems to do OK but since I had eXceed before I got it I haven't really beaten on it. My co-worker has indicated there are some color/font issues he has seen but everything I did with it seemed to work OK.
 
Old 04-26-2007, 11:48 AM   #3
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Original Poster
Rep: Reputation: 15
Actually the host and client PC are both running Debian (testing). I'm not using Windows. I also made sure the X11 forwarding was enabled in Putty as well, it is set to localhost:0.

Last edited by buckwheat12; 04-26-2007 at 11:51 AM.
 
Old 04-26-2007, 11:50 AM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
I'm using Putty on the client PC to make the ssh connection.
Why the hell would you be using PuTTY on a Debian box? Debian like all other Linux distros does ssh natively.
 
Old 04-26-2007, 11:56 AM   #5
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Original Poster
Rep: Reputation: 15
What's the difference if I make the connection with Putty or make it via a terminal command?
 
Old 04-26-2007, 12:01 PM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Exactly HOW are you running PuTTY? I'm wondering if you're not doing some sort of DOS/Windows emulations (WINE or something like that) and running PuTTY in that environment. So far as I know there is no "PuTTY" port to install directly in Linux because its avowed purpose to allow Windoze machines to do telnet/ssh connections to UNIX/Linux machines.

Are you actually IN a GUI environent? If you open a "terminal" window (NOT PuTTY and not connected to remote side - just locally) and just type "xterm" does it open and xterm window on your screen?
 
Old 04-26-2007, 12:06 PM   #7
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
OK I'm confused. I do see "UNIX source code" for PuTTY on their site but then in the FAQ at their site:
http://www.chiark.greenend.org.uk/~s....html#faq-what

It says:

Quote:
In really simple terms: you run PuTTY on a Windows machine, and tell it to connect to (for example) a Unix machine. PuTTY opens a window.
I've never heard of anyone using PuTTY on anything other than an Windoze machine.
 
Old 04-26-2007, 12:07 PM   #8
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Original Poster
Rep: Reputation: 15
No, no emulators, I'm in Gnome. There is a putty package in Debian (as well as other distros I've used).... apt-get install putty. It looks and is configured identical to the Windows version.
 
Old 04-26-2007, 12:17 PM   #9
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
My apologies. I'm now downloading the FC4 package using yum.

I'll see if it operates any differently than the one on my company provided Windoze machine and report back.

Make sure you don't have anything on the remote end that is explicitly setting the "DISPLAY" variable. The tunnel creates its own DISPLAY setting and you must use that rather than standard DISPLAY setting method to use the tunnel.

It isn't unsusual to have DISPLAY=<whatever>.#.# in one of your start up files (/etc/profile, /etc/bashrc, $HOME/.profile, $HOME/.bashrc) when you login. If you do that would overwrite the one that the tunnel is setting.

Also make sure you're not doing an "su - <user>" AFTER you open the tunnel. That would lose the DISPLAY variable as well.
 
Old 04-26-2007, 12:31 PM   #10
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
OK I just did my test to a system where we purposefully block 6000 range ports because it is web facing. That is an HP-UX (UNIX) 11.11 host.

I was able to open a PuTTY session from Fedora Core 4 (FC4) to the HP-UX host successfully with X tunneling. I then ran "xterm" in that established window and it successfully sent the Xterm window back to my Gnome display on the my FC4 console.

Although the PuTTY on FC4 had some additional options not seen on the Windoze PuTTY I'd downloaded (may be time to update that) I didn't use any of those newer options. What I did use:
Under the "Tunnels"
Checked the box for "Enable X11 forwarding".
Kept the default selection for "MIT-Magic-Cookie-1"
Kept the default selection for "Local"
Did not select anything else or type anything in the boxes on that.

In the main Session window I had the host IP and selected ssh and let it use port 22 (default for ssh). I saved it with the host name then used this session. As noted it opened fine and successfully opened the tunnel which successfully sent the X application back to my originating FC4 box.
 
Old 04-26-2007, 02:39 PM   #11
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Original Poster
Rep: Reputation: 15
I'll recheck my settings, I pretty much have the same setup. I'm away from the computer I was working on. I'll keep you posted when I get the change to try it again.
 
Old 04-30-2007, 05:51 AM   #12
buckwheat12
Member
 
Registered: Jan 2004
Distribution: PCLOS 2007
Posts: 91

Original Poster
Rep: Reputation: 15
OK, I got it to work. I had to remove localhost:0 from the "X display location" setting. Thanks.
 
Old 04-30-2007, 12:10 PM   #13
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Glad I could help. Nice that I learned something from the thread as well. My problem is I'm so accustomed to command line I sometimes forget to take GUI into account.
 
Old 04-30-2007, 04:41 PM   #14
rob.rice
Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 784

Rep: Reputation: 104Reputation: 104
as a note both Xming and putty will run from a flash drive with out being installed to the windoze box
so will VNC and there is a VNC client and server built in to KDE from version 3.1 onward

think about that you can carry your linux box around in your pocket and run it from any wondbloze computer
 
Old 05-02-2007, 12:24 AM   #15
manojkandoth
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
You can simply use the -X option while using ssh.

eg:-
#ssh -X <SYSTEMNAME>

This will help you to run remote systems graphics on your local system.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
X11 forwarding with ssh rhermsen Slackware 2 10-27-2006 01:49 PM
Need HELP SSH X11 Forwarding wylie1001 Linux - Software 2 04-11-2006 08:12 PM
SSH/X11 Forwarding - Performance Gort32 Linux - Software 1 01-23-2006 06:04 PM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM
ssh with putty and x11 forwarding provkitir Debian 4 06-10-2005 09:58 PM


All times are GMT -5. The time now is 07:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration