On Fri, Aug 30, 2024 at 02:30:32PM CEST, Max Nikulin <maniku...@gmail.com> said: > Have you checked that emacs.service is started at proper moment (journalctl > --user)? At first I did not add empty WantedBy and it caused earlier start > of ssh-agent.service instead of delay of emacs.service. > > It might be reasonable to start emacs from default.target, e.g. for ssh > logins (however emacs.socket to start it on demand might be better) and > updating environment using "emacsclient --eval" sounds viable. > > Notice that other KDE-specific configuration (~/.config/plasma-localerc, > ~/.config/plasma-workspace/env) or ~/.profile sourced by SDDM may be ignored > by emacs in the case of early start.
You are right, I did not think to check journal... Aug 30 13:29:25 lp053 systemd[1]: Started user@1000.service - User Manager for UID 1000. Aug 30 13:29:25 lp053 systemd[1767]: Starting emacs.service - Emacs text editor... ^^^^^^^^^^ Too early ^^^^^^^^^^^ Aug 30 13:29:25 lp053 systemd[1767]: Starting pulseaudio.service - Sound Service... Aug 30 13:29:25 lp053 systemd[1]: Started session-3.scope - Session 3 of User erwan. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Successfully made thread 1786 of process 1786 owned by '1000' high priority at nice level -11. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Supervising 1 threads of 1 processes of 1 users. Aug 30 13:29:25 lp053 sddm-helper[1795]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket Aug 30 13:29:25 lp053 sddm-helper[1764]: pam_env(sddm:session): deprecated reading of user environment enabled Aug 30 13:29:25 lp053 sddm-helper[1764]: Starting: "/etc/sddm/Xsession \"/usr/bin/startplasma-x11\"" Aug 30 13:29:25 lp053 sddm-helper[1797]: Adding cookie to "/home/erwan/.Xauthority" Aug 30 13:29:25 lp053 sddm[1301]: Session started Aug 30 13:29:25 lp053 systemd[1767]: Starting dbus.service - D-Bus User Message Bus... Aug 30 13:29:25 lp053 systemd[1767]: Started dbus.service - D-Bus User Message Bus. Aug 30 13:29:25 lp053 emacs[1785]: Warning: due to a long standing Gtk+ bug Aug 30 13:29:25 lp053 emacs[1785]: https://gitlab.gnome.org/GNOME/gtk/issues/221 Aug 30 13:29:25 lp053 emacs[1785]: Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost. Aug 30 13:29:25 lp053 emacs[1785]: Using an Emacs configured with --with-x-toolkit=lucid does not have this problem. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Supervising 1 threads of 1 processes of 1 users. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Successfully made thread 1846 of process 1786 owned by '1000' RT at priority 5. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Supervising 2 threads of 1 processes of 1 users. Aug 30 13:29:25 lp053 rtkit-daemon[1659]: Supervising 2 threads of 1 processes of 1 users. Aug 30 13:29:26 lp053 rtkit-daemon[1659]: Successfully made thread 1850 of process 1786 owned by '1000' RT at priority 5. Aug 30 13:29:26 lp053 rtkit-daemon[1659]: Supervising 3 threads of 1 processes of 1 users. Aug 30 13:29:26 lp053 systemd[1767]: Reloading requested from client PID 1797 ('startplasma-x11')... Aug 30 13:29:26 lp053 systemd[1767]: Reloading... (thats without the require/wants) I'll continue investigating in this direction. -- Erwan David