From: Markus Hoenicka <markus.hoenicka@mhoenicka.de>
To: cygwin@cygwin.com
Subject: Re: X: Authorization required, but no authorization protocol specified
Date: Wed, 12 Aug 2015 06:22:00 -0000 [thread overview]
Message-ID: <114144297d60607a3c87f5fd63fb555a@mhoenicka.de> (raw)
In-Reply-To: <55C479DA.7000203@dronecode.org.uk>
At 2015-08-07 11:26, Jon TURNEY was heard to say:
> On 06/08/2015 17:56, Markus Hoenicka wrote:
>> I've upgraded my setup yesterday and ran into a problem running the X
>> server. X ran just fine before the upgrade, just like any X client I
>> threw at it. I'm aware that some defaults have changed in the couple
>> of
>> months since I upgraded, and I hope I've done everything the FAQ
>> recommends to accommodate these changes. However, no joy.
>>
>> Starting the X server now is noticeably slower, regardless of how I
>> start it (Windows start menu, startx, or my hitherto preferred method
>> startxwin). Biggest problem though is that local X clients cannot
>> connect. The server output is like this:
>>
>> $ startxwin /usr/bin/xterm
>> xauth: file /home/markus.hoenicka/.Xauthority does not exist
>> xauth: file /home/markus.hoenicka/.Xauthority does not exist
>> xauth: file /home/markus.hoenicka/.Xauthority does not exist
>> xauth: file /home/markus.hoenicka/.Xauthority does not exist
>
> startxwin is just a shell script (based on the standard startx), which
> invokes xauth to add an authorization cookie to ~/Xauthority (which is
> also passed to the server using the -auth option)
>
>> The file ~/.Xauthority is created during startup, and it is empty
>> after the server shuts down. It does not make any difference if I
>> remove the empty file before restarting the X server.
>
> It should have some (binary) content while the server is running, but
> that seems to be failing to happen, for some reason.
>
>> As a workaround I can start XWin manually like this:
>> /usr/bin/XWin :0 -multiwindow
>
> This works, of course, because this doesn't use -auth.
>
>> However, I suppose the default behaviour of startx and startxwin was
>> not
>> intended to perform like this. Did I miss something obvious?
>
> Indeed.
>
> Is there anything unusual about your home directory?
>
> You might try modifying startxwin to remove the -q from xauth -q to
> see if that reveals a bit more information.
I finally got round to run this suggested test too. The first time I try
to start X I get the following output:
$ XAUTHORITY="" startxwin /usr/bin/emacs
Using authority file /home/<username>/.serverauth.1076
Writing authority file /home/<username>/.serverauth.1076
Using authority file /home/<username>/.Xauthority
Writing authority file /home/<username>/.Xauthority
xauth: file /home/<username>/.Xauthority does not exist
xauth: file /home/<username>/.Xauthority does not exist
Using authority file /home/<username>/.Xauthority
Writing authority file /home/<username>/.Xauthority
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.17.2.0
OS: CYGWIN_NT-6.1 SBHC123 2.2.0(0.289/5/3) 2015-08-03 12:51 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.17.2-1 built 2015-07-09
XWin was started with the following command line:
/usr/bin/XWin :0 -multiwindow -auth
/home/<username>/.serverauth.1076
[...nothing interesting here...]
cat: /home/<username>/.serverauth.1076: No such file or directory
winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
OS maintains clipboard viewer chain: yes
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened
the display.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully
opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the
display.
winMultiWindowXMsgProcErrorHandler - ERROR: BadMatch (invalid parameter
attributes)
** (emacs:2996): WARNING **: Error retrieving accessibility bus address:
org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.a11y.Bus
exited with status 1
Authorization required, but no authorization protocol specified
Unable to init server: Could not connect: Abstract UNIX domain socket
addresses not supported on this system
(emacs:2996): Gtk-WARNING **: cannot open display: :0
xinit: connection to X server lost
[...normal shutdown sequence...]
Emacs does not manage to open an X window during this process. I tried
to spot .server* in a second MinTTY console during startup, but no such
file would show up although xauth claims to have written the
.serverauth.XXXX file.
Now if I run exactly the same startxwin command a second time, Emacs
*does* start up in an X window, although the startxwin output also
claims this:
cat: /home/<username>/.serverauth.2212: No such file or directory
This time, the second MinTTY console confirms the presence of that file:
$ ls -al .server*
-rw-rwx---+ 1 <username> <group> 52 Aug 12 08:03 .serverauth.2212
Could this be a timing issue while writing to a network drive? Remember
that we use roaming profiles here.
In any case, starting additional X applications still does not work,
even in the presence of that .serverauth.XXXX file. Trying to start
another xterm from the X systray menu results in:
executing 'xterm', pid 1316
(pid 1316 stderr) Authorization required, but no authorization protocol
specified
(pid 1316 stderr) xterm: Xt error: Can't open display: :0.0
So, for some reason, the existence of both .Xauthority and
.serverauth.XXXX in my $HOME is still not sufficient to start additional
X applications.
Remember that if I set XAUTHORITY to point to a file on my local disk
instead of letting startxwin pick a file in $HOME, the first X
application will always start up ok, and further X apps can be started
without any problems.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2015-08-12 6:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 16:56 Markus Hoenicka
2015-08-07 9:26 ` Jon TURNEY
2015-08-10 7:41 ` Markus Hoenicka
2015-08-10 13:13 ` cyg Simple
2015-08-10 13:27 ` Markus Hoenicka
2015-08-10 13:45 ` Achim Gratz
2015-08-10 14:11 ` Markus Hoenicka
2015-08-10 14:18 ` Markus Hoenicka
2015-08-10 16:11 ` Achim Gratz
2015-08-10 16:22 ` Markus Hoenicka
2015-08-10 13:50 ` Andrey Repin
2015-08-12 6:22 ` Markus Hoenicka [this message]
2015-08-12 12:18 ` Ken Brown
2015-08-12 12:47 ` Markus Hoenicka
2015-08-12 15:21 ` Jon TURNEY
2015-08-13 7:05 ` Markus Hoenicka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=114144297d60607a3c87f5fd63fb555a@mhoenicka.de \
--to=markus.hoenicka@mhoenicka.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).