LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-05-2008, 04:28 PM   #1
bCookie
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Rep: Reputation: Disabled
GDM, xhost, and permanently adding hosts?


Hi,

Firstly, I hope this is posted in the right forum section. I debated between several sections before deciding to post here. I apologize if this is the wrong place.

Recently I installed Debian Etch on a laptop. It has been a few years since I have used Linux so I am feeling a bit rusty.

When a user runs Xorg by itself with 'startx' or 'X' and then checking out the allow list with 'xhost', there is a default list which looks like:

Code:
INET:localhost
INET:192.168.1.160
INET6:ip6-localhost
INET6:fe80::216:6fff:fe37:ba89
LOCAL:
However, when Xorg is started from GDM, the list is completely empty, preventing me from spawning gui apps from the console into :0.0, as I am in the habit of doing, unless I first login through GDM as any user, and then issue the 'xhost +localhost' command. It is also necessary for me to host remote apps from trusted machines. What I would like to be able to do is to modify the default lists for both GDM and for displays initiated through startx.

In particular, I would like to know where GDM is hiding this configuration, why it excludes localhost by default when X includes it, where Xorg is hiding this configuration, and what is the proper way to change them without modifying .profile scripts and so forth. I have read something about a /etc/X*.hosts file, but no such file exists on my system.

Thanks for looking.

-Nick

Last edited by bCookie; 11-05-2008 at 04:33 PM.
 
Old 11-06-2008, 12:07 AM   #2
bCookie
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi again,

Well, finally after a lot of googling and some man page browsing, I found this in the man page of Xserver(1) in the "Granting Access" section, which, for the most part, satisfies my inquiry:

Quote:
The X server also uses a host-based access control list for deciding whether or not to accept connections from clients on a particular machine. If no other authorization mechanism is being used, this list initially consists of the host on which the server is running as well as any machines listed in the file /etc/Xn.hosts, where n is the display number of the server.
So I guess that explains where the initial host list comes from. And it seems gdm's initial host list is empty because its init scripts specify -auth when invoking X.

However, I should point out a discrepancy in the documentation quoted above with the actual behaviour of the software. I guess it is not so much of a logical problem as a wording problem, as the wording is somewhat misleading, and not completely clear about the exact conditions for Xn.hosts to be imported. Specifically, when another authorization mechanism is used, X imports the host list in /etc/Xn.hosts, but does not import the hostnames/addresses of the machine on which the server is running. Simply having my X0.hosts present seems to make gdm work the way I want, but this documentation leads me to believe that this shouldn't actually work. Can anyone comment on this?

Last edited by bCookie; 11-06-2008 at 12:46 AM.
 
  


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
Adding KDE in GDM krussell Ubuntu 1 08-08-2006 05:27 AM
Permanently Adding iptable rules GUIPenguin Linux - Networking 2 10-12-2004 11:27 PM
How to permanently add localhost via xhost? h00chman Linux - Newbie 1 04-23-2004 11:57 PM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 03:52 PM
permanently adding to the path hyphenage Linux - General 12 07-16-2003 01:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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