From owner-freebsd-x11@FreeBSD.ORG Sun Feb 19 16:49:05 2006 Return-Path: X-Original-To: freebsd-x11@freebsd.org Delivered-To: freebsd-x11@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E09216A420 for ; Sun, 19 Feb 2006 16:49:05 +0000 (GMT) (envelope-from rperry@gti.net) Received: from apollo.gti.net (apollo.gti.net [199.171.27.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4603A43D48 for ; Sun, 19 Feb 2006 16:49:05 +0000 (GMT) (envelope-from rperry@gti.net) Received: from [208.216.115.124] (ts6m-pool0-124.gti.net [208.216.115.124]) by apollo.gti.net (mail) with ESMTP id BC47736235; Sun, 19 Feb 2006 11:44:56 -0500 (EST) Message-ID: <43F8A1B7.9010001@gti.net> Date: Sun, 19 Feb 2006 11:49:59 -0500 From: Bob Perry User-Agent: Thunderbird 1.5 (X11/20060204) MIME-Version: 1.0 To: freebsd-x11@freebsd.org, Scott Robbins Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Follow-Up Re: Unable to Startx Following Upgrade--Error in, Locking Authority File X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 16:49:05 -0000 -------- Original Message -------- Subject: Re: Unable to Startx Following Upgrade--Error in,Locking Authority File Date: Thu, 16 Feb 2006 21:49:10 -0500 From: Bob Perry To: Bob Perry , freebsd-x11@freebsd.org References: <43F40518.8000003@gti.net> <20060216055405.GB6213@mail.scottro.net> Scott Robbins wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, Feb 15, 2006 at 11:52:40PM -0500, Bob Perry wrote: > > >>> Xlib: No protocol specified >>> I have no problem running startx as root. > > I wrote: > > >>> I had a similar problem, although in my case, I suspect it's due to some >>> cheap hardware. >>> >>> At any rate, before starting X try >>> xauth -b quit >>> >>> This will break any locks. (If your problem has similar causes as mine >>> did, there will be an .Xauthority, and a couple of others--.Xauthority-c >>> and .Xauthority-l, if I remember correctly.) > > > > >> Hi Scott, >> I ran the command, xauth -b quit, but no change. You are correct however, in >> that two files, .Xauthority-c and .Xauthority-l, were present. Now only >> .Xauthority remains. >> >> Not sure what my next steps are. >> >> Bob > > > Hrrm, I'm not sure either. The xauth -b quit should remove those two > files. It did. It was explained to me on this list that they're lock files > that weren't properly removed. > > Also, I missed that you could run it as root, which means it probably > has a different cause. It's probably some silly permissions issue that > we're overlooking. > I need to review .Xauthority and see what it's all about. Hopefully, I'll find the answer soon. Thanks again, Scott, You may have been right about the "silly permissions". Google offered up the man page for the Linux mkxauth command as a possible explanation of .Xauthority. Apparently, the .Xauthority files function as an authentication database and new users must have one. According to the man page: "To create a .Xauthority file, use mkxauth -c (see (1) above). mkxauth creates a .Xauthority file in the user's home directory (~/), containing a `key' or `magic cookie' for the host it was run on (the one returned by hostname(1)). If a .Xauthority file already exists, the keys are added to it. If keys for that host already exist, they are replaced." In my case, the existing .Xauthority file in my home directory was readable and writable only by root (although rperry was shown as group id) and startx complained about writing to it (unless you were root). I added rw permissions to group and was able to access my gnome session. I also found that following this action, the .Xauthority file in my home directory changed as follows: -rw------- 1 rperry rperry 109 Feb 19 09:21 .Xauthority My desktop session was basically the same except Thunderbird, my mail client, demanded I set up a new Mail account and of course, my old mail files are missing. Up to this point, I was preparing this note as a possible solution but I ran startx again as root, then tried again as rperry and it failed. Also noted that the .Xauthority file in my home directory had once again been modified. It is now back to the original as: -rw------- 1 root rperry 0 Feb 19 10:25 .Xauthority What I failed to realize was that when substituting the root identity, I used su -m which does not change (HOME) the directory. Therefore, when running startx as root, the root .Xauthority is changed in my home directory with root permissions and file identity and startx has difficulty dealing with that when rperry wants to run startx. No more su -m to run startx as root. I rarely ran startx as root in the past but when I did I don't remember ever having a problem like this. Therefore I do not offer this as a solution but it does help me somewhat. Just a little whizzed now that I have to find my Thunderbird e-mail files. Bob Perry