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?
kcmshell5 kcm_kscreen
? – DK Bose Jun 27 '19 at 11:52~.profile
havingexport DISPLAY=:0.0
, I can login andkcmshell5 kcm_kscreen
shows VGA-1 at correct resolution, and list of displays as 1)No primary output
and 2) VGA-1 – David McNeill Jun 28 '19 at 23:32