I have searched the existing open and closed issues
Required Information
DietPi version 9.14
Distro version | Bookworm
Kernel version | 6.12.20
Architecture | arm64
SBC model | RPi4
I have a similiar issue like mentioned above. Tried everything what was mentioned there but I have no devce timeouts. And would also not start after a delay.
As my standard user I can autologin to console, and startx into mate. That works.
But autologin to Desktoop does not- I tried 16 and in diet-pi-autostart. Both only brings me to the ‘hit return to login’ prompt. It works fine with root.
I tried downgrading to version 1.26
I have now added startx to my .bashrc what kind of works but I’d like to know what’s going on.
I have no clue what to do anymore since it coorelates with problem no 2. I have a feeling that it has to do with the vnc server.
I am using TigerVNC to usually connect via vnc to the server since it’s remote. But that doesn’t work anmore if I have an active desktop running on my monitor. And vice versa, so the autologin maybe fails because the vncserver is already started. I can also not start a desktop if an active vnc desktop is running. The error message: “Could not acquire name on session bus”.
I tried the SHARE_DESKTOP=1 setting in Dietpi.txt but that didnt work either.
One point I just want to mention because I don’t know whether it’s important or not: I know that I run xhost + on startup. I forgot why exactly that was neccessary but I think it was because of vncserver not working without it.
No, the sysmlink does not exist.
and
❯ cat /etc/X11/default-display-manager
/usr/sbin/lightdm
❯ systemctl status display-manager.service
Unit display-manager.service could not be found.
systemctl show -p WantedBy display-manager
WantedBy=graphical.target
update: I have created the link and started the service.
It seems to work, got a login mask could login.
Then changed autostart to 16 and 2 again und that still didnt work.
After reboot
systemctl status display-manager.service
lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled
; preset: enabled)
Active: inactive (dead)
Please try again to select one of the two desktop options in dietpi-autostart. If you select a different user than root, the symlink is created, or you would see an error prompt.
It is essential for LightDM to start, there is no other (intended) mechanism. Even
systemctl enable lightdm
does nothing else than creating that symlink, just with a bunch of noisy hassle around (which is why we skip it).
You are right if I choose 2 or 16 the link will be created. It wasn’t because 2 and 16 are not working and I switched to 7. Autologin to console works and hence I chose to add
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
exec startx
fi
to my .bashrc.
This actually works.
Everything else still doesn’t. If I go to 2 or 16 there won’t be a login.
To avoid misinterpretation, I am on autostart setting 7 right now because that is the only way I get it running. Problems occur with 2.
If I do what you said:
systemctl start lightdm
starts the login mask and journalctl:
Jun 21 16:48:17 THALIN systemd[1]: Starting lightdm.service - Light Display Manager...
Jun 21 16:48:17 THALIN systemd[1]: Started lightdm.service - Light Display Manager.
Jun 21 16:48:19 THALIN lightdm[433633]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=105) by (uid=0)
Okay, so the LightDM service generally works well, and the symlink is created. But despite that, the service does not seem to be started, even if the symlink exists?
Can you check the following:
systemctl show -p WantedBy display-manager
journalctl -u graphical.target
Ah, and maybe, since display-manager.service is invoked, not lightdm.service, we just checked for the wrong unit in the logs. So with autostart option 2 or 16, if LightDM does not show up:
Ok I managed to get Realvnc running, so that’s out of he way.
Regarding the LightDM. I don’t know what you are refering to. I think you always think that I am on one of th eautostart options 2 or 16 but I am - and that’s why I said this: “To avoid misinterpretation, I am on autostart setting 7”. Nothing is working unless I do it myself aka exec startx.
Let me know if you want to try fixing the autostart options 2 or 16 for you, since this is what I intended to. You did show output of LightDM service logs, showing that it started, so I assume, to get these logs, you did enable option 2 or 16, and hence I was asking whether, in this case you had a LightDM login prompt or desktop on your locally attached screen.