AutoStarting QLCplus in X session with VNC

Hello all

I’ve been able to start www.QLCPlus.org as part of the start up routine with LXE desktop on www.DietPi.com, with an old Samsung N150 64 bit Netbook, including all the startup options, but I was looking for a less intensive payload on the CPU.

(this is part of the development process, before I try doing this on a 32bit Odroid C1 Arm based unit, as QLCPlus doesn’t seem to like Arm64)

I even tried to run VNC of some kind so that I can remotely view the desktop, which kind of worked, until I realised that there were two desktops each with a VNC connection and their own copy of QLCPlus, which made for some very strange Art-Net activity

So in the end, I took inspiration from Massimo’s Raspberry Pi project and I knuckled down to working out how to get xinit to start QLCplus as a stand alone session.

(I removed all desktop managers and VNC software)

It was actually a lot easier than I had anticipated.

All I had to do was confirm that QLCPlus worked on the platform (which I had by using the LXE desktop), then edit the

/DietPi/dietpi.txt

config file to add the file I wanted to load, by adding this last line

#-------------------------------------------------------------------------------------------------------
# D I E T - P I
# QLCplus autostart options
# ----------------------------------------------------------------------------------------------------

SOFTWARE_QLCPLUS_AUTOSTART=/opt/qlc_startup.qxw

and add the following to the

/var/lib/dietpi/dietpi-autostart/custom.sh

file


echo Start an X session with qlcplus
echo -------------------------------------------
echo --

echo Assuming that this entry is in /DietPi/dietpi.txt
echo SOFTWARE_QLCPLUS_AUTOSTART=/opt/qlc_startup.qxw
echo -----------------------------------------------

FILE=$(grep -m1 '^[[:blank:]]*SOFTWARE_QLCPLUS_AUTOSTART=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')


echo Startup file from dietpi.txt $FILE


# Create startup options for QLCplus

QLC_OPTS="-m -w -f -c 400,500,40,50 -p -o "$FILE


echo QLC_OPTS $QLC_OPTS

# Find the exact path to QLCplus
FP_QLCPLUS=$(command -v qlcplus)

echo Attempting command ----   xinit $FP_QLCPLUS  $QLC_OPTS

# --- Just comment out this last line if you don't want to load QLCplus

xinit $FP_QLCPLUS $QLC_OPTS

I hope this helps someone.

All I’d like to be able to do now is create some kind of VNC connection to the Xinit session so I can remotely edit the QLCplus setup, rather than just run it via the web interface.

I’d welcome suggestions and assistance with this last bit.

It’s taken some serious research and a lot of dead ends, but I’ve now managed to –

Start QLCplus in a stand alone X session, with a web interface

AND

Start a VNC server that shares out the Display that QLCplus is running on (not a virtual display)

As normal, it was a lot easier than all the things I had tried at first.

The process is

sudo apt-get install tigervnc-common tigervnc-scraping-server

mkdir -p ~/.vnc

vncpasswd

(Follow on screen prompts for setting the password)

Then add / amend these lines to what is mentioned above into /var/lib/dietpi/dietpi-autostart/custom.sh


xinit $FP_QLCPLUS $QLC_OPTS &
sleep 60
x0vncserver -passwordfile ~/.vnc/passwd -display :0 &

Thanks to information in this post

www.howtoforge.com/tutorial/how-to-start-a-vnc-server-for-the-actual-display-scraping-with-tigervnc


My next step is to get this working on an ODroid C2 without a display, so that the C2 can hide away in a cupboard, happily running the all the Art-NET / sACN / DMX lighting, via remote controls from the web interface or openHAB2 / Node-RED.

But editing the configuration is no harder than using a VNC session from the comfort of your preferred PC :smiley:

Again, any tips on how to get QLCplus working on an ODroid C2 without a connected monitor would be very welcomed.

(For the sake of £5, I might just plug a dummy HDMI plug in and save myself a headache)