Skip to content

Niri: autostart of services #8

@Nivalux

Description

@Nivalux

Hi,

does the autostart of services via xdg-desktop-autostart.target work for you?
For me I think it starts to early, when Niri isn't fully ready yet.
Same for waybar and others.

If I want to start waybar, then I have to add it to niri.wants. Then it works most of the time, but not always.

I'm using Ly as a login manager. Not sure, how that accects things.

Another example, the swww-backdrop.service starts to early I think. This is in the log:
swww-daemon-backdrop was skipped because of an unmet condition check (ConditionEnvironment=WAYLAND_DISPLAY).

Not sure how to solve this. Do I need to add a custom niri service / target, which all other targets depend on and then start that custom unit via the niri-startup?

This is my niri.service status

systemctl --user status niri.service
● niri.service - A scrollable-tiling Wayland compositor
     Loaded: loaded (/etc/systemd/user/niri.service; linked-runtime; preset: ignored)
     Active: active (running) since Fri 2025-10-10 11:30:19 CEST; 24min ago
 Invocation: e9a6abc7993b4b56b25007d71fd0394a
   Main PID: 2512 (niri)
      Tasks: 22 (limit: 38250)
     Memory: 150.8M (peak: 157.6M)
        CPU: 2min 12.111s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/niri.service
             ├─2512 /nix/store/40jfg13slzjpfyfxv58xvw6gp4gcdkzh-niri-25.08/bin/niri --session
             ├─2735 /nix/store/mz0jcqd5b567r78h1274xd3i562ssk9r-xwayland-satellite-0.7/bin/xwayland-satellite :0 -listenfd 120 -listenfd 77
             ├─2736 Xwayland :0 -listenfd 120 -listenfd 77 -rootless -force-xrandr-emulation -wm 7 -displayfd 8
             ├─4290 cat
             └─4291 cat
systemctl --user list-dependencies xdg-desktop-autostart.target
xdg-desktop-autostart.target
× ├─app-blueman@autostart.service
× ├─app-com.mitchellh.ghostty@autostart.service
○ ├─app-com.synology.SynologyDrive@autostart.service
○ ├─app-gnome\x2dkeyring\x2dpkcs11@autostart.service
○ ├─app-gnome\x2dkeyring\x2dsecrets@autostart.service
○ ├─app-gnome\x2dkeyring\x2dssh@autostart.service
× └─app-remmina\x2dapplet@autostart.service
systemctl --user list-dependencies graphical-session.target
graphical-session.target
× ├─app-blueman@autostart.service
× ├─app-com.mitchellh.ghostty@autostart.service
○ ├─app-com.synology.SynologyDrive@autostart.service
○ ├─app-gnome\x2dkeyring\x2dpkcs11@autostart.service
○ ├─app-gnome\x2dkeyring\x2dsecrets@autostart.service
○ ├─app-gnome\x2dkeyring\x2dssh@autostart.service
× ├─app-remmina\x2dapplet@autostart.service
× ├─cliphist-images.service
× ├─cliphist.service
● ├─dunst.service
● ├─flatpak-session-helper.service
● ├─gvfs-daemon.service
○ ├─hypridle.service
○ ├─swww-backdrop.service
○ ├─swww.service
● ├─waybar.service
● ├─xdg-desktop-portal-gnome.service
● ├─xdg-desktop-portal-gtk.service
● ├─xdg-desktop-portal.service
● ├─xdg-document-portal.service
● ├─xdg-permission-store.service
● └─basic.target
●   ├─systemd-tmpfiles-setup.service
●   ├─paths.target
●   ├─sockets.target
●   │ ├─dbus.socket
●   │ ├─gpg-agent-ssh.socket
●   │ ├─gpg-agent.socket
●   │ ├─pipewire-pulse.socket
●   │ ├─pipewire.socket
●   │ ├─podman.socket
●   │ └─speech-dispatcher.socket
●   └─timers.target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions