Page 1 of 1

Need advice on screenless setup

Posted: Thu Oct 08, 2020 2:27 am
by nmaddix
I'm getting started with QLC+ on the Raspberry PI and things are working well so far with the GUI version.

What I'm trying to do is set it up to run without a display as sort of a slave, responding to MIDI commands that will trigger functions.

Works great with the GUI running as a proof of concept.

But now I want to run it from a command line in the background with no display.

I tried the -n / --nogui option but the GUI still shows up. If I try that from a remote shell command prompt, I get the error:
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
Eventually I will disable the Desktop and just boot to CLI since this thing will be embedded somewhere.

How can I get this working without a display?

And can anyone tell me what the service is for? Everything still seems to run through the qlcplus program. I'm new at this on rpi so hoping to learn.

Re: Need advice on screenless setup

Posted: Thu Oct 08, 2020 6:52 am
by mcallegari
To run a program with a UI via SSH you need to tell it where the display is

Code: Select all

DISPLAY=:0.0 qlcplus
As for the nogui option, the guide says:

Code: Select all

-n or --nogui Start the application with the GUI hidden (requires --nowm)
Have you added the --nowm option too?

In any case QLC+ is a GUI software, so the --nogui option just hides the UI somewhere outside the screen....but it's there.
It's there if you need the whole screen to play videos (or other stuff of yours)
A truly headless mode doesn't exist, and I'm not even sure if it will ever exist

Re: Need advice on screenless setup

Posted: Thu Oct 08, 2020 7:43 am
by nmaddix
mcallegari wrote: Thu Oct 08, 2020 6:52 am A truly headless mode doesn't exist, and I'm not even sure if it will ever exist
Thanks Massimo. Sounds like I'll have to keep the desktop running to support QLC+. Shouldn't be a problem but I was hoping to save the memory/performance.

Can you tell me what the service is for? Curious how that fits into the puzzle.
mcallegari wrote: Thu Oct 08, 2020 6:52 am As for the nogui option, the guide says:

Code: Select all

-n or --nogui Start the application with the GUI hidden (requires --nowm)
Have you added the --nowm option too?
The guide I found does not include the note about --nowm.

FYI: https://www.qlcplus.org/docs/html_en_EN ... eters.html

Regardless, it still shows the GUI for me when I run qlcplus -n --nowm

It seems to appear mostly in the lower right corner of my screen, almost off screen but not quite.

That's ok since I don't need to suppress the GUI, just noting it as unexpected.

Re: Need advice on screenless setup

Posted: Fri Oct 09, 2020 8:45 am
by mcallegari
Can you tell me what the service is for? Curious how that fits into the puzzle.
The service has mainly two purposes:
- automatically start QLC+ at boot
- set proper environment variables and command line parameters and check for autostart file

Also, it standardize QLC+ in the Linux way... (systemd)

Re: Need advice on screenless setup

Posted: Sun Oct 11, 2020 12:05 am
by lighthacker2020
The setup I use could run screenless, although it's nice to have a graphical fallback for times where you might want to jump in to it and make an update, or try something new. My setup is midi controlled (foot controller) to change scenes for my band's stage lighting while I'm playing. I don't have a full blown desktop environment (a la Gnome, KDE, XFCE, etc...) installed, but I'd rather not take resources away from QLC+ if I can avoid it.

I installed the Tight VNC server (should be in a package called tightvncserver on the Pi), and let it run on the default display number (:0) and port (5900). It provides a graphical context for QLC+ to use, and I can connect to it over my network if I find the need to. You'll want to use that --nowm flag that Massimo mentioned, since there is no window manager for it to plug in with.

Re: Need advice on screenless setup

Posted: Thu Mar 28, 2024 6:12 pm
by maxwell
x

Re: Need advice on screenless setup

Posted: Fri Mar 29, 2024 8:31 am
by mcallegari
Please search the forums. This is 3 posts before yours:
viewtopic.php?t=16952