LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-18-2009, 03:50 PM   #1
musthero
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
Question putty vs. ssh -X (why different $DISPLAY needed)


Hi guys,

I use one remote machine which I want to be connected to.
I use putty to connect to it and it works if I specify DISPLAY variable

export DISPLAY=my_ip_address:0.0

but if I use my linux desktop to connect to remote machine (ssh -X ...) this way of specifying DISPLAY variable does not work anymore, BUT if I define DISPLAY as follows

export DISPLAY=localhost:13.0

it works!
What is the difference? Why it happens? (the remote machine is same in both cases)

Thanks for any help!
 
Old 02-18-2009, 04:44 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well the X tunneling over ssh should be set up automatic, and i'm not sure why you're having to set that like you are, but the difference is the tunneling itself. you can run the first type under ssh and it *should* work, no reason why not if it does on putty. what if you DON'T do X tunneling?
 
Old 02-19-2009, 12:40 AM   #3
musthero
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
well the X tunneling over ssh should be set up automatic, and i'm not sure why you're having to set that like you are, but the difference is the tunneling itself. you can run the first type under ssh and it *should* work, no reason why not if it does on putty. what if you DON'T do X tunneling?
Yes, that's true. If I use ssh -X ... it sets up $DISPLAY automatically but it's not the case with putty where after connection is established $DISPLAY is empty so I need to define it. If I define it as localhost:13.0 it does not work for putty but works for ssh -X in linux
 
Old 02-19-2009, 01:35 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well yes, again that is X forwarding over ssh. putty doesn't do this at all. you setting $DISPLAY in putty is the same as being local to the box and setting it, making X clients connect to any arbitrary server, it's nothing to do with ssh at all. With ssh -X it is, and the X connections are *inside* the ssh tcp connection across the network.
 
Old 02-19-2009, 07:41 PM   #5
musthero
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
well yes, again that is X forwarding over ssh. putty doesn't do this at all. you setting $DISPLAY in putty is the same as being local to the box and setting it, making X clients connect to any arbitrary server, it's nothing to do with ssh at all. With ssh -X it is, and the X connections are *inside* the ssh tcp connection across the network.
Yes, it makes sense. Although I do X11 forwarding in putty v0.60 it works perfectly without it! So it seems that this option does not do anything, and it's not equivalent to -X option in ssh as I though before. Putty just doesn't do what it's supposed to, meaning does not do X11 over ssh with X11 forwarding option checked. That's intresting! Will play with it again...
Thanks for helping me to understand that!
 
  


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
Putty doesn't display special characters Felipe Linux - Software 4 08-13-2008 08:09 AM
[putty&ssh] Who is really good & expert in ssh https tunnelling and firewalling ? Xeratul Linux - General 12 12-03-2006 03:22 AM
help needed using the putty tool varala_kanth Linux - Newbie 2 03-19-2004 07:58 AM
help needed using the putty tool varala_kanth Linux - Software 3 03-19-2004 03:47 AM
Im currently using PUTTY but having problems setting display ForumKid Linux - General 3 04-09-2002 05:03 PM

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

All times are GMT -5. The time now is 07:17 PM.

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