LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 04-29-2003, 08:34 PM   #1
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
X11 forwarding


Ok folks I am messing around with ssh and I am trying to run graphical programs on my big box upstairs from my laptop downstairs. I can ssh into the big box from the CLI but I can't get X forwarding to go. I changed the ss_config files on both the client and server machine: by uncommenting allow X11Forwarding and changing the default no to yes. I even specified exportDISPLAY=laptop:0

I keep getting the error Gtk-WARNING** :cannot open display laptop:0

I guess I need to specify a different tty beside :0??? Anybody know if that is it and what it should be and if not that what then?
 
Old 04-29-2003, 08:37 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Easy ... on the laptop (as the user in X)
do xhost +bigbox (or its IP if the hosts
doesn't provide names and you don't have DNS
running :})


Cheers,
Tink
 
Old 04-29-2003, 08:48 PM   #3
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Hey Tink!

I gave it a try but I got the same warning. Do I need to run xhost on the bigbox too?

Thanks
 
Old 04-29-2003, 08:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Sorry mate, I overlooked one thing ...

export DISPLAY=laptop:0.0

Try that one on bigbox :)

Cheers,
Tink
 
Old 04-29-2003, 09:07 PM   #5
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Now I'm not sure I follow.
This is what I am doing:

laptop$]ssh user@bigbox
$]user@bigbox's password: mypassword
user@bigbox$]export DISPLAY=laptop:0.0
user@bigbox$]evolution

Gtk-WARNING**: cannot open display laptop:0.0

hmmm....

Edit: p.s. it's 10 pm here and I gotta get up at 5 so to tink and anuone else who cares to comment thanks a million for trying to help and I'll be back in the am!!

cheers tink!

Last edited by BigNate; 04-29-2003 at 09:10 PM.
 
Old 04-29-2003, 11:26 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Quote:
Originally posted by BigNate
Now I'm not sure I follow.
This is what I am doing:

laptop$]ssh user@bigbox
$]user@bigbox's password: mypassword
user@bigbox$]export DISPLAY=laptop:0.0
user@bigbox$]evolution

Gtk-WARNING**: cannot open display laptop:0.0

hmmm....

Edit: p.s. it's 10 pm here and I gotta get up at 5 so to tink and anuone else who cares to comment thanks a million for trying to help and I'll be back in the am!!

cheers tink!
The only thing I can think of why it might not work is
that the name laptop in the DISPLAY-statement doesn't
get resolved ... did you try the IP instead?

I've done this stuff a million times :}

If it keeps acting up in ssh, try a -yes, I know
it's bad- telnet session, doing the same things...

Oh, of course, X on the laptop has to be running :)

Cheers,
Tink

Last edited by Tinkster; 04-29-2003 at 11:29 PM.
 
Old 04-30-2003, 12:31 AM   #7
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
NO, no, no. Don't use xhost. The whole point of ssh is security, and xhost is not secure.
On the ssh server, edit the file:
Code:
/etc/ssh/sshd_config
and uncomment the lines:
Code:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
restart your sshd

On the ssh client, edit the file:
Code:
/etc/ssh/ssh_config
and uncomment the lines:
Code:
   ForwardAgent yes
   ForwardX11 yes
ssh in to the server and run an X program, it should display on your ssh client (if you are running X).
 
Old 04-30-2003, 06:15 AM   #8
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
hmmm... still no good.

I tried all above suggestions and I am reading thru the man again. Anymore ideas?
 
Old 04-30-2003, 10:26 AM   #9
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
Did you do an "export DISPLAY=laptop:0.0" with the ssh stuff I mentioned above? You don't want to do that, it's all tunneled for you and you don't have to do anything. If you change the display variable, it screws up the tunneling. If you are using an older version of ssh2 (you should be using ssh2, but not the oldest versions), you may have to edit /etc/ssh2/sshd2_config, etc. Also,
there may be a local config file in ~/.ssh(2) that needs editing.
 
Old 04-30-2003, 07:30 PM   #10
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Now we are getting somewhere. I did have all the things you suggestd configured properly and I was exporting the display variable = failure

However, I have a new error.

X11TransSocketINETConnect: Can't get address for localhost

I assume this has to do with not recognizing the client machine...which I don't get as it will let me login from a gnome term and a v-term...hmmm

Anymore idears?
- I continue to slog thru the man's and openssh.org
 
Old 05-04-2003, 08:31 PM   #11
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Just because I hate running a search and finding a user who had a similar problem, but they never posted back when they finially got it working I give you...

