More > JRiver Media Center 21 for Linux

JRiver on Raspberry Pi disappears

<< < (2/3) > >>

mwillems:

--- Quote from: PSH on September 07, 2016, 05:30:04 am ---OK - so upgrading to version 22 hasn't solved it.
Studying the startup script instructions makes me realise that I had in fact implemented the start at boot script but it never in fact worked............so the periodic check doesn't work either.
I'm wondering whether this is because crontab is in a strange place.  In my system it is at /tmp/crontab.qGKSmc/crontab.
Any comments gratefully received.

--- End quote ---

How did you edit the crontab?  Do me a favor and provide the output of the following two commands:

--- Code: ---crontab -l
sudo crontab -l

--- End code ---

Also, assuming the script is called something like "headless" the output of:

--- Code: ---cat ~/headless
ls -la ~

--- End code ---

That should help us get to the bottom of it.

BryanC:
This could probably be better handled by a systemd script with Restart=Always. If you need me to write one, let me know.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

mwillems:

--- Quote from: BryanC on September 08, 2016, 10:18:14 am ---This could probably be better handled by a systemd script with Restart=Always. If you need me to write one, let me know.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

--- End quote ---

I agree; I actually use a systemd service instead of a cron entry at home (I use restart=on-failure instead of restart=always so I can still manually close MC through the UI). 

The reason I used a cron entry in the guide was because a significant portion of the pi installed base was (is?) on wheezy (old-stable) which doesn't use systemd.  I wanted a solution that would work regardless of init system and required relatively little fiddling.  At some point I'll probably substitute the systemd unit and tell Wheezy users they're on their own, but figured I'd wait for Stretch when Wheezy is officially unsupported.

PSH:
Many thanks for the assistance mwillems - greatly appreciated.
I was interested in the subsequent comment about systemd but I'm sticking to your original diagnostics regarding crontab.

crontab -l opens the file where I entered * * * * *  /etc/MC21start.sh > /dev/null.  It is the only active line in that file.

sudo crontab -l gives a no crontab for root message

cat /etc/MC21start.sh displays its contents as follows:

export USER=pi
ps -e | grep x11vnc || x11vnc :0 -localhost -geometry 1920x1080
export DISPLAY=':0'
ps -e | grep mediacenter || mediacenter22 /mediaserver

Your ls command modified to ls -la /etc contains the line:

-rw-r--r--  1  root  root  154  Sep  7  11:02  MC21start.sh

I am assuming that this is the line that might help but I could be wrong.
The file names and locations above are different to yours as originally I followed Hilton's instructions for RDP.
Apologies for the mash up of file names etc using both "21" and "22" - it's because I upgraded from 21 to 22 in the middle of this forum exchange.

mwillems:

--- Quote from: PSH on September 09, 2016, 06:49:15 am ---Many thanks for the assistance mwillems - greatly appreciated.
I was interested in the subsequent comment about systemd but I'm sticking to your original diagnostics regarding crontab.

crontab -l opens the file where I entered * * * * *  /etc/MC21start.sh > /dev/null.  It is the only active line in that file.

sudo crontab -l gives a no crontab for root message

cat /etc/MC21start.sh displays its contents as follows:

export USER=pi
ps -e | grep x11vnc || x11vnc :0 -localhost -geometry 1920x1080
export DISPLAY=':0'
ps -e | grep mediacenter || mediacenter22 /mediaserver

Your ls command modified to ls -la /etc contains the line:

-rw-r--r--  1  root  root  154  Sep  7  11:02  MC21start.sh

I am assuming that this is the line that might help but I could be wrong.
The file names and locations above are different to yours as originally I followed Hilton's instructions for RDP.
Apologies for the mash up of file names etc using both "21" and "22" - it's because I upgraded from 21 to 22 in the middle of this forum exchange.

--- End quote ---

Ok I've identified a few issues.  You put the script in an unusual location (/etc), instead of in the /home/pi directory.  By itself that's not necessarily an issue, but items in /etc have different default permissions (umask) than items in user's home directories, and however you put it there the permissions are not currently correct.  You might've skipped the chmod line in the intstructions?  In any case, the script is currently not executable for any user and is owned by root, so no one can run the script at all right now, and your user doubly can't run it.

I'd advise moving it or recreating it in your /home/pi directory for tidiness, reassigning ownership to your user (chown) and fixing the permissions (chmod).  It would probably be easiest to start over with the directions in the quick start guide, but if you want the absolute quickest fix, just chmod the script to 777, i.e. something like
--- Code: ---sudo chmod 777 /etc/MC21start.sh

--- End code ---

That will mark it as executable for all users and should allow the crontab entry to execute.  Another thing to make sure of: if you're not using x11vnc, be sure to remove that line.  If you are using x11vnc, no worries.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version