How to create .Xauthority file in Ubuntu GNOME 17.04
Note that the GNOME display manager gdm3
does not use ~/.Xauthority
so this may require an application-specific answer for VNC Connect. As the manual page says, "Upon session startup, GDM sets the XAUTHORITY environment variable to a session-specific file in /var/run/gdm3
. Applications and scripts that assume this file is set to ~/.Xauthority
will not work. To access the display you need both DISPLAY
and XAUTHORITY
variables."
I wound up on this page because the missing .Xauthority
issue also arises when trying to run graphical applications as root on Wayland (Ubuntu GNOME 17.10). As described at https://wiki.archlinux.org/index.php/Running_X_apps_as_root, the fallback X server won't work when running programs as root, but you can fix this by first running xhost +local:
. Possibly a similar approach will address the VNC Connect issue.
Related videos on Youtube
Amolith
I'm a Linux sysadmin and professional multi-instrumentalist as well as the founder and admin of NixNet, a network of sites and services I run for free. I'm also a member of the librehosters network and of UBports' Community Steering Committee.
Updated on September 18, 2022Comments
-
Amolith over 1 year
Stressing 17.04.
I want to use VNC Connect to I can use my computer from my phone. However, I do not have a
.Xauthority
file. I saw the other question, "How do I create the.Xauthority
file?" and it is for Ubuntu 10.10.I'm stressing the difference between this question and that question because this isn't a dupe question; the
.Xauthority
file is bound to be vastly different from 7 years ago.I have the
.ICEauthority
file but no.Xauthority
file. I don't know what other information I need to provide, but I will if I can.-
You'reAGitForNotUsingGit over 6 yearsAFAIK it's generated by default. If I delete it and restart X, it gets regenerated.
-
Amolith over 6 years@AndroidDev What is X?
-
You'reAGitForNotUsingGit over 6 yearsX11 is the "kernel" of the UI if you will.
-
Amolith over 6 years@AndroidDev So how do I restart X11?
-
You'reAGitForNotUsingGit over 6 yearsI usually go to
tty1
and dosudo service lightdm restart
-
Amolith over 6 years@AndroidDev What's
tty1
? -
You'reAGitForNotUsingGit over 6 yearsIt's one of many virtual terminals. You can access it by pressing
CTRL+ALT+F1
. And you can get back to the GUI by switching totty7
, withCTRL+ALT+F7
-
Amolith over 6 yearsLet us continue this discussion in chat.
-