Skip to content

Instantly share code, notes, and snippets.

@rickselby
Last active June 19, 2024 12:11
Show Gist options
  • Select an option

  • Save rickselby/c4f13d5788c9d43fcd8880402981e31c to your computer and use it in GitHub Desktop.

Select an option

Save rickselby/c4f13d5788c9d43fcd8880402981e31c to your computer and use it in GitHub Desktop.
JMRI Raspberry Pi setup

Update OS and packages

apt-get update && apt-get upgrade

Install required software

java -version (install openjdk if it doesn't exist)

https://www.jmri.org/download/index.shtml into /opt/JMRI

https://www.arduino.cc/en/software (arm 32 bits) ./arduino-linux-setup $USER

Set up headless mode

Edit /boot/config.txt to enable GUI without HDMI connected

  hdmi_force_hotplug=1
  hdmi_group=2
  hdmi_mode=4 (720p)

Add /home/pi/Desktop/JMRI.desktop (see other file)

mkdir /home/pi/.config/autostart
cd /home/pi/.config/autostart
ln -s /home/pi/Desktop/JMRI.desktop

Set up VNC to connect to existing X session

sudo apt-get install x11vnc
x11vnc -storepasswd

Add /home/pi/.config/autostart/x11vnc.desktop (see other file)

[Desktop Entry]
Version=1.1
Name=JMRI
Comment=JMRI PanelPro
Exec=/opt/JMRI/PanelPro
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment