[SLE] xhost wants a display
Following a suggestion I saw here earlier, I included the command xhost + in my system-wide profile so that I could initiate X programs under any user name from any X terminal. It seems to work, but it also generates the gratuitous error message at login: xhost: unable to open display "" Is there a way to make that message go away? The man page is unhelpful on that point. Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, What I did (following a response to my inquiry) was add the line xhost +name_of_localhost to my $HOME/.xinitrc file and I don't get any message such as xhost: unable to open display "" Ramon -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Ramon Diaz-Uriarte wrote:
Hi,
What I did (following a response to my inquiry) was add the line
xhost +name_of_localhost
to my $HOME/.xinitrc file
and I don't get any message such as xhost: unable to open display ""
Actually, I did that too after discovering the problem with putting the command in /etc/profile. But it's still unclear whether no message is being generated or whether a message is being generated that you never see. Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Thu, Dec 30, 1999 at 18:30 -0500, Paul W. Abrahams wrote:
Following a suggestion I saw here earlier, I included the command
xhost +
in my system-wide profile so that I could initiate X programs under any user name from any X terminal. It seems to work, but it also generates the gratuitous error message at login:
xhost: unable to open display ""
Is there a way to make that message go away? The man page is unhelpful on that point.
export DISPLAY=":0.0" should help. But it's probably not a good idea to do a xhost + as this allows anyone to make connections to your X server (AFAIK this can also be used to spy out what you're typing). Better use xhost +localhost so that only local users can connect or _even better_ don't use xhost at all but xauth instead (see the Security-HOWTO, man Xsecurity, man xauth). Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Stefan Troeger wrote:
Hi,
On Thu, Dec 30, 1999 at 18:30 -0500, Paul W. Abrahams wrote:
Following a suggestion I saw here earlier, I included the command
xhost +
in my system-wide profile so that I could initiate X programs under any user name from any X terminal. It seems to work, but it also generates the gratuitous error message at login:
xhost: unable to open display ""
Is there a way to make that message go away? The man page is unhelpful on that point.
export DISPLAY=":0.0" should help. But it's probably not a good idea to do a xhost + as this allows anyone to make connections to your X server (AFAIK this can also be used to spy out what you're typing). Better use xhost +localhost so that only local users can connect or _even better_ don't use xhost at all but xauth instead (see the Security-HOWTO, man Xsecurity, man xauth).
I tried what you suggested and it had no effect. I wonder if the problem could be that xhost doesn't work unless X is already running, and X isn't running when profile is executed. That would make sense, but there's nothing in the xhost man page that says it. That would imply that the xhost command belongs in .xinitrc, not profile. Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Thu, Dec 30, 1999 at 23:25 -0500, Paul W. Abrahams wrote:
I tried what you suggested and it had no effect. I wonder if the problem could be that xhost doesn't work unless X is already running, and X isn't running when profile is executed. That would make sense, but there's nothing in the xhost man page that says it. That would imply that the xhost command belongs in .xinitrc, not profile.
Yep, that's right. If you try to run xhost without X running, it will fail: [sttr]/home/sttr> export DISPLAY=":0.0" [sttr]/home/sttr> xhost + _X11TransSocketUNIXConnect: Can't connect: errno = 111 xhost: unable to open display ":0.0" Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Stefan Troeger wrote:
Hi,
On Thu, Dec 30, 1999 at 23:25 -0500, Paul W. Abrahams wrote:
I tried what you suggested and it had no effect. I wonder if the problem could be that xhost doesn't work unless X is already running, and X isn't running when profile is executed. That would make sense, but there's nothing in the xhost man page that says it. That would imply that the xhost command belongs in .xinitrc, not profile.
Yep, that's right. If you try to run xhost without X running, it will fail:
[sttr]/home/sttr> export DISPLAY=":0.0" [sttr]/home/sttr> xhost + _X11TransSocketUNIXConnect: Can't connect: errno = 111 xhost: unable to open display ":0.0"
Actually, I think the behavior is more subtle since when I included the xhost command in /etc/profile, it did seem to do the right thing despite the error message. Perhaps it sets some bit of system state that's available even when X isn't running. Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Fri, Dec 31, 1999 at 20:20 -0500, Paul W. Abrahams wrote:
Actually, I think the behavior is more subtle since when I included the xhost command in /etc/profile, it did seem to do the right thing despite the error message. Perhaps it sets some bit of system state that's available even when X isn't running.
Yes, it tells the X server what host(s) are allowed to connect to it. If there's no X server running, whom should xhost talk to? Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Fri, 31 Dec 1999, Stefan Troeger wrote: st> Hi, st> st> On Thu, Dec 30, 1999 at 18:30 -0500, Paul W. Abrahams wrote: st> st> > Following a suggestion I saw here earlier, I included the command st> > st> > xhost + st> > st> > in my system-wide profile so that I could initiate X programs under st> > any user name from any X terminal. st> > It seems to work, but it also generates the gratuitous error message st> > at login: st> > st> > xhost: unable to open display "" st> > st> > Is there a way to make that message go away? The man page is st> > unhelpful on that point. st> st> export DISPLAY=":0.0" should help. But it's probably not a good st> idea to do a xhost + as this allows anyone to make connections st> to your X server (AFAIK this can also be used to spy out what st> you're typing). Better use xhost +localhost so that only local st> users can connect or _even better_ don't use xhost at all but st> xauth instead (see the Security-HOWTO, man Xsecurity, man st> xauth). st> So with this method, what would you do, stick a line like the following in the root's .xinitrc file xauth generate :0 . or would you do an extract and merge of some sort? st> Ciao, st> Stefan st> st> st> -- S.Toms - tomas@primenet.com - homepage is in the works SuSE Linux v6.2+ - Kernel 2.2.13 Love and scandal are the best sweeteners of tea. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (4)
-
abrahams@mbs.valinet.com
-
rdiazuri@students.wisc.edu
-
sttr@sttr.de
-
tomas@primenet.com