LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2014, 09:08 AM   #1
madhulika.sinha
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Rep: Reputation: 0
xhost: unable to open display


I am trying to set DISPLAY in remote machine but I'm getting below error. That is working on localhost but not on remote

[root@lexdty9094 ~]# export DISPLAY=lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0
[root@lexdty9094 ~]# echo $DISPLAY
lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0
[root@lexdty9094 ~]# xhost +
xhost: unable to open display "lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0"
 
Old 10-28-2014, 09:39 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,785

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
Quote:
Originally Posted by madhulika.sinha View Post
I am trying to set DISPLAY in remote machine but I'm getting below error. That is working on localhost but not on remote

[root@lexdty9094 ~]# export DISPLAY=lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0
[root@lexdty9094 ~]# echo $DISPLAY
lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0
[root@lexdty9094 ~]# xhost +
xhost: unable to open display "lexdty9094.ecloud.bcsdc.lexington.ibm.com:0.0"
...and since you don't tell us what version/distro of Linux you're using, what kind of workstation you're using, or provide any details at all, there's little we can tell you. This has been asked (and answered), on this site many, MANY times.

Your local workstation has to have a functioning X server, and it also has to be configured to allow incoming X connections. If the local x server is running with the "-nolisten" option, it will NOT work.
 
Old 10-28-2014, 09:46 AM   #3
madhulika.sinha
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,

This error I'm facing in remote server.

This is the Linux version.

Linux 2.6.32-431.5.1.el6.x86_64 x86_64

Distribution Version

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarchrinting-4.0-amd64rinting-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Release: 6.5
Codename: Santiago
 
Old 10-28-2014, 10:11 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,785

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
Quote:
Originally Posted by madhulika.sinha View Post
Hi,
This error I'm facing in remote server.
Right, because as said, your LOCAL system has to have a running X server. The program executes on the remote system, and DISPLAYS on your local system.
Quote:
This is the Linux version.
Linux 2.6.32-431.5.1.el6.x86_64 x86_64

Distribution Version

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarchrinting-4.0-amd64rinting-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Release: 6.5
Codename: Santiago
Ok, so again, what is your LOCAL system running? And if you're using RHEL, have you contacted Red Hat support, or seen the customer portal for such things? You're paying for RHEL, and as such, are paying for access.
 
Old 10-28-2014, 10:13 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,451

Rep: Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050Reputation: 2050
How are you connecting to this remote system? Any reason you don't just connect via ssh with the -Y flag and leave everything else alone?
 
Old 10-29-2014, 04:25 AM   #6
madhulika.sinha
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,

I am using putty to connect to remote system and putty is running on windows 7 Virtual Client for Linux KVM 1.10.
 
Old 10-29-2014, 07:10 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,973
Blog Entries: 1

Rep: Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620
In addition to xhost there is xauth, it can be picky about things and permissions. Assuming that the remote X session didn't set the -nolisten flag, which it probably did as -nolisten tcp is a common default.

To see what options X is using (to be run on the remote system).
$ export COLUMNS=200; ps -FAw | grep X

To run X apps as a user other than the user who lauched X, you have to set DISPLAY and have a readable .Xauthority file from the user who launched X. And set the XAUTHORITY to the full path location of the .Xauthority file. Some alternative way to use xauth for the .Xauthority needs, which I can't recall off the top of my head.
 
Old 10-29-2014, 08:28 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,785

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
Quote:
Originally Posted by madhulika.sinha View Post
Hi,

I am using putty to connect to remote system and putty is running on windows 7 Virtual Client for Linux KVM 1.10.
Stop where you are, and again, go back to the first reply.

AGAIN, unless you are running X on the local system, this won't work. Putty isn't an X windows emulator. You need either a *nix system with X running on it, and allowing incoming connections, or you need an X emulator like Hummingbird eXceed.
 
  


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 by LINUX via VMWare-Client thomas2004ch Linux - Software 1 09-28-2011 06:49 AM
RHEL xhost unable to open display "" seefor Linux - Server 2 05-12-2010 08:02 AM
xhost+ Unable to open Display atifrafi Linux - Software 1 06-26-2005 12:22 PM
xhost: unable to open display d_kote23 Fedora 1 06-03-2004 08:40 AM
xhost: unable to open display aqoliveira Linux - Networking 4 12-12-2003 04:36 PM


All times are GMT -5. The time now is 09:40 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