...I finally got some help from some folks on the ssh mailing list.

long befor I used ssh I had to manually configure my ip addresses when I set up my network b/c I couldn't get RH to accept the DHCP addressing. And when I did that I used the GUI tool and had deleted the entry localhost thinking it was the address for the eth0...it isn't, it is the address for the loopback interface.

The lo is not used during ssh because no traffic is being redirected from the server.

During X11 fwd'ng the lo is used to redirect the traffic from the server side to the client. Hence the reason I could ssh into the box but could not get X to be redireceted (kind of a simplification but)
Therefore:
$su
$vim /etc/hosts

edit first line to reflect lo address. The syntax is different than the other addresses:
127.0.0.1 localhost

Make sure you let the other addresses alone.
see: man hosts for further info

And now it works. I have no real need to do this it was a fun diversion and quite rewarding to get working. If you have more than one computer then you should give it a go, it is cool sitting on the couch and manipulating files on a remote computer!
 
Old 06-11-2003, 12:52 AM   #12
akaBeaVis
Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
So....we meet again, whassup BigNate? ,

you know what I find even more fun? sitting in the backyard (ya just gotta go wireless, it's da bomb ) and working full-screen on the KDE desktops of the machines downstairs, using vnc.

you can tunnel that via ssh also like so: ssh -C -L 5902:localhost:5901 box_downstairs, then from another terminal, vncviewer localhost:2, read the man pages for the vncserver/vncviewer stuff like password, screen-res, etc.

one thing I did on the server boxes is to replace those xterminal lines in the ~/.vnc/xstartup file with kdeinit, now, it's just like *being there*, I actually forget I'm working on a remote machine.

(the "-C" in the ssh line is for compression and does seem to speed thing up a bit). Also, you don't necessarily have to export DISPLAY= stuff you can just put on the command line as well.
 
Old 06-11-2003, 06:19 AM   #13
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Hey it's the Beav!!! Fancy meetin' you here!

I will look into vnc. As you know ssh is brutally slow and only really practical from the cli. I did read a little about vnc before but then I just kinda got into something else...typical for a person with adhd

As for wireless...maybe someday but I spent a few days and few dolars running cat5 all over my house and so at some point I'll probably throw a wireless extention in so I can sit in the yard and check out the garden while I play around but I haven't gotton around to it yet.

I really want to get a net enabled cell and uplink my laptop thru that. I have a sail boat on the chesapeake and I love every minute I spend there but I needs me internet

Take Care, and look for the lost soul who can't config his vnc soon! (take pitty on that po'boy)
 
Old 06-11-2003, 06:14 PM   #14
akaBeaVis
Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
yeah, I'm doing that with my nextel, be prepared to be patient as the speed is, shall we say, rather slow, I think the max is 19.2, shades of yesteryear...I've heard from a couple of people that the cables are listed on Ebay these days, might want to check that out.

I agree, I would never want to lose the speed of the wired portion of my network, (/me thinks gigabit is in my future), but for checking email whilst takin' a dump, the wireless is sweet...
 
Old 06-11-2003, 11:07 PM   #15
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by akaBeaVis
yeah, I'm doing that with my nextel, be prepared to be patient as the speed is, shall we say, rather slow, I think the max is 19.2, shades of yesteryear...I've heard from a couple of people that the cables are listed on Ebay these days, might want to check that out.
I gotta link from a guy on ET today and the cables are steep. (as cables go) but I really need to be connected away from the house.

Quote:
Originally posted by akaBeaVis
I agree, I would never want to lose the speed of the wired portion of my network, (/me thinks gigabit is in my future), but for checking email whilst takin' a dump, the wireless is sweet...
yeah even on my crappy laptop (PII 300Mhz) it is still livable at 1Mhz d/l. And on the server and as I like to call her "big box" it is so damn fast being wired...I'll be going around to try to get a good deal on my cell soon! look for me in both forums with config probs!

Well off to bed, the morning gets earlier and earlier the older I get
 
  


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...insecure? Vgui Linux - Security 4 11-24-2005 05:41 PM
X11 forwarding paul_mat Linux - Newbie 3 12-12-2004 06:30 PM
X11 Forwarding Issue gauge73 Linux - Networking 1 11-10-2004 09:20 AM
X11 forwarding JanDeMan Mandriva 1 04-17-2004 09:02 PM
Need Help with X11 forwarding phatboyz Linux - General 3 04-16-2004 03:17 PM


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

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