OmegaT on Linux HowTo

This HowTo provides information on using OmegaT on Linux. It is particularly aimed at users who are new to Linux.

Java

OmegaT does not run on all versions of Java. Before downloading OmegaT, first check the system's Java installation for its suitability for running OmegaT. To do this, open a terminal (also known as a console or command-line window; common programs for this are konsole (KDE) and gnome-terminal (GNOME), and type:

java -version

The system will output details of the Java version already installed at system level.

Sun Java versions: check the system requirements in the OmegaT documentation (readme.txt) for the precise Sun Java version required (i.e. whether your version of Java is sufficiently recent).

Third-party Java versions: until relatively recently, OmegaT only ran on Sun's own Java. OmegaT now appears to run on the OpenJDK Java implementation supplied with some Linux distributions, but some functions (such as the full set of command-line options) are not available; a different font set is supplied; and some glitches have been reported, such as with window display and the segmentation function.

If you are unsure whether your Java version is suitable, you can:

- Simply install an OmegaT version without Java and see whether it works. If it does not, you still have the option to install a local version of Java or a different version of Java at system level.

- Install a second, non-default version of Java at system level, and launch OmegaT explicitly using this version.

- Install the OmegaT version with Java included.

If you establish that the version of Java installed at system level is not compatible with OmegaT and you wish to replace this Java version with the Sun Java version, check first whether a Sun package is available for your Linux distribution (SUSE, Ubuntu, etc.). If so, this makes installation much easier.

If you obtain the Sun version of Java directly from Sun, installation is likely to be straightforward, but you will have to configure it manually in order to make it the default version at system level. This is not recommended, particularly if you are unfamiliar with Linux.

The third option, i.e. installing an OmegaT version with Java included at local level, is always the "failsafe" option.

Selecting and downloading OmegaT

The following versions of OmegaT are available for Linux:

"Standard", "Latest", "/trunk" and "Webstart". The "Latest" version is recommended. (Refer to the "Downloads" page on the OmegaT website for details of the differences.)

Without/with JRE included, i.e. the cross-platform without JRE, e.g. "OmegaT_2.1.7_02_Beta_Without_JRE.zip" and the Linux-specific version with JRE, e.g. "OmegaT_2.1.7_02_Beta_Linux.tar.bz2". Select a version without or with JRE depending upon your Java situation (see above).

Note that it is easy to install multiple versions of OmegaT on Linux without conflicts. They will however always access the same user configuration files (unless launched from a different user account).

Unpacking the archive

Assuming that you have downloaded the latest beta version either with or without JRE, place it in a suitable folder on your system. I recommend creating an /omegat folder in /usr/local/lib, or failing that, in /opt. You will need root permissions to do this.

Unpack the archive in the desired folder. Most distributions should have no trouble unpacking the zip archive format or the .tar.bz2 format (the latter is a common archive format used on Linux).

Copying OmegaT onto your hard drive and unpacking the archive is sufficient to "install" it; there is no installation procedure as such. OmegaT creates certain user-specific folders and files when it is first run.

Launching OmegaT from the command line

First, try launching OmegaT from the command line. To do this, open a terminal window (see above). You do not need root permissions to do this. On the command line, navigate to the folder containing the file OmegaT.jar, e.g.:

cd /usr/local/lib/omegat/OmegaT_2.3.0

and confirm with ENTER. (The path will obviously be slightly different, depending upon where you have placed OmegaT and how you have named the folders.)

Then enter the launch command itself, and confirm with ENTER. The basic launch command is:

java -jar OmegaT.jar

The command is case-sensitive.

If you are relying on or wish to use a Java installation that is not installed at system level, this will not be sufficient: you must also instruct your system where to find Java. If you have installed a version of OmegaT with JRE supplied, the launch script supplied already contains this path for you. If you have installed an additional version of Java but have not made it the default version at system level, you must include the whole path of the Java binary in the launch command. This will be something like /usr/lib/jvm/java-6-sun-1.6.0.16/jre/bin/java; make a note of where Java is installed during installation so that you can find it again. The command will therefore be (in this case):

/usr/lib/jvm/java-6-sun-1.6.0.16/jre/bin/java -jar OmegaT.jar

In your launch script, do not confuse the path to OmegaT.jar and the path to the java command. The first (with the cd command) is needed if your launch script is not in the same folder as OmegaT.jar. The second is needed if the Java version you wish to use is not the default installation at system level.

Launching OmegaT from a launch script

Assuming that launching from the command line was successful, you can create a launch script. A basic launch script is supplied with OmegaT: it is the file named simply "OmegaT" in the main OmegaT folder. You can also create your own launch script(s): they are simply plain-text files and can be written/edited in a text editor.

The launch script must contain the commands described above, i.e.:

The basic OmegaT launch command, which is:

java -jar OmegaT.jar

