Basic Script Help

I never script. If I writ this in terminal it works. I want it to autostart.

I am also not sure how to get the script to work when I just click it let alone the autostart. Opening it with terminal does nothing as well when I close discord.

My script is just comping some vesktop code from github. The reason is just a build of vesktop that allows u to change the icon in the system tray which is working out for me. Just to say I have a good personal reason why I want to do it this way XD.

cd /home/marko/Documents/Programs/Vesktop/
pnpm start
image.png
Solution
probably best to create it as user service
# ~/.config/systemd/user/arrpc.service
[Unit]
Description=arRPC Service

[Service]
Type=simple
WorkingDirectory=/home/marko/Documents/Programs/Vesktop
ExecStart=pnpm start
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

change the pnpm to output of which pnpm

after creating the file do
systemctl --user daemon-reload
and
systemctl --user enable --now arrpc.service

check if it running by

systemctl --user status arrpc.service
Was this page helpful?