LightDM does not work with VNC logging - login page not displayed for remote client

I decided to give LightDM a try. It is supposed to also support XDMC. Unfortunately, the openSuse version doesn’t to seem to work with VNC. Or at least not out of the box. Can anyone help?

When accessing the box directly, LightDM clearly works, I was able to log in to my usual account. But when accessed by VNC, same working setup as with GDM, using Windows TigerVNC client, it does not work. It clearly connects, but all I get is a second lasting black window with a “X” cursor, so “something” is happening, but then the client window is automatically closed with a failure message.

I’ve been using GDM with VNC for a long time and it still works well. My setup is a home “terminal server”, a box without peripherals, intended to be used via VNC and SSH and as a file server. So I need display manager with XDMC support so I can log in using VNC. I also use VNC Manager to manage the sessions. I didn’t have to configure GDM in any way, to make it work with remote logging; it worked with VNC out of the box.

I switched DM following manual https://en.opensuse.org/SDB:Change_Display_Manager:
upadte-alternatives --config default-displaymanager

According to https://wiki.archlinux.org/index.php/LightDM, there should be conf file /etc/lightdm/lightdm.conf with vital settings:


[VNCServer]
enabled=true
...
[XDMCPServer]
enabled=true
...

But no such file exists in openSuse version.

I read somewhere else that openSuse provides modified (patched) versions of popular DMs in order to make them to source some setting from /etc/sysconfig/displaymanager. Assuming that they have a bug there, and VNCServer/XDMCPServer are not being correctly, is there a way I can provide this settings directly to LightDM? Can I create lightdm.conf? And would openSuse’s LightDM recognize it?

I have reported this as a possible bug, https://bugzilla.opensuse.org/show_bug.cgi?id=1151530, but I thought someone here might have some ideas, perhaps facing the same issue too, so I am sharing it here too.

Many people who installed KDE/Plasma have switched from SDDM to LightDM to enable support for VNC, but I don’t know how many if any are using XDMC.

Here is how the LightDM configuration is implemented on my 15.1, you may want to install the locate utility (package mlocate) to do a similar search on your own

locate lightdm.conf

/etc/xdg/lightdm/lightdm.conf.d
/usr/share/doc/packages/lightdm/lightdm.conf.example
/usr/share/lightdm/lightdm.conf.d
/usr/share/lightdm/lightdm.conf.d/50-suse-defaults.conf

TSU

Hi TSU,
Thank you for your reply.

I sure do how to search files in Linux FS, both in CLI and GUI. I am aware that there are similarly named files. Question was, what and were I can edit to apply this extra settings and if it possible at all. It’s strange that GDM has them all out of the box.
I will probably have to find out experimentally, try and error; it’s time consuming and I just hoped that someone may know.
What if openSuse’s LightDM sources all setting only from /etc/systemconfig?

Many people who installed KDE/Plasma have switched from SDDM to LightDM to enable support for VNC, but I don’t know how many if any are using XDMC.

One would say that it must be everyone. You can start ad-hoc VNC session, like sharing your current screen, with any DM, to my best knowledge even with SDDM. You need XDMC only when log in remotely (graphically) and start a new VNC session this way; DM is part of the VNC session itself in this case, so the DM must be “VNC aware” and XDMC is to make it happen.

/usr/share/lightdm/lightdm.conf.d/50-suse-defaults.conf

Should be the one. openSUSE has been moving to single files for each section in a config like the xorg file structures.

So create it.

Files under /usr are distribution defaults, are overwritten on package update and should not be modified. Local changes go under /etc.

Yep, “/usr/share/lightdm/lightdm.conf.d/50-suse-defaults.conf” is somewhat brief:


[Seat:*]
pam-service = lightdm
pam-autologin-service = lightdm-autologin
pam-greeter-service = lightdm-greeter
xserver-command=/usr/bin/X
session-wrapper=/etc/X11/xdm/Xsession
greeter-setup-script=/etc/X11/xdm/Xsetup
session-setup-script=/etc/X11/xdm/Xstartup
session-cleanup-script=/etc/X11/xdm/Xreset

If those are the only default settings than it’s definitively not enough. Though many more can be hard coded into the C code. It’s difficult to guess.

gogalthorp:
In this new brave world of fragmented cofigs, where am I supposed to put my user overrides?

It’s clearly not to be done in anywhere in /usr, on that is “arvidjaar” absolutely correct.

So should I still create “/etc/lightdm/lightdm.conf”?
And hope that the setting will be merged somehow?
And that patched openSuse’s LightDM would not ignore this file completely?
What if openSuse’s LightDM takes some setting only from /etc/systemconfig?

I will check this tomorrow if I have some tome for experiments.

Support for loading config from /usr/share and lightdm.conf.d was added 6 years ago. It is hardly “new” by any measure.

What if openSuse’s LightDM takes some setting only from /etc/systemconfig?

You may want to read /usr/share/doc/packages/lightdm/lightdm.conf.example.

So the problem is - somewhere else.
OpenSuse’s LightDM does start XDMCP by default.
LightDM has a neat log in /var/log/lightdm, and there it clearly says:


+0.01s] DEBUG: Starting XDMCP server on UDP/IP port 177

The bug is somewhere else: LightDM remote login page does not work with auto-login.

When I disabled auto-login in /etc/sysconfig/displaymanager, by setting DISPLAYMANAGER_AUTOLOGIN="", it all works perfectly. I am able to log in with VNC. I can clearly see LightDM Greeter, Suse branded by default, distinctly different from GDM.
And I can log in and it starts a normal VNC remote desktop session for me.
When I set auto-login to any user, the remote login page is not displayed anymore and session disconnects nearly immediately, after a short “flick”.
It’s a bummer for me. I use auto login to auto-login Kodi, because the my “terminal” server is connected to a TV and also serves as “Kodi station” (home media theater).

GDM allows both auto-login and VNC remote login at the same time. I don’t understand why LightDM wouldn’t. It looks more like a bug to me. I’ll report it to bugzilla.

No, it does not. It would be security issue if it did. You must have some custom LightDM configuration where remote access is enabled.

Not really. lightdm attempts auto-login on VNC/XDMCP connection and it fails (because somebody decided that though shalt not have more than one session). It is not lightdm restriction but logind.

The real (upstream) lightdm problem is that it is impossible to override seat configuration for XDMCP or VNC. Because SUSE extensions propagate autologin from /etc/sysconfig/displaymanager into default seat, it is inherited by remote sessions and any Seat:vnc* section is simply ignored.

I do not claim to fully understand lightdm seat management here; it may be possible to make it work by disabling auto-login globally and enabling it for local Seat0. Of course it means /etc/sysconfig/displaymanager (and so YaST management) cannot be used.

I’ll report it to bugzilla.

Post bug reference here.

Yes, that works. Of course, any attempt to log in remotely as auto-login user fails. Different user is possible.