Install Guides

Connecting to your layout

Release Notes

User Guides

Examples

Source Code

Bugs and Requests

Installing JMRI on Ubuntu GNU/Linux

These are instructions for the installation of JMRI on a Ubuntu Linux/GNU system.  Though the procedure is not complicated a script has been written to automate some of the procedures.   These have been used by a number of users successfully and should work on Ubuntu, Kubuntu, XUbuntu and Debian (The USB port has not been tested under Debian).

This draft is now in its final stage.

1 Introduction

GNU/Linux is becoming increasingly popular as a desk top operating system. This short instruction deals with installing JMRI on the Ubuntu (or similar Debian based) desktop.

1.1 The Problem

JMRI is quite easy to install on Windows. It consists of two stages, install Java and install JMRI. Unfortunatly GNU Linux used to involve five stages and some command line work.  The use of a script to automate most of this makes the task much easier. 

1.2 Linux/GNU

GNU/Linux provides a viable alternative to Windows. Is it free and it is also suitable for loading onto older machines which may no longer have a viable legal OS. It is also far less resource hungry than current windows distributions and this is  particularly true of Xubuntu.

1.3 Ubuntu (Debian)

Ubuntu is based on Debian and is recognised as being a very user friendly distribution. Indeed in the US Dell are going to supply computers with it pre installed.

Details on installing Ubuntu can be found below at Ubuntu:

Ubuntu Details

Follow the Path "Download" then I suggest you read up on the help page which is offered which gives advice on how to download the iso image and then create a bookable CD to install Ubuntu.

Details for installing Xubuntu have also been written.

2 Notes

In the next section we describe how to install the components needed before JMRI can be run, then how to install JMRI itself. Before starting that, make sure you're machine has a working internet connection (for downloads), etc.

LocoBuffer USB

If you are planning to  Ubuntu 7.10 and a LocoBuffer-USB from RR-Cirkits you will need to download the patched  ftdi_sio.ko file  (right click and save this file) to replace the one that came with the distribution. A better option is to upgrade your system to the Ubuntu 8.04 release which includes a fix for this driver problem.

3 Installation Steps

There are three steps in Installing JMRI in Linux/GNU, The are installation of Java, running the Install-RXTX script (which installs the RXTX files, alters permissions on TTY devices and adds the user to etc/group), installing JMRI itself and finally setting up the programme environment if necessary.

3.1 JAVA

One must be careful which Java is loaded. 'java -version' will often show Java 1.4.2 gij, this one is not wanted. The 'Blackwood' Java Virtual Machine does not work for JMRI, as it doesn't have all the needed libraries. It's best to have the Sun "SDK" software development kit instead of just the runtime environment (JRE).

We recommend installing from the repositories.

System > Administration > Synaptic Package Manager

Then search for sun-java6-jdk (or later version). Once you've found it, mark it to be loaded, and click apply. You'll probably be told that a number of other packages will also be loaded. That's OK.

3.2 RxTx

A problem here is that the RxTx in the Ubuntu repositories does not work with JMRI! RXTX 2.1 uses a different structure than RXTX 2.0; JMRI requires the RXTX 2.0 structure. The "2.0.7pre2" is known to work well and that is what is included in the automated script which can currently be downloaded

Download RXTX-Install

and place it in a spare directory. Unpack it by double clicking, and then extracting (extract) the file. The script is run by opening a terminal and giving the command "./RXTXinstall"

The script will do the following:

The above description is brief, as the script itself can be opened in a text editor and studied at leisure.

3.3 JMRI

JMRI is downloaded in the normal manner.

Download JMRI

Double click on the .tgz file to open the File Roller, then click extract.

JMRI will created inside a "JMRI" directory which is created inside the directory that contains the downloaded .tgz file. Umm..



When PanelPro and DecoderPro are first run the look for a hidden directory ".jmri" in the home directory. If they do not find it they create it. To see this hidden directory in the file browser select "View" and "Show Hidden Files". This directory holds the preferences. If you are experiencing difficulties with the program failing to start up, removing the relevant Config2.xml file from this directory should fix it.

3.5 The Environment

On a fresh install the environment is OK, java -version will give

java version "1.6.0"

Java(TM) SE Runtime Environment (build 1.6.0-b105)

Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

If it does not this should simply be a matter of changing the PATH variable.

PATH=/usr/lib/jvm/java-6-sun/jre/bin/:$PATH

A neater way is to alter the Start Up script.

USB Ports 

Often the start up script needs altering to get the computer to "see" a USB port by adding "-Djavax.comm.rxtx.SerialPorts=/dev/ttyUSB0" as shown below:

java -noverify -Djavax.comm.rxtx.SerialPorts=/dev/ttyUSB0 -Djava.security.policy

Please see the FAQ for more details.

4 Starting JMRI

To start open a terminal and enter ./DecoderPro

4.1 Errors

If you have any problems get back to the group.

bash: ./whatever.csh: bad interpreter: No such file or directory
Can not run the shell: Try installing csh.
bash; ./cats.csh: Permission denied
Try setting the icon to executable.

(Rev 1.7 Mon 5 May 2008)