Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-29-2004, 02:07 AM   #1
LQ Newbie
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Rep: Reputation: 15
X-window prob - don't understand 'DISPLAY' setting

I need to install an Oracle product on linux, and for that, I have to get their installer to run, and for that, I have to get over this x-window problem. <update> I have, finally, gotten the installer to run, but I'm not sure how, or what the issues are so if you could tell me what all this means, I'd be most gratefull!

First off, let's simplify the problem. Their documentation suggests you troubleshoot with 'xclock' - the idea being, if you get that working, you have a chance with their installer. So let's forget Oracle and focus on xclock ...

Step 1
First, I launch an x-term, which logs on as myself (steerpike). I type 'xclock' and ... the xclock appears (so I know x-windows is running). I then type echo $DISPLAY, and see this:
just to see what my DISPLAY variable is.

Step 2
The oracle documentation says I should type
but after doing that, 'xclock' fails with
Error: Can't open display:
Same happens if I use, which is the ip of the network card on the laptop. I can ping both addresses on the laptop.
If I then use
Display=0.0; export DISPLAY
xclock works again.

Step 3
For the real install, I must be logged on as the oracle user. So, I type
'su - oracle' to switch to the oracle user (which was created by a script provided by Oracle).
fails with
Error: Can't open display: <blank - no address at all>

So I type
DISPLAY=:0.0; export DISPLAY
and xclock returns:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Consulting Oracle's documentation some more, I realise I must log in as 'steerpike', and type
xhost +

THEN I can flip back to my 'oracle' session, and xclock works.

So first of all, how come :0.0 works as a display address, but not, nor ?

Secondly, how come my login (steerpike) has the value for 'DISPLAY' already set (to :0.0)? I can certainly type this in each time I switch to the Oracle user, but I'd rather automate it.

Thirdly, is there a simple explanation why I have to do the 'xhost +' step?

Finally - may be related - Oracle's general instructions say I must have a fully qualified hostname ... specifically, they say:
"make sure that the following command returns a fully qualified hostname:
prompt> hostname
Now, I'm running this on a standalone laptop (for now, as a test), and 'hostname' simply returns 'linux'. I WILL, ultimately, be connecting this to a wndows network, which has a domain, but not yet. Is this something I can fake out, or simply ignore?

Thanks !

Last edited by Steerpike; 11-29-2004 at 02:42 AM.
Old 11-29-2004, 08:07 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
by default X will only listen to internal interfaces for a connection. just a tad of a security risk otherwise.

:0.0 is the default X server connection, i.e. the first one that is possible. it's set within an X level login.

xhost = security. i think you can configure X to allow those connections by default, but i can't remember how offhand. to be more secure, you should technially use xhost +localhost to prevent extenral connections getting access.

fqdn.. erm pass.


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
xlsfonts is dependant on DISPLAY setting not working on one display with Redhat iainsear Linux - General 0 12-21-2004 07:24 AM
xlsfonts is dependant on DISPLAY setting not working on one display with Redhat iainsear Linux - General 0 12-21-2004 07:19 AM
RH9 Display Prob sukhjeet Red Hat 4 09-01-2003 04:32 AM
Window Maker prob killi Linux - General 1 08-08-2003 11:14 AM
Display Prob with VGA outsider Linux - Newbie 1 09-13-2001 08:41 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration