More > JRiver Media Center 24 for Linux

Systemd Services for JRiver (To Facilitate Running Headless on Linux)

<< < (2/2)

Zhillsguy:
I'm not running headless, assuming the options are the same, you can activate Options/Startup/Start playing current playlist, and turn on shuffle under Playing Now. I don't know what the difference between Shuffle On and Shuffle Automatic is.

sekrit:
Ubuntu has built-in "startup applications" feature.  In fact, when JRiver 24 is installed on Ubuntu18.04, it is automatically added to the startup applications list.

biblio:
For those not aware the "Startup Applications" program is a GUI for a local folder.

~/.config/autostart/

If you put .desktop files in that folder they will start when you log in.

Desktop files are either in
/usr/share/applications (system)
~/.local/share/applications (user)

BryanC:

--- Quote from: sekrit on September 22, 2018, 04:47:18 pm ---Ubuntu has built-in "startup applications" feature.  In fact, when JRiver 24 is installed on Ubuntu18.04, it is automatically added to the startup applications list.

--- End quote ---


--- Quote from: biblio on January 13, 2019, 05:23:45 pm ---For those not aware the "Startup Applications" program is a GUI for a local folder.

~/.config/autostart/

If you put .desktop files in that folder they will start when you log in.

Desktop files are either in
/usr/share/applications (system)
~/.local/share/applications (user)

--- End quote ---

It can get complicated quickly when you are running a headless server or need to start an X or VNC server before starting MC.

A systemd service alleviates a lot of those issues.

biblio:
I agree; for the unit file there are some extras some people might want.
(This is just altered from a different program i run renamed for mediacenter)

You could wait for network and remote file systems in the unit section.
use a pid file for reloading so you don't reload over the top of yourself
use a group on top of a user if you have shared files under different permissions.


--- Code: ---[Unit]
Description=MediaCenter24
After=display-manager.service network.target remote-fs.target nss-lookup.target
Documentation=https://yabb.jriver.com/interact/index.php/topic,115514.0/topicseen.html

[Service]
PrivateTmp=true
KillMode=mixed
Type=simple
Environment=DISPLAY=:0
User=user
Group=user
ExecStart=/usr/bin/mediacenter24 /MediaServer
PIDFile=/run/mediacenter24.pid
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
ProtectSystem=yes

[Install]
WantedBy=multi-user.target


--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version