More > JRiver Media Center 22 for Linux

Running MC headless -no physical display on the machine on which MC is installed

(1/2) > >>

bob:
This thread is for users to post their method(s) of running MC headless (connecting to the installation machine with a client like vnc, ssh, remote desktop, etc).

I'll start it off with my dummy X server configuration.

bob:
To me this is the simplest and seems to work no matter how you use it. It's designed to run totally headless. There is no video server display possible on the installation machine.

On the MC installation machine:

sudo apt-get install xserver-xorg-video-dummy
This will pull in the dummy video display and all of it's prerequisites.

Here is the configuration file I use for the dummy xserver:
/etc/X11/xorg.conf


--- Code: ---Section "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/X11R6/lib/X11/fonts/misc"
        FontPath        "/usr/share/fonts/X11/cyrillic"
        FontPath        "/usr/X11R6/lib/X11/fonts/cyrillic"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/Type1"
        FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
        FontPath        "/usr/share/fonts/X11/75dpi"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"
        # path to defoma fonts
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
    VideoRam 10000
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 5.0 - 1000.0
    VertRefresh 5.0 - 200.0
    Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1920x1080"
    EndSubSection
EndSection

--- End code ---

This has the old fixed fonts in it as well. It will also work for MC 20 and 21.
The default display size is 1920x1080

Now you need to start this up somehow. If you are using debian JESSIE, by default it uses systemd.
See the following for information on how to configure that:
https://yabb.jriver.com/interact/index.php/topic,108981.0.html

Next add a vnc server:
sudo apt-get install x11vnc
This will pull in the vnc server and all of it's prerequisites.

I run this as follows from the /etc/rc.local script which on my machine starts after the dummy xserver is running:
x11vnc -q -display :0 -bg -forever -geometry 1920x1080 -rfbport 5900 -rfbauth /home/bob/.vnc/passwd

The file /home/bob/.vnc/passwd contains the password to use when you connect with a vnc client.
You can create it as follows (for example as user bob):
mkdir -p /home/bob/.vnc
x11vnc -storepasswd mypasword /home/bob/.vnc/passwd


You should now be able to connect to your MC machine with a vnc client. I've used xtightvncviewer on linux and tightvnc on windows successfully.

bob:
Pretty much all linux has a running ssh server these days.
You may have to turn on an X11 forwarding on the MC server machine and restart ssh.
In the sshd_config file you want:
X11Forwarding yes

Then you can connect to that machine with another linux machine (or Mac running XQuartz from a XQuartz terminal window).

ssh -X the-macine-mc-is-on

Login as the user that normally runs MC, NOT as root.

If MC is running remotely you'll want to kill it before accessing it over the X connection (if not skip the following 2 lines):
killall -HUP mediacenter22
and wait 20 seconds or so for it to shut down gracefully.

Then you can simply run MediaCenter
mediacenter22

Performance will be MUCH better over the lan as opposed to a wan connection.

If you need to restart MC on the remote machine, after you exit your running version of MC do:
export DISPLAY=:0 ; nohup mediacenter22 &


bob:
This is similar to the ssh method except that you don't use ssh forwarding, you simply redirect the display to your client machine.

In the case of linux, or Mac (with XQuartz) you open up a terminal window and do

xhost +
which allows remote X connections to your server.

Then connect to your MC server machine using ssh and do:

export DISPLAY=1.2.3.4:0   (replace 1.2.3.4 with the IP address of your linux or Mac machine).

Then simply
mediacenter22

You will want to kill any running copies of MC as in the ssh example first.


You can also do this from Windows!
Install xming xserver
http://www.straightrunning.com/XmingNotes/
and run it.
Using putty either create or use an existing connection configuration however in the left pane under connection->ssh enable X forwarding.
Then connect to your MC server with putty and from the putty terminal:
export DISPLAY=1.2.3.4:0   (replace 1.2.3.4 with the IP address of your Windows machine).

and
mediacenter22

imugli:
I use x2go with xfce desktop environment. It requires an x11 environment (e.g XQuartz on Mac) on the client side, but works well.

I'll post a setup when I get a chance.

Navigation

[0] Message Index

[#] Next page

Go to full version