LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-19-2004, 09:48 PM   #1
lucastic
Member
 
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Rep: Reputation: 30
X11 Forwarding over SSH all sorts of problems


Hi all,

Well I have googled and searched tons of posts here and on other forums and cannot find any help to my problem...

I have 2 computers that I want to get X11 forwarding over

one is my server 192.168.0.1 running Redhat 9

the other is my main work computer 192.168.0.101 running Gentoo

I want to run the ethereal program that resides on my server, on the screen of my gentoo machine.

I have tried everything I can think of.

I have checked the /etc/ssh/sshd_config file so that X11 forwarding is enabled. My firewall specifically allows connections on port 6000 from local machines.

(/sbin/iptables -A INPUT -s 0/0 -p tcp --destination-port 6000 -j DROP
/sbin/iptables -A INPUT -s 0/0 -p udp --destination-port 6000 -j DROP
/sbin/iptables -I INPUT -s 192.168.0.0/24 -p tcp --destination-port 6000 -j ACCEPT
/sbin/iptables -I INPUT -s 192.168.0.0/24 -p udp --destination-port 6000 -j ACCEPT)

Everytime I try to connect from my gentoo machine I get the following error:

#ssh -X -l root 192.168.0.1

password: ******

root@192.168.0.1# ethereal &
[1] 3243
Gtk-WARNING **: cannot open display: localhost:11.0


I tried to change the DISPLAY variable on the server but every time I do it, by;

#csh

#setenv DISPLAY 192.168.0.1:11.0

it stays until I exit out of csh, so if in bash I type #env the DISPLAY variable always shows as DISPLAY localhost:11.0

I am really stumped on this one.... No one elese seems to be having this particular problem???

Does anyone have any ideas?

Lucas
 
Old 07-19-2004, 10:46 PM   #2
jpat1023
Member
 
Registered: Oct 2003
Location: USA
Distribution: Red Hat 9, Ubuntu 10; Windows Server 2003 and XP
Posts: 34

Rep: Reputation: 15
first of all...stop the firewall and try just to make sure its not the firewall.
But after that I really don't know what to tell you. I have never had any problems with this.

One thing you could do is just run VNC. google it if you dont know what im talking about.

sorry i couldnt be more help.
 
Old 07-19-2004, 11:03 PM   #3
lucastic
Member
 
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Original Poster
Rep: Reputation: 30
Thankyou for your reply, I did try turning the firewall off altogether but it still had the same error:

Gtk-WARNING **: cannot open display: localhost:11.0

Shouldnt "localhost:11.0" be "192.168.0.1:11.0" ??

VNC looks interesting, might look into it in the future, but for now I would rather figure out why ssh X11 forwarding is not working.
 
Old 07-20-2004, 02:10 AM   #4
lucastic
Member
 
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Original Poster
Rep: Reputation: 30
would it matter that the server is using openssh-3.5, and the client is using openssh-3.8?

I managed to get X11 forwarding working from gentoo to gentoo but still not from redhat 9.

I am starting to really think it has something to do with the env DISPLAY variable, but I cannot figure out how to change it in REDHAT 9!!
 
Old 08-13-2004, 07:43 PM   #5
tuanito
Member
 
Registered: Jan 2003
Location: Paris, France
Distribution: Slackware, FreeBSD
Posts: 30

Rep: Reputation: 15
I managed to X11 forward over ssh by following exactly this post (I did it on Slack 10). It tells you how to take care automagically of the DISPLAY variable

http://wiki.linuxquestions.org/wiki/...Forwarding_X11

Hope it helps.
 
Old 08-14-2004, 03:28 AM   #6
lucastic
Member
 
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Original Poster
Rep: Reputation: 30
Thanks but still no luck, I am really stumped on this one. But not to worry just increases my love for Gentoo... one day I will convert my server away from Redhat 9 to Gentoo, and then I wont have these unexplainable problems.
 
Old 08-30-2004, 03:07 PM   #7
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
just a thought

You do know that you can run other tcpdump programs in the console right? I beleive you can even run ethereal in console mode. I havent made use of it in console mode yet. Just type tethereal at a console, I dont remember all the options though. Another thing too, do you have the DISPLAY variable setup right in your /.ssh/config? I think your machine is still trying to open ethereal on your localhost display.

Last edited by tekhead2; 08-30-2004 at 04:57 PM.
 
Old 08-30-2004, 07:19 PM   #8
DrNeil
Member
 
Registered: Aug 2004
Location: Scotland
Distribution: Debian, Suse, Knoppix, Dyna:bolic, Mandrake [couple of years ago], Slackware [1993 or so]
Posts: 150

Rep: Reputation: 15
Quote:
Originally posted by lucastic
[B]Thankyou for your reply, I did try turning the firewall off altogether but it still had the same error:

Gtk-WARNING **: cannot open display: localhost:11.0

Shouldnt "localhost:11.0" be "192.168.0.1:11.0" ??
[
I get that sometimes when I am on screen two/3/4under a wm. Try screen 1
or export DISPLAY your compi adress 0:0. of course receiving compi has to have X or exceed or so and you have to set xhost
 
Old 08-31-2004, 05:38 PM   #9
elfoozo
Member
 
Registered: Feb 2004
Location: Washington, USA
Distribution: Debian
Posts: 265

Rep: Reputation: 32
Check for, and remove the TCP NOLISTEN statement in .xserverrc of the machine you SSH too (if that statement exists.)
 
Old 08-31-2004, 08:24 PM   #10
aarggh
LQ Newbie
 
Registered: Aug 2003
Distribution: SuSE
Posts: 11

Rep: Reputation: 0
As Dr Neil said previously, try the following:

ssh as a user to the server without running any extra paramters, then run:

export DISPLAY=192.168.0.101:0.0
ethereal &

See what happens. Hopefully it should work.
 
Old 08-31-2004, 08:34 PM   #11
DrNeil
Member
 
Registered: Aug 2004
Location: Scotland
Distribution: Debian, Suse, Knoppix, Dyna:bolic, Mandrake [couple of years ago], Slackware [1993 or so]
Posts: 150

Rep: Reputation: 15
of course your ssh client has to have X11 forwarding switched on i.e. putty
 
  


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
SSH and X11 driving me up a wall, not forwarding... cynical Linux - Software 3 11-22-2005 09:56 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
Problems with ssh and X11 forwarding Dabria Linux - General 5 02-13-2004 10:28 AM
ssh: x11 forwarding problems Halz Linux - Software 1 06-25-2002 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:35 AM.

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