INTERACT FORUM

More => Old Versions => JRiver Media Center 27 for Linux => Topic started by: ths61 on February 05, 2021, 01:42:17 am

Title: Can MC be started without graphics on Linux to be used as ....
Post by: ths61 on February 05, 2021, 01:42:17 am
Is the MC core engine decoupled from the GUI layer or is it tightly coupled ?

Can MC be started without graphics on Linux to be used as a lightweight endpoint renderer controlled by another copy of MC on another machine ? 

Example: Optionally start up MC at a lower minimal Linux Run-Level without X, the greeter, desktop and display manager running.

TIA

Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: JimH on February 05, 2021, 08:09:54 am
Yes, MC can run without a GUI.  People call that "headless".  Try a Google search.
Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: mwillems on February 05, 2021, 08:27:20 am
You will (I think) need a minimal xserver running, but you don't need a greeter or DE.  You could use, for example, openbox or i3 something else light.  You don't need a monitor attached, you can use a virtual xserver generated by VNC or share an unplugged physical output using x11vnc or something similar.  There are some threads scattered around on how to do it.

So you can run MC on a headless server (I'm doing it right now in a virtual machine and connecting via spice), but I'm pretty sure you need some kind of running xserver or MC will segfault (or at least I've never figured out how if there's a way to do it).
Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: ths61 on February 05, 2021, 10:38:35 am
...  So you can run MC on a headless server (I'm doing it right now in a virtual machine and connecting via spice), but I'm pretty sure you need some kind of running xserver or MC will segfault (or at least I've never figured out how if there's a way to do it).

Thanks much and I believe you are correct about X being a requisite. 

I understand I can run "headless", have done that in the past.  I wanted to know if I could run without the graphics X system running. I don't want to use a graphical form of remote-destkop because it starts the graphics system as well (at least the ones I tried have).  I wanted to use another copy of MC on a faster machine as a controller app. 

I am able to select the Linux machine's database from a windows machine, browse the client's library from the Windows MC control app and Play(there), but would like to do that without X and above running on the endpoint to conserve latency, memory and CPU resources.

I tried it without the graphics system running and it doesn't work unless graphics gets started.  I am able to ssh into runlevel 2 without X on weak hardware and play via aplay with just 120MB of memory on Debian 10 running the core OS, tty based audio player and no graphics subsystem running.  Starting X jumps up both memory and CPU resources.

I will search for more threads, but I am afraid the core player is not decoupled from the GUI requisites.
Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: mwillems on February 05, 2021, 10:51:45 am
I think you do need an a minimal xserver, but something like openbox or i3 (with careful configuration) can be run in less than 100MB of RAM for the base system.  Given that Mediacenter uses 250-500 MB by itself, the added overhead of the xserver can be pretty minimal with correct configuration.

What kind of memory and cpu footprint are you trying to fit inside?
Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: bob on February 05, 2021, 11:33:22 am
All user versions of MC require a running X server. This is because it's how MC handles events.
There are several ways to run minimal X systems as mwillems says.
You don't need a desktop or even a window manager.
Start up MC this way
mediacenter27 /mediaserver
This will start it up minimalized and prevent blocking on dialog boxes.

You can run a dummy xserver (at least in previous versions of debian) or just a generic svga server.
Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: ths61 on February 05, 2021, 11:35:40 am
I think you do need an a minimal xserver, but something like openbox or i3 (with careful configuration) can be run in less than 100MB of RAM for the base system.  Given that Mediacenter uses 250-500 MB by itself, the added overhead of the xserver can be pretty minimal with correct configuration.

What kind of memory and cpu footprint are you trying to fit inside?

I am experimenting on an old Intel Atom D525 board, slow memory, slow PCIe, slow CPU with onboard graphics that uses system memory.  Right now I am trying to see what is achievable on feeble hardware without using swap.  I have no specific target in mind other than being able to use existing hardware to its fullest extent and get a baseline for future hardware.  Local graphics is sluggish, so eliminating it and using a control app seems to be a viable alternative, especially if it is going to get buried in a cabinet.  Playing from memory doesn't work well on this machine.

Part of that MC 250-500MB is the graphics code which I hoped was decoupled.  Once X and MC is running, that 120MB goes up to @ 700MB (900+ when the internal browser is spawned).

I am also experimenting with PREEMPT_RT kernels and the tuned profile package.

(https://i.ibb.co/xhxs9yf/cyclictest-on-ION-192k-Hz-Audio-aplay.jpg)

Title: Re: Can MC be started without graphics on Linux to be used as ....
Post by: ths61 on February 05, 2021, 11:38:59 am
All user versions of MC require a running X server. This is because it's how MC handles events.
There are several ways to run minimal X systems as mwillems says.
You don't need a desktop or even a window manager.
Start up MC this way
mediacenter27 /mediaserver
This will start it up minimalized and prevent blocking on dialog boxes.

You can run a dummy xserver (at least in previous versions of debian) or just a generic svga server.

Thanks, I will give that a try and investigate the alternate graphics servers.