Installing JMRI on Ubuntu GNU/Linux



These are instructions for the installation of JMRI on a Ubuntu Linux/GNU system. Unfortunately they assume some knowledge of Linux. They have been used by a number of users successfully and should work on Ubuntu, Kubuntu and Debian (The USB port has not been tested under Debian).

This is still in its draft stages.


1 Introduction

GNU/Linux is becoming increasingly popular as a desk top operating system. This short instruction deals with installing JMRI on the Ubuntu 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 takes five stages and involves some command line work.

1.2 Linux/GNU

GNU Linux provides a viable alternative to Windows. As it is often free it is suitable for loading onto older machines which may no longer have a viable legal OS. It is also far less resource hungry current windows distributions.

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 give one advice on how to download the iso image and then create a bookable CD to install Ubuntu.


2 Directory Structure

Java will be downloaded into /usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/ from the repositories.

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









When PanelPro and DecoderPro are first run the look for a directory .jmri in the home directory . (I think I am right in saying this). 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 closing renaming the relevant config.xml file should do the trick.




3 Installation Steps

There are Five steps in Installing JMRI in Linux/GNU, The are installation of Java, RxTX,JMRI itself, setting up permissions and finally setting up the programme environment.

The JMRI page

3.1 JAVA

One must be carfull which Java is Loaded. java -version will often show Java 1.4.2 gij, this one is not wanted. Blackwood does not work. I would recommend installing from the repositories.

System > Administration > Sympatic Package Manager.

The search for sun-java6-jdk (or latter version) and load it.

Job Done.

3.2 RxTx

A problem here is that the RxTx in the Ubuntu repositories does not work with JMRI! It appears that "2.0.7pre2" is required and that is what is included in the files section.

Download RxTx

and place in spare directory then unpack by double clicking, and then extracting (extract) the file.

Then copy to the relevant sub directories.

javax.comm.properties to /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/javax.comm.properties

javax.comm.rxtx.properties to /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ext/javax.comm.rxtx.properties

comm.jar to /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ext/comm.jar

RXTXcomm.jar to usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/ext RXTXcomm.jar



Make a Soft link so the Programe finds the correct RxTx

Change directory to /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386

And then make the link by

ln -s librxtxSerial-2.0.7pre2.so librxtxSerial.so

This should now have the serial port working. Unfortunately the programme will probably not see the USB port. If this is the case the start up script needs altering. An example is given below.





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. This will create a JMRI directory in the same directory as the .tgz. (See above).

3.4 Odds And Ends

Edit etc/group to change /etc/group file like this:

uucp:x:10 becomes uucp:x:10:your name

Alter Permissions on /dev/ttyS0 and 1

sudo chmod 666 /dev/ttyS0

sudo chmod 666 /dev/ttyS1

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-1.6.0.00/jre/bin/:$PATH

A neater way is to alter the Start Up script. (We need examples of start up scripts).

Also bash or csh. T


4 Starting JMRI

To start open a terminal and enter ./DecoderPro

4.1 Errors

If you have any problems get make to the group.

No Serial Port. Have a look in System > Preferences > Hardware Information. One should have a screen like that shown showing com port as /dev/ttyS0

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.

pic-23


5 CATs