0

Where is the DISPLAY variable configured in a normal Kubuntu 18.04 installation?

I have a clean install of Kubuntu 18.04. I added vnc4server, but then accidentally started it for the first time as root. This seems to have screwed .Xauthority and demolished DISPLAY variable. This is now manifesting as can't log in, as in enter password at greeter, whereopon it hangs, no desktop appears. I have purged xnv4server, but still stuck.

Logging in from ctrl-alt session 2, or ssh, DISPLAY is indeed blank. I could perhaps set it in .profile, but I don't want to compound the problem, or make the system unstable when another monitor is plugged into the second DisplayPort, or when VNC gets reinstalled, or ssh -X etc.

There are plenty of questions/answers on what DISPLAY is, and needing to be :0.0 etc, but nowhere does anyone say WHERE or HOW it is actually set in a normal real unmangled 18.04 startup. The X startup scripts seem to be a convoluted mess, accumulated over many years of munge. It dives in and out of Xsession, xinit, Xauthority, sddm etc.

So, wise beans, where is DISPLAY normally built/generated/configured/set?

And where might I have found the definitive documentation on this, had my search-foo been stronger, and DISPLAY not been an awkward, ambiguous keyword?

David McNeill
  • 356
  • 2
  • 7

0 Answers0