| Fedora This forum is for the discussion of the Fedora Project. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-22-2005, 05:41 PM
|
#1
|
|
Member
Registered: Jul 2004
Location: USA
Distribution: Fedora Core 10, Ubuntu 8.10, CentOS 5
Posts: 180
Rep:
|
help for setting up X server to use ssh
I used ssh -X root@IP where "IP" is the ip address of my FC3 machine.
When i tried to open xemacs or things like that, i got this error message:
_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known X server not responding: "localhost:10.0"
If after login I do "echo $DISPLAY", it shows me "localhost:10.0".
I also tried "setenv DISPLAY" to $HOST's value, then I got this:
"X server not responding"
My local system is Debian where I am just a normal user, but I don't
think this is the reason. I could use "ssh -X" to a remote UNIX machine
and open up X successfully. So what shall I do in the FC3 machine?
Thanks very much for your advice!
|
|
|
|
06-22-2005, 06:25 PM
|
#2
|
|
Member
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142
Rep:
|
Can you ping to localhost? (try 'ping localhost' and 'ping 127.0.0.1')
Should not be any problems with firewalls, I think.
Check also if localhost is in /etc/hosts and has right IP-number (127.0.0.1).
Good luck
|
|
|
|
06-23-2005, 02:48 PM
|
#3
|
|
Member
Registered: Jul 2004
Location: USA
Distribution: Fedora Core 10, Ubuntu 8.10, CentOS 5
Posts: 180
Original Poster
Rep:
|
I did this and then it worked :-)
setenv DISPLAY 127.0.0.1:10.0
Thanks for your reply.
|
|
|
|
02-21-2006, 10:34 PM
|
#4
|
|
LQ Newbie
Registered: Feb 2006
Location: Hyderabad, India
Distribution: Red Hat 10
Posts: 2
Rep:
|
It worked for me too
This worked for me too.
Thank you
and what is this 6010
and server id 10
and how does one automatically get the display to the clien m/c ( client in the noraml sense) without giving the client ip address to the linux server ( server in the noraml sense, not x server )m/c.
Narender
|
|
|
|
02-22-2006, 12:24 AM
|
#5
|
|
Senior Member
Registered: Aug 2005
Posts: 1,755
Rep:
|
Quote:
|
Originally Posted by parv
I used ssh -X root@IP where "IP" is the ip address of my FC3 machine.
When i tried to open xemacs or things like that, i got this error message:
_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known X server not responding: "localhost:10.0"
|
There might be some settings somewhere that makes it hard to do X forwarding for root. I don't remember. Do you really need to log in as root? Also, try using "-Y" instead of "-X" because many things don't work with "-X".
Quote:
|
Originally Posted by narender@saineni.net
and what is this 6010
and server id 10
|
X uses port 6000 + display number, so display 10 would be on port 6010. X has multiple displays.
Quote:
|
Originally Posted by narender@saineni.net
and how does one automatically get the display to the clien m/c ( client in the noraml sense) without giving the client ip address to the linux server ( server in the noraml sense, not x server )m/c.
|
When you tell SSH to do X forwarding, it makes a new X display on the remote computer and listens on that port (port 6010 in this case) and then forwards the port (tunnelled through the SSH connection) to the local DISPLAY port. So the remote machine doesn't "know" the local machine's IP at all, SSH just forwards all the information through the connection.
|
|
|
|
02-23-2006, 08:38 PM
|
#6
|
|
Member
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142
Rep:
|
Sorry, I didn't notied it.
Parv:
You should NEVER EVER login as root.
You should REALY REALY use sudo(1) or su(1) when you need to run one command whith root priv:s
Might be that ssh(1) is doing the right thing and don't let you use X11 over ssh as root. It's becouse it has some potetial risk of local cracking and through your computer taking controll over the other computer as you.
Not very nice, any way. Havent got time to check out what is the problem though.
So please set up sudo and use that, so wi dont end up as MS Windows with lots of cracked and zommbied linux boxes...
|
|
|
|
02-25-2008, 03:54 AM
|
#7
|
|
LQ Newbie
Registered: Feb 2008
Posts: 4
Rep:
|
You should not have to explicitly set DISPLAY after an 'ssh -X'
I had the same problem on one machine and the problem was that /etc/hosts was corrupted. make sure you have the line:
127.0.0.1 localhost.localdomain localhost
also if you are using DNS/LDAP/NIS/YP etc. to resolve hosts make sure that "files" still appears 1st in the list of hosts in /etc/nsswitch.conf.
e.g.:
hosts: files dns
-tom
|
|
|
|
02-25-2008, 09:51 AM
|
#8
|
|
Member
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142
Rep:
|
Also check that /etc/ssh/sshd.conf allows X11 tunneling/forwarding.
You also need the xauth command on your server (and client). If not, sshd at the server (and ssh command) will not be able to transfer and set X11 security token (X11 server "password") to your real X11-server to the "virtual" X11-server on you server. And then X11 will not allow you to connect to your real X11-server from your server, becouse it doesnt have right X11 security token.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:35 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|