You are not logged in.
Hi. I would like to start a Plasma session at boot with automatic login. Here is what I did so far.
In `/etc/systemd/system/getty@tty1.service.d/override.conf`, I have
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin polomi --noclear %I $TERM
Type=simple
as suggested here.
Then, in `$/.bashrc`, I have
if [[ -z ${DISPLAY} ]] && [[ $(tty) = /dev/tty1 ]] && [ -x /usr/bin/startplasma-wayland ]; then
export XDG_SESSION_TYPE=wayland
exec dbus-run-session startplasma-wayland
fi
as inspired by this.
This logs me in and starts Plasma, as desired. However, in the Plasma session, when I click shut down through the start menu, it quits Plasma, and then autologs me back in again. Instead, I would like the computer to shut down.
The getty service must be getting restarted for some reason. I'm not sure how Plasma tries to shut down, but if I just do a `shutdown now` in the terminal from Plasma, that works properly. Do you have any insight in what is going on, or how I could make Plasma shut down properly?
EDIT: I kind of got a feeling and found out why it happens. It's the `exec` in the bashrc. It seems to work if I remove it and just fork instead.
Last edited by polomi (2022-01-07 11:51:56)
Offline