You are not logged in.
It is a program written in C that updates X root window (which is the status bar in DWM). It uses libxcb and libxcb-util (mainly, xcb_change_property() to write characters in the root window). Being run as an event loop.
I usually just leave it running in the background by typing into the shell each time I log in, like so...
sys-status 1>/dev/null 2>~/.local/sys-status/log &
I need systemd to take care of it. I copied a minimal boilerplate systemd.service file in /usr/lib/systemd/user.
[Unit]
Description=status bar for DWM
[Service]
ExecStart=sys-status 1>/dev/null
Type=simple
Restart=on-failure
RestartSec=1s
[Install]
WantedBy=default.target
starting this service does not have any effect, it does not change the status bar.
Please let me know if you need any more information.
Last edited by arbitarycounterfactual (2024-09-09 15:46:53)
Offline
The user service likely lacks the $DISPLAY environment? Have you checked it's status?
Offline
The user service likely lacks the $DISPLAY environment?
Oh well, right! Completely forgot systemd execution doesn't look at system envvars, and dealing with X server requires knowing them. Added these two definitions
Environment="DISPLAY=:0"
Environment="XAUTHORITY="/home/aissy/.Xauthority""
It works now. Thanks for the reminder!
By the way, I would have it better if systemd envvars could be automatically set to already-set system envvars (maybe somewhat like an import into systemd environment)?
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
A fundamental problem is that the service might even start before any X11 server and your session isn't tied to a specific one either.
I'd typically rather start such daemons w/ the relevant X11 session (xinitrc or from dwm) than as a user service.
Offline