[NTLUG:Discuss] console ownership

Mark Bickel eusmb at exu.ericsson.se
Mon Feb 25 10:30:18 CST 2002


> From discuss-admin at ntlug.org Sat Feb 23 18:30 CST 2002
> From: Jay Cox <sqrtofone at yahoo.com>
> To: <discuss at ntlug.org>
> Subject: Re: [NTLUG:Discuss] console ownership
> List-Archive: <http://www.ntlug.org/pipermail/discuss/>
> Date: Sat, 23 Feb 2002 18:46:29 -0600 (CST)
> 
> On Fri, 22 Feb 2002, Vaidya, Harshal (Cognizant) wrote:
> 
> > what do you mean by console ownership.
> > i am having this error
> >
> > Authentication failed - cannot start X server.
> > Perhaps you do not have console ownership?
 
> Did you su to another user in that terminal before you did this? That's
> one way to get that error.

man xhost

If you su to a user other than the one that you started the X session with,
you may need to do "xhost + [user]" for the alternate user to be able to 
display X client applications. Example:

user1 at myhost_> xhost + user2
user2 being added to access control list
user1 at myhost_> su user2
Password:
user2 at myhost_> myprog &

Note: If the $DISPLAY variable is not set for user2, you may need to do
"setenv $DISPLAY=[hostname or ip:]0.0" or "set $DISPLAY=[hostname or ip:]0.0;
export $DISPLAY" depending on what shell you are running. My example above
is actually from Solaris (since that's what I'm writing this from) but things
should work much the same from Linux WRT setting $DISPLAY and ACL for Xserver.

"xhost + [hostname or ip]" can also be used to add an alternate host to the 
Xserver's ACL. "xhost +" with no user or host name will disable authentication
completely, leaving the Xserver wide open to accept connections from anyone.

HTH,
Mark dought Bickel_at_ericsson dought com




More information about the Discuss mailing list