LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-29-2004, 01:07 AM   #1
Steerpike
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:
:0.0
just to see what my DISPLAY variable is.

Step 2
The oracle documentation says I should type
DISPLAY=127.0.0.1:0.0; export DISPLAY
but after doing that, 'xclock' fails with
Error: Can't open display: 127.0.0.1:0.0
Same happens if I use 192.168.0.151, 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).
xclock
fails with
Error: Can't open display: <blank - no address at all>

So I type
DISPLAY=:0.0; export DISPLAY
and xclock returns:
Code:
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 127.0.0.1:0.0, nor 192.168.0.1:0.0 ?

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:
Code:
prompt> hostname
hostname.domainname
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 01:42 AM.
 
Old 11-29-2004, 07:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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