Possibly with explicit reference to the location of the Java command, e.g.

/usr/lib/jvm/java-6-sun-1.6.0.16/jre/bin/java -jar OmegaT.jar

and possibly preceded by a command to change the folder to the folder containing the file OmegaT.jar, e.g.:

cd /usr/local/lib/omegat/OmegaT_2.3.0

Depending upon the Linux distribution you are using, the launch script may have to be made executable. To do this, right-click on the script file with the mouse, change "permissions" and check the "make executable" box. (The precise wording differs according to distribution.) Depending upon where the script is located, you may have to have root permissions to do this.

Testing your launch script

Open a terminal. Use the "cd" command to change folder to the location of your launch script, then type

./OmegaT

(assuming that your script file is named "OmegaT"), and confirm with ENTER. OmegaT should launch.

Depending upon your distribution, OmegaT may launch if you simply click on the launch script in your file manager.

Making the launch script available throughout your system

Copy or move the launch script file to a folder that is in the system's execution path; this is usually /usr/local/bin. If the file was previously in the same folder as OmegaT.jar, you will now need to precede the launch command with the "cd" command changing folder to location of OmegaT.jar.

To test whether OmegaT can be launched from anywhere on your system, open a terminal again and simply type the name of the script file, followed by ENTER. The file name is case-sensitive; if you wish to launch OmegaT simply by typing omt, simply rename the file from OmegaT to omt.

An even easier way of launching OmegaT is to hit Alt-F2, then to enter and confirm the name of the launch script in the dialog.

You can have multiple OmegaT launch scripts on your system. This enables you for example to try a new version of OmegaT whilst leaving the previous version completely unaffected: simply write a script for the new version and give it a different filename. Multiple launch scripts also enable you to launch OmegaT with different launch options where necessary, such as with a different tokenizer.

User-friendly launching of OmegaT

If you have got this far, you will have realized that there are many ways of launching OmegaT, and that they become progressively more user-friendly.

The next stage is to add OmegaT to your desktop and to menus. How you do this will depend upon your system, and in particular your desktop (e.g. KDE or GNOME).

Add an OmegaT menu entry in KDE as follows:

Control Center - Desktop - Panels - Menus - Edit K Menu - File - New Item/New Submenu

Then, after selecting a suitable menu, add a submenu/item with File - New Submenu and File - New Item. Enter OmegaT as the name of the new item.

In the "Command" field, use the navigation button to find your OmegaT launch script (the file named OmegaT in the unpacked folder), and select it.

Click on the icon button (to the right of the Name/Description/Comment fields) - Other Icons - Browse, and navigate to the /images subfolder in the OmegaT application folder. Select the OmegaT icon.

Finally, save the changes with File - Save.

In GNOME, add OmegaT to your panel (the bar at the top of the screen) as follows:

Right-click on the panel - Add New Launcher.

Enter "OmegaT" in the "Name" field; in the "Command" field, use the navigation button to find your OmegaT launch script (the file named OmegaT in the unpacked folder). Select it and confirm with OK.

Click on the icon button, then hit Browse... and navigate to the /images subfolder in the OmegaT application folder. Select the OmegaT_icon.png . GNOME may fail to display the icon files in the available formats and initially appear to expect an SVG file, but if the folder is selected, the files should appear and OmegaT_icon.png can be selected.

Customizing your launch script

OmegaT has a number of command-line options. You can use these, as their names suggests, on the command line, but you can also add them to your launch script. Refer to the OmegaT user manual for a full list of command-line options.

Using Kaptain to launch OmegaT

An alternative way of launching OmegaT on Linux is by using Kaptain. Kaptain enables a GUI to be created by which the launch options can be managed conveniently. This is particularly useful if you frequently use different versions of OmegaT or launch it with different arguments, such as different tokenizers.
An example Kaptain launch file
More information about Kaptain

Appearance of fonts in OmegaT on Linux

The appearance of fonts in OmegaT on Linux may differ widely, according to:

- The Java version used (the same font may appear quite different on Sun and OpenJDK versions of Java)

- The available/selected fonts

- The font size

- Whether anti-aliasing is enabled (this is a command-line launch option; refer to the OmegaT user manual for details)

Uninstalling OmegaT

To remove all traces of OmegaT from your system:

Delete the OmegaT program folder. This can easily be restored again in the future.

Delete the folder /home/<user>/.omegat of any user account from which OmegaT has been launched. This will result in deletion of any user configuration settings that have been made (such as changes to the segmentation rules), and – if the folder is deleted "properly", i.e. not simply moved to trash, cannot be restored.

Delete any launch scripts and remove any custom entries for OmegaT in your desktop.

Uninstalling OmegaT will not remove any OmegaT projects from your system, unless you have placed such projects within the OmegaT program or configuration files folder(s), which is not a good location for them in any case.

Copyright Marc Prior 2010-2011