More > JRiver Media Center 21 for Linux
Quick start guide for installing JRiver Mediacenter 21 ARM for Raspberry Pi
mwillems:
--- Quote from: roognation on October 27, 2015, 01:16:39 am ---Yes, n00b question here: what is the best way to get MC21 to start when the Pi powers up? I have the option checked under options-startup, but that did not seem to do anything; I am happy to put a script to work, but need a push in the right direction. Thanks in advance.
--- End quote ---
The startup menu option doesn't work on Linux right now. Most of the architecture for what you need is in the headless operation scripts above https://yabb.jriver.com/interact/index.php?topic=99370.msg687832#msg687832. It just needs some light adaptation. I assume you have the pi plugged into a monitor? The following scripts assume that you do and that you're using the default user. If you want to run it headless instead, just use the exact instructions above. If you're running as a different user, replace "pi" with that user in the scripts below.
To autostart MC on a Pi plugged into an actual display, make a script (we'll call it "start_mediacenter21.sh") like this
--- Code: ---#!/bin/bash
export USER=pi
export DISPLAY=':0'
sleep 10
mediacenter21
--- End code ---
Then add a job to your user's cron tab (as described above) that says
--- Code: --- @reboot /home/pi/start_mediacenter21.sh > /dev/null
--- End code ---
Scripting Notes:
Sleep The sleep line is there to give the system time to "come up" and bring up the network connection before starting MC. The argument passed to the command is expressed in seconds (i.e. sleep 10 waits 10 seconds). You may find that you need to wait longer or less long on your particular pi. If the script doesn't work, try "sleep 30" and then work your way down until you've found the shortest delay that still works.
Export? You need the two export lines because cronjobs don't run in a default environment. So cron doesn't "know" where to find the xserver (the display), etc.
phillil:
Guys, this is awesome thanks!
I've been waiting for years to be able to do away with a pc for music, and now I can.
So I've managed to get this working, with my Pi2 connected to a TV and USB Dac, using JRemote on the iPhone to control.
It works really well - my library is FLAC and hi-res FLAC and once it's up and running, plays flawlessly and with even play a smart-list (4 - 5 stars) randomly, which picks from over 5,000 tracks.
I can also skip forward and back using a remote as my amp (DAC) talks back to the Pi2 over the USB connection
So all-in-all, really really please, so thanks.
However there are a few gripes stopping this from being perfect....
1) I can get MC to load in the virtual display ;1, but tracks won't play. I'm not sure if it's related but I get an error on the virtual desktop (No session for PID 817). I can view the library with JRemote on the iPhone, but nothing plays. Equally I can try and play a track using MC directly using TigerVNC desktop, but nothing plays.
2) My music collection sits on my Synology NAS, and the library builds OK, and track play with no problem. However on a reboot, the files on the NAS cannot be found. I have to open FileManager then navigate to the NAS first, then everything is OK.
Is there a way of connecting at logon??
Any help would be appreciated
mwillems:
I'm a little confused; you mention having the pi hooked up to a TV, but you're also using a virtual display? You don't need both of those things unless I'm missing something. Can you clarify what exactly you're trying to do?
As for the NAS, it sounds like it's not being automatically mounted on the Pi. You might need to map the shares by adding them to your /etc/fstab file. Are you familiar with how a Linux fstab works? If not I may be able to help, but I'll need more info.
phillil:
Hi, thanks for the reply.
Sorry for the confusion....
I started off using the TV just to get everything working, then I planned to go headless so I can do away with the TV
I'm not familiar with fstab as I'm a complete linux noobie, so would appreciate the help, or somewhere I can learn the linux basics!!
Many thanks
mwillems:
--- Quote from: phillil on November 29, 2015, 04:18:08 pm ---Hi, thanks for the reply.
Sorry for the confusion....
I started off using the TV just to get everything working, then I planned to go headless so I can do away with the TV
--- End quote ---
Ok, so your next step is once you have the virtual desktop up, check what the audio device is set to in MC. You should see your DAC listed there, and make sure it's selected. It's likely that MC is just trying to play to the Pi's native outputs or something like that. If you don't know which device to select, post the output of the alsacap command and we can point you in the right direction.
--- Quote ---I'm not familiar with fstab as I'm a complete linux noobie, so would appreciate the help, or somewhere I can learn the linux basics!!
Many thanks
--- End quote ---
The fstab is a file that tells the OS what to mount at boot and when (it stands for "FileSystem TABle"). We need a little more info about your raspberry and how your NAS shares are set up to figure out the specific entries you'll need.
1) Do you know if your Pi is running Raspbian Wheezy or Raspbian Jessie? That will make a difference in how to handle the automount because Jessie uses a new(ish) system daemon called systemd which handles automounting differently. If your install is recent it's probably Jessie. One easy way to tell is to type into the terminal
--- Code: --- systemctl status
--- End code ---
If it gives you detailed output about your system services, then you're running Jessie. If it gives you a "command not found" type error you're running Wheezy.
2) Additionally, how does your NAS share files? SMB/CIFS? NFS? Something else? That's also important to know.
Assuming you're on Raspbian Jessie (which is most likely), a good general resource for learning modern fstab basics is https://wiki.archlinux.org/index.php/Fstab. It's for a different Linux distribution (Arch) but the fundamentals will serve you well on any modern Linux distro (because they virtually all use systemd now). Read the whole thing if you want to learn about it, but take special note of https://wiki.archlinux.org/index.php/Fstab#Automount_with_systemd.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version