use NIRI_SOCKET variable in systemd user services #527
Replies: 4 comments 13 replies
-
Are you on NixOS? It seems to have some problem with graphical-session.target dependencies, so you could try replacing them with niri.service dependencies. |
Beta Was this translation helpful? Give feedback.
-
I kept having this problem, but I just had time for some additional debugging, and it seems that the NIRI_SOCKET variable contains the wrong or old NIRI_SOCKET value. NIRI_SOCKET of the service: /run/user/1000/niri.wayland-1.2668771.sock Is this a systemd bug maybe? |
Beta Was this translation helpful? Give feedback.
-
FYI, this is the expected order of events (copying from my message in sodiboo/niri-flake#348):
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed explanation. The problem was not related to niri at all. |
Beta Was this translation helpful? Give feedback.
-
Hi everybody,
I try to start 2 services which need to communicate with niri as systemd user services.
One is the xwayland-satellite and one is a rust service which uses the niri-ipc crate to communicate with niri.
Both systemd files look like that.
The problem I am having is that the services start to fast, so that the NIRI_SOCKET variable is not yet set.
niri-ipc reports the missing env var.
If I restart the 2 services everything is working fine, so I think systemd is not waiting long enough before it starts those 2 services.
Has anybody done something similar or does know how I can configure the systemd service to wait for the env var to be present?
System: Arch Linux
DisplayManager: GDM
Beta Was this translation helpful? Give feedback.
All reactions