LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums HCL Reviews Tutorials Articles Register
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 12-01-2004, 10:27 PM   #1
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Rep: Reputation: 15
Question X11 forwarding over telnet ..is it possible?


Hello guys, is it possible to enable X11 forwarding over telnet. I have a few boxes where i can't use ssh so the only way to connect is telnet. I need to export stuff to my linux box (Fedora Core 1). Is it possible or ssh is the only way to forward X11 stuff.

Thanks
 
Old 12-02-2004, 12:48 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

one thing u can do is
run

export DISPLAY= ipaddress of target machine
or
export DISPLAY= ipaddress of target machine:0

then
run this at cleint end
xhost +ipaddressofserver

and when u run any X11 appliaction all will be forwarded to the target machine
to revert back
export DISPLAY = :0

regards

Last edited by masand; 12-02-2004 at 04:27 AM.
 
Old 12-02-2004, 04:20 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
masand, unless I don't understand what you write, I think you're doing things the wrong way.

What does X11 forwarding by SSH means? Answer: this means that X11 communications (remember, X11 is a network protocol) go through the SSH pipe, so that they benefit from encryption. Telnel is not a secure protocol; there's no encryption. So there wouldn't be any benefit from doing forwarding! X11 is already a network protocol. So obviously no, Telnet cannot forward X11. You have to use X11 networking on its normal pipe (which is using a different port than telnet's or ssh's).

Let's say you're on LocalPC, and you want to remotely do stuff on RemotePC. Here's what you do (this will only work if DISPLAY is defined on LocalPC's terminal session):
Code:
LocalPC> echo DISPLAY
:0
LocalPC> xhost +RemotePC
RemotePC added to list of allowed clients.
LocalPC> telnet RemotePC
login: ...
password: ...
RemotePC> export DISPLAY=LocalPC:0
Then do whatever you want.

Yves.
 
Old 12-02-2004, 04:26 AM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by theYinYeti
masand, unless I don't understand what you write, I think you're doing things the wrong way.

What does X11 forwarding by SSH means? Answer: this means that X11 communications (remember, X11 is a network protocol) go through the SSH pipe, so that they benefit from encryption. Telnel is not a secure protocol; there's no encryption. So there wouldn't be any benefit from doing forwarding! X11 is already a network protocol. So obviously no, Telnet cannot forward X11. You have to use X11 networking on its normal pipe (which is using a different port than telnet's or ssh's).

Let's say you're on LocalPC, and you want to remotely do stuff on RemotePC. Here's what you do (this will only work if DISPLAY is defined on LocalPC's terminal session):
Code:
LocalPC> echo DISPLAY
:0
LocalPC> xhost +RemotePC
RemotePC added to list of allowed clients.
LocalPC> telnet RemotePC
login: ...
password: ...
RemotePC> export DISPLAY=LocalPC:0
Then do whatever you want.

Yves.
u can see that it the same thing that u r saying(to use the X11 networking)

regards
 
Old 12-02-2004, 04:48 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
Yes. Sorry, I didn't want to offence you; I probably wasn't clear enough.
The details I gave were in answer to smkamene's initial question.
The thing I said about your post is something else: The way I understand what you wrote, it seems to me you reversed the two machines (server instead of client, and client instead of server). But then, maybe I simply did not understand. And I'm sure, that between our two posts, smkamene will have his answer.

Yves.
 
Old 12-02-2004, 04:59 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there
pl. correct me if i am wrong here but
don't we need to set the ip address of the target/client machine in trhe DISPLAY environ at server machine,so that all X11 app. are exported to the display environ set, which is that of the cleint machine
i have done this many times and i remember it doing it this way only

regards
 
Old 12-02-2004, 08:55 AM   #7
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
Yes, so we agree. Now that you say so, and after re-re-reading your first post, I see you were correct in the first place. The word that lost me was "target", which I understood as the server, whereas you meant the client. After this, I logically understood "client" as the X client side.
Those explanations are difficult because the X server is running on the "network client", and the X clients are running on the "network server"
Have a good day!

Yves.
 
Old 12-02-2004, 09:02 AM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

yes , i hope 'smkamene' will find answer to his questions now easily

regards
 
Old 12-02-2004, 01:45 PM   #9
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
Hmm...no luck guys

Code:
[smkamene@hqlintest smkamene]$ echo $DISPLAY
:0.0

[smkamene@hqlintest smkamene]$ telnet myhpuxserver
username: blah
password: *********

myhpuxserver:/home/smkamene > export DISPLAY=hqlintest:0

myhpuxserver:/home/smkamene > xterm
Error: Can't open display: hqlintest:0
Error: Couldn't find per display information

This works fine if i ssh over to the box, i do not have firewall running on my box. Any other ideas guys?
 
Old 12-02-2004, 01:56 PM   #10
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by smkamene
Hmm...no luck guys

Code:
[smkamene@hqlintest smkamene]$ echo $DISPLAY
:0.0

[smkamene@hqlintest smkamene]$ telnet myhpuxserver
username: blah
password: *********

myhpuxserver:/home/smkamene > export DISPLAY=hqlintest:0

myhpuxserver:/home/smkamene > xterm
Error: Can't open display: hqlintest:0
Error: Couldn't find per display information

This works fine if i ssh over to the box, i do not have firewall running on my box. Any other ideas guys?
did u try the way i mentioned

regards
 
Old 12-02-2004, 05:04 PM   #11
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
I thought i did ? ...btw ..i forgot to mention that i did run xhost + before attempting all this.
 
Old 12-02-2004, 05:08 PM   #12
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

u need to run the export DISPLAY command on the machine from where u want to forward ur display
and xhost on ur client machine
i think u r doing it the other way round

regards
 
Old 12-02-2004, 06:30 PM   #13
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
myhpuxserver in my example is my machine where i want to forward my display from. It's a hpux box. hqlintest is my example is my Fedora Core 1 box. I ran ps -ax on my Fedora box and saw this:

Code:
8571 ?        S    120:14 X :0 -nolisten tcp -br -deferglyphs 16
I wonder if -nolisten has anything to do with my inability to send anything to the screen. ???
 
Old 12-03-2004, 06:28 AM   #14
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
Yup, you need to remove the nolisten bit (it'll probably be in something like xserver or something (I can't really remember, and I'm not on a Linux box)).
 
Old 12-03-2004, 11:06 AM   #15
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
Hmm..i can't find it ...can you guys point me in the right direction. I am on a Fedora Core 1 . Xfree86
 
  


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
X11 forwarding BigNate Linux - Software 16 06-21-2011 02:39 AM
X11 forwarding paul_mat Linux - Newbie 3 12-12-2004 07:30 PM
X11 forwarding JanDeMan Mandriva 1 04-17-2004 10:02 PM
Need Help with X11 forwarding phatboyz Linux - General 3 04-16-2004 04:17 PM
X11 Forwarding - I'm lost lhiggins Linux - Newbie 5 07-09-2003 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration