0

I have a personal Conky script (at ~/.conky/conky-launch.sh) that I'd like to execute every time I boot up my OS (which is Fedora Workstation 39). So, I created a systemd service file named personal-conky.service as follows:

[Unit]
Description=Opens up my personal conky setup on boot

[Service]
User=arch
ExecStart=/home/arch/.conky/conky-launch.sh

[Install]
WantedBy=multi-user.target

Next, I enabled the service by doing:

$ sudo systemctl enable personal-conky.service

When I rebooted however I found that the script has not executed. When I did:

$ systemctl status personal-conky.service

I got the following error:

× personal-conky.service - Opens up my personal conky setup on boot
     Loaded: loaded (/etc/systemd/system/personal-conky.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Wed 2024-01-31 20:12:57 IST; 4s ago
   Duration: 3ms
    Process: 5602 ExecStart=/home/arch/.conky/conky-launch.sh (code=exited, status=203/EXEC)
   Main PID: 5602 (code=exited, status=203/EXEC)
        CPU: 1ms

Jan 31 20:12:57 fedora systemd[1]: Started personal-conky.service - Opens up my personal conky setup on boot.
Jan 31 20:12:57 fedora (aunch.sh)[5602]: personal-conky.service: Failed to locate executable /home/arch/.conky/conky-launch.sh: Permission denied
Jan 31 20:12:57 fedora (aunch.sh)[5602]: personal-conky.service: Failed at step EXEC spawning /home/arch/.conky/conky-launch.sh: Permission denied
Jan 31 20:12:57 fedora systemd[1]: personal-conky.service: Main process exited, code=exited, status=203/EXEC
Jan 31 20:12:57 fedora systemd[1]: personal-conky.service: Failed with result 'exit-code'.

Why is this happening, and what should I do to fix this?

1

1 Answer 1

0

Try passing the shell in the Exec line: ExecStart=/bin/bash /home/arch/.conky/conky-launch.sh

I believe you may not need the interpreter (bash) if you change the mode to +x, but I'm not certain. Also, change the path to bash if needed.

Source

How to create a systemd service in Linux

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.