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
  • What do you see with kcmshell5 kcm_kscreen? – DK Bose Jun 27 '19 at 11:52
  • Do you really want to know - or are you just trying to solve your X session login issue? – steeldriver Jun 27 '19 at 11:57
  • Both. I know I can fix my X login by just reinstalling, yet it's open source, I want to understand how it works, and see for myself how it went wrong. Why go to the trouble of a reinstall if a single edit to text file will fix it (or if not why not). Many problems are simple for , the person who knows that code. And of course, the next person with this issue will find a logical explanation and links to deeper understanding. – David McNeill Jun 28 '19 at 23:22
  • With ~.profile having export DISPLAY=:0.0, I can login and kcmshell5 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

0 Answers0