JMRI Install Guide: Linux
There are multiple versions of Linux, all slightly different and requiring installation instructions that differ in detail. There are specific pages describing details of installation on
The general procedure to install JMRI is:
- Determine if your hardware supports Java and JMRI
- Get and Install Java (if needed)
JMRI System Requirements
Using JMRI requires a combination of hardware (in this case running Linux), Java software and a JMRI download for a specific version.
JMRI® version 4.2 requires Java 1.8.
Version 3.10.1 requires Java 1.6 or later.
Version 2.14.1 requires Java 1.5 (or 1.6 if you wish for drag & drop).
Version 2.12 requires Java 1.5 or later.
These steps outline how to install DecoderPro on Linux. These steps should work for Red Hat 8, 9 and 10. They don't work on RedHat 7.
(For other versions of Linux, please see the first item in our JMRI Linux FAQ).
You'll need the correct serial port or USB port to attach to your layout hardware. JMRI is compatible with USB-to-Serial adapters, so long as they have Linux drivers that make them look like regular serial ports. For troubleshooting, see the FAQ
See if you have a version of Java already installed
sh> java -version
If the Java version is 1.8 or later, you may be fine, but be aware that if you did not install Java on your system yourself, some systems have Java only partially installed. They will respond correctly to the above command, but still are not all there. If your system does not have Java in the environment variable PATH, the install is probably not complete. Check with the system manager or do a fresh Java installation.
If it is not at least 1.8, or if you get a "java: not found" error, you will need to install it.
If that doesn't work or you need to manually install Java, you can find further information on the Oracle Java downloads page.
- Java comes in several forms:
JMRI needs the Standard Edition (SE) version, but
Java EE is also OK;
neither Java ME or Java Embedded are sufficient.
- There are also different Java SE installers: JMRI can run with either a proper SDK (Software Development Kit, for compiling and running Java) or JRE (Java Runtime Environment, for just running Java) installation.
chmod 666 /dev/ttyS0
chmod 666 /dev/ttyS1
Give user access to lock files (required on Red Hat).
/etc/gshadow to add user to the 'uucp' and 'lock'
Download a version of JMRI, either the latest production version, or a "test version". Since the version numbers change with every release, this link takes you to the general JMRI download page, where you can select whichever version you like.
The JMRI project is continuously adding features, bug fixes, examples and tutorials to the release, and so a new "test" versions appear every couple of weeks. You may find one of these has features that you really want. These are announced in the "JMRI users" Yahoo discussion group at https://groups.yahoo.com/neo/groups/jmriusers/info.
Uncompress/untar the file you downloaded above. This will create a new "JMRI" folder.
Note: Each JMRI release is an independent set of files: It's intended to be used as a whole. Each release provides new files, and sometimes removes old files. You should therefore not expand the download into the same place as an existing JMRI installation. Instead, expand it into a separate location, and move in to it's final destination, completely replacing any previous version of JMRI.
To install, you just have to move that new JMRI folder to where you want it on your computer.
You can run the program by using
the "DecoderPro", "PanelPro", or
"JmriDemo" scripts in the JMRI folder. Change directory there, and
invoke a script with e.g. "./DecoderPro"
You can find some more specific information on the "JMRI Linux FAQ page".
JMRI users have created helpful pages:
- Instructions for Fedora on david zuhn's pages and Jon Miner's pages.
- Instructions for Debian on Tom Jerrard's web site, including a great description of how to add an icon to the desktop.