Xauthority is missing the display number

Multi tool use
When I run on my local machine (Ubuntu 18.10) xauth list
the output is not showing the display number:
$ xauth list
c7h/unix: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
#ffff#633768#: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
My env $DISPLAY
variable contains the value :1
:
$ echo $DISPLAY
:1
So I was expecting to see 1
after c7h/unix:
:
c7h/unix:1 MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
The value is also missing if I manually parse the file inside the env variable $XAUTHORITY
with Python:
if filename is None:
filename = os.environ.get('XAUTHORITY')
if filename is None:
try:
filename = os.path.join(os.environ['HOME'], '.Xauthority')
except KeyError:
raise XConnectionError("$HOME not set, can't find ~/.Xauthority")
try:
xaf = open(filename, 'rb')
raw = xaf.read()
xaf.close()
except IOError as err:
raise XConnectionError("Can't read ~/.Xauthority: %s" % err[1])
return
n = 0
entries =
try:
while n < len(raw):
family, = struct.unpack('>H', raw[n:n + 2])
n = n + 2
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
addr = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
num = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
name = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
data = raw[n - length: n]
if len(data) != length:
break
entries.append((family, addr.decode('utf-8'), num.decode('utf-8'), name.decode('utf-8'), data))
How can I figure out which of the auth is the one associated with the value reported by $DISPLAY
?
linux xorg xauth
add a comment |
When I run on my local machine (Ubuntu 18.10) xauth list
the output is not showing the display number:
$ xauth list
c7h/unix: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
#ffff#633768#: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
My env $DISPLAY
variable contains the value :1
:
$ echo $DISPLAY
:1
So I was expecting to see 1
after c7h/unix:
:
c7h/unix:1 MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
The value is also missing if I manually parse the file inside the env variable $XAUTHORITY
with Python:
if filename is None:
filename = os.environ.get('XAUTHORITY')
if filename is None:
try:
filename = os.path.join(os.environ['HOME'], '.Xauthority')
except KeyError:
raise XConnectionError("$HOME not set, can't find ~/.Xauthority")
try:
xaf = open(filename, 'rb')
raw = xaf.read()
xaf.close()
except IOError as err:
raise XConnectionError("Can't read ~/.Xauthority: %s" % err[1])
return
n = 0
entries =
try:
while n < len(raw):
family, = struct.unpack('>H', raw[n:n + 2])
n = n + 2
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
addr = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
num = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
name = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
data = raw[n - length: n]
if len(data) != length:
break
entries.append((family, addr.decode('utf-8'), num.decode('utf-8'), name.decode('utf-8'), data))
How can I figure out which of the auth is the one associated with the value reported by $DISPLAY
?
linux xorg xauth
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
Your second cookie also looks not quite right. What happens when youxauth extract some_file :1
and thenxauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".
– dirkt
2 days ago
Unfortunately the result is exactly the same as the$XAUTHORITY
one.
– Roberto Leinardi
2 days ago
add a comment |
When I run on my local machine (Ubuntu 18.10) xauth list
the output is not showing the display number:
$ xauth list
c7h/unix: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
#ffff#633768#: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
My env $DISPLAY
variable contains the value :1
:
$ echo $DISPLAY
:1
So I was expecting to see 1
after c7h/unix:
:
c7h/unix:1 MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
The value is also missing if I manually parse the file inside the env variable $XAUTHORITY
with Python:
if filename is None:
filename = os.environ.get('XAUTHORITY')
if filename is None:
try:
filename = os.path.join(os.environ['HOME'], '.Xauthority')
except KeyError:
raise XConnectionError("$HOME not set, can't find ~/.Xauthority")
try:
xaf = open(filename, 'rb')
raw = xaf.read()
xaf.close()
except IOError as err:
raise XConnectionError("Can't read ~/.Xauthority: %s" % err[1])
return
n = 0
entries =
try:
while n < len(raw):
family, = struct.unpack('>H', raw[n:n + 2])
n = n + 2
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
addr = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
num = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
name = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
data = raw[n - length: n]
if len(data) != length:
break
entries.append((family, addr.decode('utf-8'), num.decode('utf-8'), name.decode('utf-8'), data))
How can I figure out which of the auth is the one associated with the value reported by $DISPLAY
?
linux xorg xauth
When I run on my local machine (Ubuntu 18.10) xauth list
the output is not showing the display number:
$ xauth list
c7h/unix: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
#ffff#633768#: MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
My env $DISPLAY
variable contains the value :1
:
$ echo $DISPLAY
:1
So I was expecting to see 1
after c7h/unix:
:
c7h/unix:1 MIT-MAGIC-COOKIE-1 37bb744d95232b4e29aea1320b0a0e2d
The value is also missing if I manually parse the file inside the env variable $XAUTHORITY
with Python:
if filename is None:
filename = os.environ.get('XAUTHORITY')
if filename is None:
try:
filename = os.path.join(os.environ['HOME'], '.Xauthority')
except KeyError:
raise XConnectionError("$HOME not set, can't find ~/.Xauthority")
try:
xaf = open(filename, 'rb')
raw = xaf.read()
xaf.close()
except IOError as err:
raise XConnectionError("Can't read ~/.Xauthority: %s" % err[1])
return
n = 0
entries =
try:
while n < len(raw):
family, = struct.unpack('>H', raw[n:n + 2])
n = n + 2
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
addr = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
num = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
name = raw[n - length: n]
length, = struct.unpack('>H', raw[n:n + 2])
n = n + length + 2
data = raw[n - length: n]
if len(data) != length:
break
entries.append((family, addr.decode('utf-8'), num.decode('utf-8'), name.decode('utf-8'), data))
How can I figure out which of the auth is the one associated with the value reported by $DISPLAY
?
linux xorg xauth
linux xorg xauth
edited 2 days ago
Roberto Leinardi
asked 2 days ago
Roberto LeinardiRoberto Leinardi
1214
1214
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
Your second cookie also looks not quite right. What happens when youxauth extract some_file :1
and thenxauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".
– dirkt
2 days ago
Unfortunately the result is exactly the same as the$XAUTHORITY
one.
– Roberto Leinardi
2 days ago
add a comment |
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
Your second cookie also looks not quite right. What happens when youxauth extract some_file :1
and thenxauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".
– dirkt
2 days ago
Unfortunately the result is exactly the same as the$XAUTHORITY
one.
– Roberto Leinardi
2 days ago
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
Your second cookie also looks not quite right. What happens when you
xauth extract some_file :1
and then xauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".– dirkt
2 days ago
Your second cookie also looks not quite right. What happens when you
xauth extract some_file :1
and then xauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".– dirkt
2 days ago
Unfortunately the result is exactly the same as the
$XAUTHORITY
one.– Roberto Leinardi
2 days ago
Unfortunately the result is exactly the same as the
$XAUTHORITY
one.– Roberto Leinardi
2 days ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390857%2fxauthority-is-missing-the-display-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390857%2fxauthority-is-missing-the-display-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
pwroUD396UD c6aLw
@grawity I'm using Ubuntu 18.10. Standard installation with GDM and Gnome Shell.
– Roberto Leinardi
2 days ago
Your second cookie also looks not quite right. What happens when you
xauth extract some_file :1
and thenxauth -f some_file list
? If you get the first line again, I don't understand what's happening. If you get a different line, my guess would be "auth file corrupt; remove it, log out, log in, see if it gets better".– dirkt
2 days ago
Unfortunately the result is exactly the same as the
$XAUTHORITY
one.– Roberto Leinardi
2 days ago