JMRI start


The following link gives instructions on how to install JMRI on your Raspberry Pi automatically:

Tested on Wheezy ( the version of Raspian issued with the original model B) with Sprog II, works. Tested on Jessie works.

Detailed explanation for setting up R-Pi for VNC

The later version of Raspian, Jessie, issued with later versions of the Raspberry Pi can also be used on the original model B.  Jessie has a number of improvements which make JMRI easier to use on a Raspberry Pi.

A most useful improvement is the inclusion of VNC server which allows the Raspberry Pi’s desktop to be viewed on another computer.

How to install and use VNC is here

To access your Raspberry Pi from your Windows machine, you  need to download and install Putty.

Start a Putty session, select ‘SSH’ enter the IP address of your Pi eg:

VNC allows you can use the Raspberry Pi in ‘headless’ mode which means ‘without the Desktop being displayed even if a monitor is connected to the Raspberry Pi’.

Using the R-Pi without a Desktop improves performance slightly and is a good idea when you are using JMRI to control a layout. However, the good thing about VNC is that it allows the Raspberry Pi desktop to be displayed on another device, even if the R-Pi is not displaying the Desktop itself.

Instructions on how to do this are given at the Raspberry Pi website given above, but I will repeat them here. What you have to do (assuming your are running Jessie) is boot up the Raspberry Pi, and either with a monitor connected, or via VNC you have to go to the Raspberry in the top left of the screen, go down to ‘System Preferences’, and choose ‘Raspberry Pi Configuration’. Where it says ‘Boot’ change the option from ‘boot To Desktop’ to boot ‘To CLI’.  Restart the R-Pi to make the change take effect.

(If you’ve forgotten the procedure under Wheezy is  raspi-config from the command line. You may need to go back to Wheezy if you can’t get JMRI to work with SprogII under Jessie)

If you access the R-Pi via VNC from your Windows machine after the reboot, you will get a small black window, but do not imagine something terrible has happened – all you have to do is activate the virtual desktop on the R-Pi by command line. It tells you how to do this on the R-Pi website, but I will repeat it here

To create and connect to a virtual desktop:

  • On your Raspberry Pi (using Terminal or via SSH), run vncserver.

(You just have to type vncserver into the terminal)

  • Make note of the IP address/display number that VNC Server will print to your Terminal (e.g.
  • On the device you’ll use to take control, enter this information into VNC Viewer.

To destroy a virtual desktop, run the following command:

vncserver -kill :<display-number>

This will also stop any existing connections to this virtual desktop.

You can proceed with the next part of the project which is to install JMRI.

Open a terminal either on the Pi itself or via SHH from another machine.

sudo apt-get install git
git clone
cd JMR-Pi
sudo ./

If this doesn’t work, try again later. Sometimes GitHub gets very busy.

On your Android device, go to the Play Store and install Engine Driver for JMRI. In JMRI, under ‘Actions’ find ‘StartWifi server. Your Android device running Engine Driver can connect automatically without your having to enter an IP address.