QLCPlus on Raspberry Pi with VNC

All the topics related to QLC+ on the Raspberry Pi
Post Reply
tschechniker
Posts: 3
Joined: Thu Jan 11, 2024 8:23 am
Real Name: Tobias

Hi,

i just saw there was no solution yet for vnc into the raspberry pi qlc+ instanc.

For everyone who is searching for the solution. QLC+ is based on QT and QT has a buildin VNC Server.

How to switch from HDMI to VNC?

1. ssh into your raspberry
2. edit /etc/init.d/qlcplis ( e.g.: nano /etc/init.d/qlcplus)
3. find the following:

Code: Select all

QLCPLUS_OPTS="-platform eglfs --nowm --web --web-auth --operate --overscan"
4. replace the line with:

Code: Select all

QLCPLUS_OPTS="-platform vnc --nowm --web --web-auth --operate --overscan"
5. save and close the file
6. restart qlcplus or reboot the raspberry ( systemctl restart qlcplus )


From now you can connect via VNC directly to qlcplus running on raspberry.


How someone finds this helpfull!
Yestalgia
Posts: 430
Joined: Thu Jun 17, 2021 9:31 am
Location: Australia
Real Name:
Contact:

Woah this is a good tip!
User avatar
GGGss
Posts: 3145
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

@yestalgia, Lachie,
Can we annotate this post somewhere? This post is priceless (even for my setups)
@OP: very very verryy good catch
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Yestalgia
Posts: 430
Joined: Thu Jun 17, 2021 9:31 am
Location: Australia
Real Name:
Contact:

GGGss wrote: Thu Feb 01, 2024 3:51 pm @yestalgia, Lachie,
Can we annotate this post somewhere? This post is priceless (even for my setups)
@OP: very very verryy good catch
I'll add it to the docs if can you please test it?
liebetim
Posts: 5
Joined: Sun Jun 05, 2022 10:31 pm
Real Name: Tim Liebe

I just set this up this weekend. Thanks so much for sharing! This is awesome.

The only thing I wasn't able to figure out how to adjust the resolution. I tried editing framebuffer_width and framebuffer_height and then hdmi_group and hdmi_mode in config.txt based on other posts, but didn't have any luck. If someone happens to know how it can be adjusted to match the display of the viewer that would be appreciated.
User avatar
GGGss
Posts: 3145
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

It might be necessary to set a specific screen resolution: http://elinux.org/RPiconfig#Video_mode_options

Code: Select all

Most likely you will have to adjust the screen resolution, with the same
instructions for a HDMI display. For example these parameters in the config.txt
file might work for you:
disable_overscan=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=16
config_hdmi_boost=4
All electric machines work on smoke... when the smoke escapes... they don't work anymore
liebetim
Posts: 5
Joined: Sun Jun 05, 2022 10:31 pm
Real Name: Tim Liebe

I gave those a whirl along with changing some of the other config.txt options with no luck. I may have been doing something wrong.

However, I was able to get it to work by specifying a resolution in /etc/init.d/qlcplus

Code: Select all

QLCPLUS_OPTS="-platform vnc:size=1920x1080 --nowm --web --web-auth --operate --overscan"
Thanks to all!
maxwell
Posts: 9
Joined: Mon Oct 09, 2023 11:05 pm
Real Name:

hey there - I am able to connect through "remote desktop connection" and see the terminal but it does not show me the gui of the open instance of qlcplus running - I am able to open a new instance of the program with "qlcplus" but typing "sudo qlcplus" gives me this error:

"Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :11.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted"

is there a way to view the open instance?
thanks!
User avatar
GGGss
Posts: 3145
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

maxwell wrote: Mon Mar 25, 2024 5:00 am hey there - I am able to connect through "remote desktop connection" and see the terminal but it does not show me the gui of the open instance of qlcplus running - I am able to open a new instance of the program with "qlcplus" but typing "sudo qlcplus" gives me this error:

"Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :11.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted"

is there a way to view the open instance?
thanks!
And what settings do you use in /etc/init.d/qlcplus?
If you use the very latest build (versus 4.13) there are issues with the headless mode for the PI...
All electric machines work on smoke... when the smoke escapes... they don't work anymore
fnupp
Posts: 3
Joined: Thu Feb 22, 2018 9:26 am
Real Name: fnupp

Hi,
I justed downloaded and installed version 4.13.0 on Raspberry Pi 5 and tried to edit the file /etc/init.d/qlcplus. Found out that is is missing - did the location change with the last version?
Image

The service is running and accessible by hdmi and web.

Thanks,
fnupp
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

QLC+ on the RPi is no longer a System V service, but a systemd one.
The startup script is in

Code: Select all

/usr/sbin/qlcplus-start.sh
ljmichael
Posts: 4
Joined: Sun Nov 12, 2023 12:49 pm
Real Name: michael

thank you for your explanation

i have create a little manual

1 Download putty

2 Start it up and fill in ip(the ip from your raspberry pi)
- Default user name:pi
- Default password:raspberry

after this you type in

sudo nano /etx/init.d/qlcplus

3. find the following:

QLCPLUS_OPTS="-platform eglfs --nowm --web --web-auth --operate --overscan"

4. replace the line with:

QLCPLUS_OPTS="-platform vnc --nowm --web --web-auth --operate --overscan"

5. save and close the file (write out)

6. restart qlcplus or reboot the raspberry ( systemctl restart qlcplus )
User avatar
GGGss
Posts: 3145
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Typo?
ljmichael wrote: Sun Mar 31, 2024 10:45 am sudo nano /etx/init.d/qlcplus
/etC/init.d/qlcplus
All electric machines work on smoke... when the smoke escapes... they don't work anymore
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

It's not even that.
On the latest official image, there's a script here:

Code: Select all

/usr/sbin/qlcplus-start.sh
fnupp
Posts: 3
Joined: Thu Feb 22, 2018 9:26 am
Real Name: fnupp

Thank you all for your help! Works like a charm .-)

I updated the 'manual' with the new file path and screen resolution

1 Download putty

2 Start it up and fill in ip(the ip from your raspberry pi)
- Default user name:pi
- Default password:raspberry

after this you type in

sudo nano /usr/sbin/qlcplus-start.sh

3. find the following:

QLCPLUS_OPTS="-platform eglfs --nowm --web --web-auth --operate --overscan"

4. replace the line with:
QLCPLUS_OPTS="-platform vnc --nowm --web --web-auth --operate --overscan"

or to set the resolution to a desired one
QLCPLUS_OPTS="-platform vnc:size=1920x1080 --nowm --web --web-auth --operate --overscan"

5. save and close the file (ctrl-x y)

6. restart qlcplus or reboot the raspberry ( systemctl restart qlcplus )
IamMarkie
Posts: 10
Joined: Sat Jun 08, 2024 10:34 am
Real Name: Mark Mongold

mcallegari wrote: Mon Mar 25, 2024 3:00 pm QLC+ on the RPi is no longer a System V service, but a systemd one.
The startup script is in

Code: Select all

/usr/sbin/qlcplus-start.sh
Sorry but my linux skills aren't that great..... are you saying that is the script to enable VNC on the latest build?

So, I did find the answer on my own......... see below :)
Last edited by IamMarkie on Sat Jun 15, 2024 4:51 pm, edited 1 time in total.
IamMarkie
Posts: 10
Joined: Sat Jun 08, 2024 10:34 am
Real Name: Mark Mongold

fnupp wrote: Wed Apr 03, 2024 12:53 pm Thank you all for your help! Works like a charm .-)

I updated the 'manual' with the new file path and screen resolution

1 Download putty

2 Start it up and fill in ip(the ip from your raspberry pi)
- Default user name:pi
- Default password:raspberry

after this you type in

sudo nano /usr/sbin/qlcplus-start.sh

3. find the following:

QLCPLUS_OPTS="-platform eglfs --nowm --web --web-auth --operate --overscan"

4. replace the line with:
QLCPLUS_OPTS="-platform vnc --nowm --web --web-auth --operate --overscan"

or to set the resolution to a desired one
QLCPLUS_OPTS="-platform vnc:size=1920x1080 --nowm --web --web-auth --operate --overscan"

5. save and close the file (ctrl-x y)

6. restart qlcplus or reboot the raspberry ( systemctl restart qlcplus )
I am by no means a wizard when it comes to Linux, but when I did this, (which does work as it stands), I discovered a couple things......

You don't need PuTTY, Windows (10) has a built in ssh client.... right click on the start button, run powershell as administrator.

In the Pi version I'm using on a Pi5, 4.13.1-1, there is some code at the beginning of qlcplus-start.sh that appears to be detecting if anything is plugged in to the HDMI ports, if there is, it uses it, if not, it sets the platform to "offscreen". Since I like keeping all options possible, I changed the "offscreen" to "vnc:size 0x0".
This worked as well, with nothing connected to the HDMI ports I can use VNC into the Pi.

My apologies for the textual (??) explanation vs. copies of the code, I'm old, and I still do a lot of things the old way.
Hopefully someone will see what I'm talking about and can show the code.
My application makes plugging a monitor into the Pi very difficult, being able to use VNC is just the ticket!!, but this way, I can still use a monitor if I absolutely have to.
As Massimo has pointed out in the docs, don't expect to be able to build shows, or run QLC with direct access, or through VNC, but for making small changes that have to be done in the app.........
Hopefully this helps someone

EDIT!!;

I subsequently ran across this...... it's kinda related......
viewtopic.php?t=17150
Red2000
Posts: 2
Joined: Wed Jan 01, 2025 12:14 pm
Real Name:

My first post here...

Does anyone know if there are some instructions on how to access the desktop of the latest Raspberry Pi build remotely using VNC (or any other reliable/better method)?

I have installed 'qlcplus_raspios_bookworm_20241101.img' and over the past few days I have been trying to find out how I can remotely view the desktop. There was a very promising post from Tobias here https://www.qlcplus.org/forum/viewtopic ... vnc#p73677 with various follow-ups, and finally in his previous post above, Mark quotes the following instruction...
3. find the following:

QLCPLUS_OPTS="-platform eglfs --nowm --web --web-auth --operate --overscan"
...but in the latest version of the application (as at 2024-12-31), 'qlcplus-start.sh' doesn't contain that line...

Code: Select all

# detect HDMI plug state
QTPLATFORM="eglfs"
kmsprint -m | grep connected > /dev/null
if [ $? -eq 1 ]; then
    QTPLATFORM="offscreen"
fi

# create QLC+ command line
QLCPLUS_OPTS="-platform $QTPLATFORM --nowm --web --web-auth --operate --overscan"

if [ -f $HOME/.qlcplus/autostart.qxw ]; then
    QLCPLUS_OPTS="$QLCPLUS_OPTS --open $HOME/.qlcplus/autostart.qxw"
fi

# if NTP hasn't done its job already, set the date to modern age...
CURRDATE=`date +%Y`
if [ "$CURRDATE" -lt "2024" ]; then
    date +%Y%m%d -s "20241101"
fi
I can see that this code has been rewritten to detect what's going on with the HDMI plug but I'm afraid I'm unqualified to mess around in this area.

Also, I'm not sure whether, if one does has remote access, whether one must, or must not have the physical monitor plugged into the Raspberry Pi. (I'm aware of the existence of dummy HDMI plugs, so could could get one if necessary.)

I am not a Linux expert so please be gentle :-)

Thanks,
Red

(As a P.S. I'd like to add how promising this application looks to me. Originally we had a system that runs on an iPad. It was ludicrously difficult to set up, but we got it going and have used it for around seven years, hoping (praying) that nothing would go wrong with it. Just before this Christmas, the iPad announced that it needed to 'Activated' and we couldn't get it fixed in time for a party which we had to cancel as a result. We therefore decided to move away from anything Apple-related and get a system to which we had complete access and could back up properly. We looked at other fixture control software but QLC+ seems to be SO much easier than all of them. I was dreading setting up a new system, but now I'm actually looking forward to it!)
Thanks,
Red
Yestalgia
Posts: 430
Joined: Thu Jun 17, 2021 9:31 am
Location: Australia
Real Name:
Contact:

Hi Red,

The web ui can do a lot of what you need. That said, none of us were qualified when we started. Comment out the if statement and give it a go.

Welcome to QLC+
Post Reply