ARM operation

I actually made an attempt at running Quelea on Raspberry Pi 3 Model B a couple of years ago and managed to get it up and running. My plan was to connect the Pi to the projector, set it up to be used on a single monitor and then remote control everything. However, the Pi 3 was too slow in the end to run smoothly.

As I was poking around I took notes of what I did to get it to run, to eventually write a guide on how to set it up if anybody else was interested of a similar solution. I gave up the idea when I realized that the Pi 3 wasn’t powerful enough, but I figured I could post my notes here if parts of it could be helpful for someone looking at this post.

I did have to make some changes to the code back then, not sure if there still would be the same issues today. If I understand my notes correctly, the only thing I had to remove was the code for creating the QR code. After that I built an installer and was able to install it using the instructions below.

(Unfinished) Instructions for installing a headless version of Quelea on Raspberry Pi 3

Using a Raspberry Pi to deploy Oracle Java FX Applications
JavaFXPorts

Install OS (Ubuntu Mate is used here, but other Debian-based alternatives should also work)
Download JDK 8 for ARM and unpack
Download Gluon SDK https://gluonhq.com/download/javafx-embedded-sdk/
Move:
	armv6hf-sdk/rt/lib/ext/jfxrt.jar -> jre/lib/ext/
	armv6hf-sdk/rt/lib/arm/* -> jre/lib/arm/
	armv6hf-sdk/rt/lib/javafx.platform.properties -> jre/lib/
	armv6hf-sdk/rt/lib/javafx.properties -> jre/lib/
	armv6hf-sdk/rt/lib/jfxswt.jar -> jre/lib/
Set default Java or use path to directory
	sudo update-alternatives --install /usr/bin/java java '/usr/lib/jvm/jdk1.8.0_191/bin/java' 1
	sudo update-alternatives --set '/usr/lib/jvm/jdk1.8.0_191/bin/java'
Recommended: Setup SSH (for force closing)
Optional: Setup VNC (to remote control with more ease)
Increace VRAM to 128
	sudo raspi-config
	5 Advanced Options
	A3 Memory Split
	128
Optional: Change resolution
Install custom version of Quelea
Edit preferences, e.g.
	use.remote.control=true
	single.monitor.warning=false
	remote.control.port=1112
	mob.lyrics.port=1111
	use.mob.lyrics=true
	remote.control.password=quelea
	projector.screen=0
	// NB: If you use --headless=true later on when starting Quelea, there is no need to set projector.screen to 0 here
Make archive of database you want to use
Transfer database
	scp '/home/USER/.quelea/database_new.tar.gz' pi@192.168.0.4:/home/USER/.quelea/
Extract database
Optional: Transfer extra Bibles
	scp '/home/USER/.quelea/bibles/b00.xml' pi@192.168.0.4:/home/USER/.quelea/bibles/
Make auto-starter
	Option 1:
		Create sh
			cd /usr/local/Quelea
			java -Xms400m -Dfile.encoding=UTF-8 -Dprism.ordsm.order=sw -Djavafx.platform=eglfb -jar Quelea.jar --headless=true
		Make sh runable
			sudo chmod +x SH-FILE
	Option 2:
		If you only will start Quelea with the autostarter, use the following line directly the starter instead
			cd /usr/local/Quelea | java -Xms400m -Dfile.encoding=UTF-8 -Dprism.ordsm.order=sw -Djavafx.platform=eglfb -jar Quelea.jar --headless=true
	Make starter through GUI
		Point to SH-FILE (/bin/sh /usr/local/Quelea/quelea.sh) or add the line in option 2
If needed for any changes: 
	Force close:
		pidof java
		sudo kill PID
	Edit preferences to disable projection window:
		sudo nano /home/USERNAME/.quelea/quelea.preferences
			projector.screen=-1
		Ctrl + o
		Return
		Ctrl + x
	To run from SSH, first write:
		export DISPLAY=:0
	Close projection screen:
		(Alt + tab to find the right window)
		Alt + F4