You are not logged in.
I followed the Arch wiki to start/autologin Plasma/Wayland without using any display manager.
│ File: .zprofile
───────────────────────────────────────────────────
# ~/.zprofile
# sourced by zsh when used as a login shell
[[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] && XDG_SESSION_TYPE=wayland /usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland #Plasma/Wayland
# /etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin juan --noclear %I $TERM
But the "problem" is that it starts Plasma before the network is online. I want to start Plasma when "graphical-session.target". How can I do this without display manager?
Last edited by j1simon (2021-11-26 16:05:40)
Offline
Why and for what reason is this a problem? This can technically be done but depends on what you're using for establishing the connection or you delay general startup by making an unit that only continues once a connection is established. But without more context I don't even know for what reason this would be an issue. Plasma as a session should not really require a generally working network connection.
Last edited by V1del (2021-11-26 15:18:22)
Online
Plasma can boot without the network being online but some of the programs/widgets I use on the desktop do need it. On the other hand, using the wiki method the graphical environment (Plasma) starts earlier than it would if I used a display manager.
Why don't I use SDDM? Because it "hangs" when restarting or shutting down the computer: https://bbs.archlinux.org/viewtopic.php?id=271475
Offline
The graphical.target does not depend on the network-online.target - plasma starts faster because you've no clumsy DM in the way.
You can
for ((i=0;i<30;++i)); do ping -qc1 google.com&& break; done
to wait for some sort of internet connection and a limited time.
Offline
While I think this is an ugly hack and technically a bug in these widgets as they should have API to query for network connectivity, if you're using network manager you can run nm-online (... potentially with a timeout) before executing the plasma session, which will block until network manager has established a connection.
... or do some generic pings of course
Last edited by V1del (2021-11-26 15:53:14)
Online
I solved it by adding this to the file /etc/systemd/system/getty@tty1.service.d/override.conf:
[Unit]
Wants=network-online.target
After=network.target network-online.target
...
Offline