If you want to use Vi as an editor, type in your terminal:
$ sudo vi /etc/firewalld/services/uxplay.xmlOr if you want to use nano type:
$ sudo nano /etc/firewalld/services/uxplay.xmlPaste the following xml into the editor (ctrl + shift + v / cmd + shift + v)
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Uxplay Airplay Reciver</short>
<description>Ports used to allow video and audio connection to this host. UXplay has to be started with the option -p tcp 5000,5001,5002 -p udp 6001,6002,6003
</description>
<port protocol="tcp" port="5000"/>
<port protocol="tcp" port="5001"/>
<port protocol="tcp" port="5002"/>
<port protocol="udp" port="6001"/>
<port protocol="udp" port="6002"/>
<port protocol="udp" port="6003"/>
</service>$ sudo firewall-cmd --reload
$ firewall-cmd --get-services | grep 'uxplay'$ sudo firewall-cmd --zone=public --permanent --add-service=uxplay$ vi ~/.local/share/systemd/user/uxplay.service
# if the folder is not found create it with 'mkdir -p ~/.local/share/systemd/user'Now paste the following and substitute with the name you want the receiver to appear.
[Unit]
Description=Uxplay service
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/local/bin/uxplay -n <RECIVER NAME> -m -fps 60 -nh -p tcp 5000,5001,5002 -p udp 6001,6002,6003
[Install]
WantedBy=default.target
Activate the serivce with the following command
$ systemctl --user enable --now uxplay.service
# Let the user run systemd services without being logged in
$ sudo loginctl enable-linger $USER