Re: X access control



Witek Jarnas staggered into the Black Sun and said:
How can I enable applications from localhost to be run on user's
display? I have to execute "xhost +localhost" everytime I start a
user's session.

Are you *sure* you're doing it right? Most X servers are started with
"-nolisten tcp" these days. The syntax you use now is "xhost +local:",
which allows X clients on machine1 to connect to the X socket in
/tmp/.X11-unix/ on machine1.

export DISPLAY=:0.0 ; [ "$DISPLAY" != "" ] && xhost +

That's not right either. "xhost +" removes all access control, which is
a Very Bad Idea if your X server is listening for TCP.

but it takes [a] long time to log on [when the] X server is not
running. Is there any system wide file of where I can disable access
control for localhost?

No.

If not, how can I configure it correctly ?

See first paragraph. In my tests, a user who does not have access to :0
, sets DISPLAY to :0, and does "xhost +local:" sees the command return
with an error message in < 1 second.

--
I will rule you all with my iron fist. YOU! Obey the fist!
--Invader Zim
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.



Relevant Pages

  • xhost +localhost has no effect
    ... a different regular user to run X apps. ... I googled it and found lots of hits, all saying to use "xhost ... though it claims "localhost being added to access control list"). ... If I do "xhost +", then it disables access control, and I can do what I ...
    (Debian-User)
  • Re: system32driversetchosts doesnt get read
    ... That is the localhost address ... Are the entries for local, or for distant, servers? ... remember to run "ipconfig /flushdns" after making changes. ... How about you provide an example of a Hosts file entry that you made, ...
    (microsoft.public.windowsxp.network_web)
  • Re: su/sudo cannot X
    ... If 'xhost +' no longer disables all access control, ... > This should be considered to be a security feature. ...
    (Debian-User)
  • RE: Sendmail Question
    ... I thought that to send emails you need to ... >> servers and then upon getting the MX server, ... I'd be willing to bet it was submitted from localhost. ... I'm not concerned about being an open relay. ...
    (Fedora)
  • Re: [SLE] red-carpet question
    ... > After adding localhost to the access crontrol list ... > Error importing gtk: could not open display ... Now it is "xhost +local:localhost" ... Mail has the best spam protection around ...
    (SuSE)