LinuxQuestions.org
Help answer threads with 0 replies.
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 10-26-2009, 06:56 PM   #1
rames2075
LQ Newbie
 
Registered: Aug 2008
Posts: 5

Rep: Reputation: 0
X11 Forwarding error


I have 2 machines one is RHEL5 and other is CENTOS 5.what i did is i want to run xclock application of RHEL5 from CENTOS 5 box.X11 forwarding is enabled on RHEL5.firewall is turned off on both machines.


[root@centos5 ~]# ssh root@RHEL5
passwd *******

[root@RHEL5 ~]# echo $DISPLAY

[root@RHEL5 ~]# xhost CENTOS 5 IP address (aa.bb.cc.dd) [I dont know why i got this error]
xhost: unable to open display ""

so i need to set DISPLAY variable,i did it like this

[root@RHEL5 ~]# DISPLAY=:0.0
[root@RHEL5 ~]# export DISPLAY
[root@RHEL5 ~]# echo $DISPLAY
:0.0
[root@RHEL5 ~]# xhost CENTOS 5 IP address (aa.bb.cc.dd)
CENTOS 5 IP address (aa.bb.cc.dd) being added to access control list

[root@RHEL5 ~]#exit I came out from RHEL5 box and now i am in CENTOS 5 box

[root@centos5 ~]# xclock -display RHEL 5 IP (xx.yy.xx.zz):0.0
Error: Can't open display: RHEL 5 IP (xx.yy.xx.zz):0.0

again i logged into RHEL 5 box echoed for display variable it was empty,again i tried like this

[root@RHEL5 ~]# DISPLAY=RHEL 5 IP (xx.yy.xx.zz):0.0
[root@RHEL5 ~]# export DISPLAY
[root@RHEL5 ~]# echo $DISPLAY
RHEL 5 IP (xx.yy.xx.zz):0.0

i came back to centos machine ,again i got the same error

[root@centos5 ~]# xclock -display RHEL 5 IP (xx.yy.xx.zz):0.0
Error: Can't open display: RHEL 5 IP (xx.yy.xx.zz):0.0

from this i came to conclusion that DISPLAY variable is not preserved between logins,so i need to set DISPLAY variable permenently.my question is what i am thinking is right or wrong?after this i edited RHEL 5 root user .bashrc file

i added these lines in .bashrc file in roots home directory
DISPLAY=RHEL 5 IP (xx.yy.xx.zz):0.0
export DISPLAY

now between logins display variable is set
[root@RHEL5 ~]# echo $DISPLAY
DISPLAY=RHEL 5 IP (xx.yy.xx.zz):0.0

now i went to CENTOS 5 box

[root@centos5 ~]# xclock -display RHEL 5 IP (xx.yy.xx.zz):0.0
Error: Can't open display: RHEL 5 IP (xx.yy.xx.zz):0.0

again i got the same error.
please any one help me on this issue.any help is greatly appreciated.

Last edited by rames2075; 10-26-2009 at 06:58 PM.
 
Old 10-27-2009, 04:04 AM   #2
thegeek
Member
 
Registered: Oct 2009
Location: Amsterdam
Distribution: CentOS,Fedora,Puppy
Posts: 62

Rep: Reputation: 20
Hi , you need to put the export var in your .bash_profile for just your user, or for system wide use /etc/profile
 
  


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 Oxagast Linux - Software 1 09-02-2008 03:14 AM
X11 Forwarding BlueTornJacket Linux - Server 11 03-12-2007 05:00 PM
X11 forwarding paul_mat Linux - Newbie 3 12-12-2004 06:30 PM
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

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

All times are GMT -5. The time now is 07:32 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
Open Source Consulting | Domain Registration