[BUG] Error executing listen var-command in systemd service
Checklist before submitting an issue
- [X] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
- [X] I have specifically verified that this bug is not a common user error
- [X] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Description of the bug
I've tried making a minimal systemd service for Eww, which runs the daemon:
[Install]
WantedBy=graphical-session.target
[Service]
Environment=PATH=/run/wrappers/bin:/nix/store/s7xpglllh0zms6wmdh13d5hi3a661ykl-hyprland-0.12.1beta+date=2022-09-04_ff26531/bin:/nix/store/c0w1y1kkhwhbpk4xh4fcrbi98v7k3j62-eww-58907eac4bf5b897e8f77878acc29e0ccf7f6ce3/bin:/nix/store/izjcfa4prbvzhqxa40nj7kqzkip7270p-bc-1.07.1/bin:/nix/store/6cvgq8js1i6rsalzld6bvih65c1xll39-bluez-5.64/bin:/nix/store/mj6wiv9gbbydh06x2i4fl5a9ksdck7c5-coreutils-9.1/bin:/nix/store/98zjbchwflnc55i2jhvpi79aa69frsks-curl-7.84.0-bin/bin:/nix/store/nqwkgzay3m6ynr4qz42ypx576s7ckp24-findutils-4.9.0/bin:/nix/store/7rd34k5jnjwhpk7i9dwjc9xd93psp4gg-gawk-5.1.1/bin:/nix/store/zpjn33mx0pbfc71ddfi9sc8pdfqrsh8z-gnugrep-3.7/bin:/nix/store/n62963g6w2fj8hnka006wycqwx9pqw5q-gnused-4.8/bin:/nix/store/wb4yxhqcysbpf6jj5cx3bhhmr6gdrl4w-jq-1.6-bin/bin:/nix/store/8k1m05pp6rq1cz1qk73s38bv2azn20cl-light-1.2.2/bin:/nix/store/xf6f1qavawdm5dfpikfh2j4znw5lfgl0-networkmanager-1.38.4/bin:/nix/store/y6mh2kd980dxs5pn36bljcnffqznlvc3-playerctl-2.4.1/bin:/nix/store/xqj8gl2rkw9797qd6ia1vsc4yjnbh854-procps-3.3.16/bin:/nix/store/4i8idwff3nyws465p3g7s4jw5pzyh6k7-ripgrep-13.0.0/bin:/nix/store/ag7j3kkqsqhybk9zv8qvakqx1jsk91v2-socat-1.7.4.3/bin:/nix/store/qw2ghjrdzk0w6zl33i8hn51j2d3wn2gj-upower-1.90.0/bin:/nix/store/f7f4h55q5zjds07rr7ls3i572b5xrpk9-wget-1.21.3/bin:/nix/store/rf87sx3b8826v19zsfqn5khqd1077xay-wireplumber-0.4.11/bin:/nix/store/p9bhphsvbr71a35j29a7fc6k601y9gmm-wofi-1.2.4/bin
ExecStart=/nix/store/c0w1y1kkhwhbpk4xh4fcrbi98v7k3j62-eww-58907eac4bf5b897e8f77878acc29e0ccf7f6ce3/bin/eww daemon --no-daemonize
Restart=on-failure
[Unit]
Description=Eww Daemon
PartOf=graphical-session.target
Inside the script's PATH, I've included the path of every program I'm using inside eww and its related scripts.
Program list, in case you want to take a look
bc
bluez
coreutils
curl
eww-wayland
findutils
gawk
gnugrep
gnused
hyprland
jq
light
networkmanager
playerctl
procps
ripgrep
socat
upower
wget
wireplumber
wofi
Despite all this careful consideration, I still get errors for every deflisten I have in my configuration:, when run in the systemd service:
ERROR eww::script_var_handler > [crates/eww/src/script_var_handler.rs:236] Error while Executing listen var-command playerctl -F metadata title || true: No such file or directory (os error 2)
I've checked and double-checked the program list in PATH, but couldn't find anything that may have slipped.
Reproducing the issue
- Have a configuration that makes use of
deflistenvariables - Try running it in a systemd service
- Check
journalctl --user -eu eww
Expected behaviour
The deflisten variables get updated properly, as it's being done when run outside the service.
Additional context
My dotfiles with pending Eww config changes: https://github.com/fufexan/dotfiles/tree/eww-deflisten
Seems like you're missing sh in the PATH, no?
As far as I can tell, everything's working properly now. So I think that was it. Thanks and sorry for bothering!