Re: Re^2: X not allowed by user other than root
On Sat, 27 Apr 1996, Susan G. Kleinmann wrote:
> My problem is that I can't call up any X applications unless I happen to
> be connected to my ISP by PPP. If I try, I get errors like:
> TRANS(SocketINETConnect) () can't get address for sgk
> xhost: unable to open display "sgk:0.0"
> Needless to say, this is an expensive way to run X.
What is probably happening is that startx is setting your DISPLAY variable
to sgk:0.0 (getting the sgk bit from the hostname command) instead of the
correct value, :0.0 - and this is making the X clients attempt to use
TCP/IP over the network interface corresponding to the name 'sgk'. When
you aren't connected with PPP, this interface won't exist.
There are (at least) two solutions:
1. Use xdm, which should set the DISPLAY variable properly
2. Use the 'dummy' network interface; when you are offline this interface
has the IP address associated with the name 'sgk', and acts as a loopback
interface. When you are online, the dummy interface is removed and
replaced with the real PPP interface. This should be documented in a FAQ
list or HOWTO, but I don't know offhand which one.
Steve Early
sde1000@cam.ac.uk
Reply to: