Closed C0rupted closed 2 years ago
You can manage processes on Debian Buster with systemd. You need a service unit definition file that describes the process and its environment in the right directory, then you can do systemctl daemon-reload
to load that configuration. Then you can use the standard systemctl
commands to control the process, and journalctl
to view the log emissions to the journal.
seems that there is nothing more to say?
@ShadityZ, can I take a look at your service file? I'm wondering how you set the environment.
Big 'ol necro here, but on the off chance that people still want this, this is what my service looks like:
[Unit]
Description=Airplay Server/Reciever for Mac/Windows/PC
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Environment="DISPLAY=:0"
ExecStart=uxplay -n Raspi -nh"" -fs
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.target
A couple of notes:
~/.config/systemd/user/
(e.g. ~/.config/systemd/user/uxplay.service
) and using the --user
flag when enabling (e.g. systemctl --user enable uxplay
). I haven't tested installing it globally.default.target
maps to graphical.target
.
nathaniel@raspberrypi valley [main] $ systemctl --user get-default
default.target
nathaniel@raspberrypi valley [main] $ systemctl get-default
graphical.target
EDIT: Added environment variable. 🤦🏽
I am making a TV box using an RPi 4 that I have got.
I've managed to figure out the right parameters to get UxPlay working, but I have been trying to figure out how to run UxPlay as a service, so it runs at start up with the arguments I give it.
Also, I have made it so Kodi starts up at boot, as soon as the desktop and required dependencies load. I was thinking, would there be a way to modify UxPlay to make it so that it stops Kodi before establishing the connection? To start Kodi, I have used the autostart menu in XFCE.
BTW, I am running TwisterOS. (Based off Raspbian Buster 32-bit) Any help is appreciated.