LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-11-2003, 05:42 PM   #1
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 620

Rep: Reputation: 30
xhost: unable to open display


howzit

Im try to test x remotly from another box. On the one box I have RH9 with sshd running and i'm able to connect from another box with RH9 using the ssh client. Now when I try to go to the first box and place a entry xhost + remote server it give me the above error.

When I login via ssh and type startx on the server box it loads GUI but not on remote terminal why?

Please tell me what Im doing wrong...

Thanking u in adavance

chow
 
Old 12-11-2003, 08:06 PM   #2
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
You don't need to startx when you are on the remote machine. It is going to display on the xserver from the machine you started on.
Once you ssh to the remote machine try typing xclock or gnome-system-monitor. It is running on the remote machine and displaying it.
Once you are on the remote machine you might need to export DISPLAY=<remote ip>:0
 
Old 12-12-2003, 09:26 AM   #3
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 620

Original Poster
Rep: Reputation: 30
Howzit

thanx for the response and clearing the startx issue i tried what u said in exporting dispaly, but when I run xclock it says cannot open display: <IP ADDR>:0. Is this not due to the error I posted. Like I said it when I run xhost + <remote box ip> it gives me the error xhost: unable to open display.

chow
 
Old 12-12-2003, 10:35 AM   #4
colnago
Member
 
Registered: Nov 2003
Location: Canada
Distribution: ArchLinux
Posts: 324

Rep: Reputation: 30
You probably need to forward the x11 connection. You can create (or add to) a file in your .ssh directory. The file is ~/.ssh/config and it should have the line:

ForwardX11 yes

This is also an ssh parameter:

ssh -X rh9box.to.connect.to

I just reread and noticed I missed the original point ( xhost + error ), I will try to reply later as I must go to work now.
 
Old 12-12-2003, 04:36 PM   #5
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
I am a little confused as far as the sequence of events. I will give on example of how I would to it and you let me know if this is what you are doing. I have two machines called disp and svr.
disp's ip 192.168.0.1
svr's ip 192.168.0.2

I start the process on disp.
startx;
run xhost +;
ssh 192.168.0.2;
export DISPLAY=192.168.0.1:0;
xclock
Done.

What Calnago said is also true if you are using ssh you can tunnle it back through the ssh connection. This keeps the data encrypted and more secure. It is the better way of doing it on insecure networks.
 
  


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
xhost+ Unable to open Display atifrafi Linux - Software 1 06-26-2005 12:22 PM
unable to open display mrhldjc Fedora 1 04-04-2005 06:29 AM
xhost: unable to open display d_kote23 Fedora 1 06-03-2004 08:40 AM
Startx unable to open display? PF_The_Wall Linux - Software 1 11-22-2003 01:03 PM
criticial: unable to open display graffitici Linux - Software 1 11-19-2003 04:27 PM


All times are GMT -5. The time now is 10:32 AM.

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