DataWarrior User Manual

Installation And Customization


Installing DataWarrior

DataWarrior installers are available for Linux, Macintosh and Windows. DataWarrior was written in Java and its complete source code is published under the GNU Public License on GitHub.com. Installers for the three platforms can be downloaded from https://openmolecules.org. The DataWarrior installation contains various example files and a complete user manual as part of locally installed application. The same user manual is also available online at https://openmolecules.org. All installers contain a recent Java runtime environment. You don't need to install Java yourself.

If you intend to update DataWarrior v5.5.0 or earlier to v6.0.0 or newer, then we recommend to uninstall the previous version as described below and then to freshly install the new version. If you have saved or modified any files in the DataWarrior installation directory or any of its subfolders (e.g. 'reference', 'example', or the 'macro' folder), then you should copy these files to a safe place before uninstalling the outdated DataWarrior version.

To install DataWarrior on Windows just double-click the downloaded datawarrior.msi file and follow the instructions. Anytime later you may tracelessly uninstall the program using the Control Panel. DataWarrior for Windows is a 64-bit application and includes its own 64-bit Java Runtime environment.

To install DataWarrior on the Macintosh just double-click the downloaded datawarrior.dmg file and drag the DataWarrior application icon onto the Application folder alias icon in the same window. To launch DataWarrior for the first time and depending on the particular version of OSX, you may need to open the Application folder in the Finder, right click DataWarrior and choose open. Or you may get an error message DataWarrior can not be opened because the developer can not be verified. In this case press Cancel, open System Preferences, and go to Security and Privacy -> General. There will be a message about the program that was blocked, with the option to Open Anyway. In case you want to de-install the software later, just drag the DataWarrior folder from the application folder into the trash.

To install DataWarrior on Linux unpack the downloaded datawarrior.tar.gz file to any location and run the 'install.sh' script with root privileges. To later uninstall DataWarrior you may run /opt/uninstall with root privileges.


Updating DataWarrior

If you didn't set the Update Mode in the Help menu to Never Update, then DataWarrior checks when it is launched, whether an updated version is available. If an update is found, then, depending on your selected update mode, DataWarrior will ask for your permission or just download and save the update as a 'datawarrior_vxx.xx.xx.jar' file on your hard disk. The exact location depends on the operating system. The default locations are '/opt/datawarrior/update' on Linux, '/Applications/DataWarrior.app/Contents/Java/update' on MacOS, and 'C:\\ProgramData\DataWarrior' on Windows. If DataWarrior cannot write files in the default directory, then it may choose another location or ask the user to provide a writable directory for update files.

In fact, when DataWarrior is launched, a small launcher is started first, which then launches the newest 'datawarrior_vxx.xx.xx.jar' file from the update directory. When downloading updates, DataWarrior will keep two older 'datawarrior_vxx.xx.xx.jar' files in the update directory. This way you may always return to an older version by removing the newest one or two files.


Look & Feel

When DataWarrior launches for the first time, it uses the Graphite Look & Feel, which means that all user interface elements and the background are drawn in a dark grayish tone. This emphasises in particular color-rich views. Since aesthetic perception depends on the individuum, the Help menu allows to choose from a couple of different Look & Feels. The chosen Look & Feels is stored as part of DataWarrior's settings.

Three different Look & Feels on a Macintosh


Hi-Resolution Monitors

During recent years computer and monitor manufacturers have introduced monitors with substantially higher resolutions than what was common before. DataWarrior supports these monitors on all three platforms, but in a slightly different ways, because high resolution monitors are handled differently on different operating systems. In general user interface elements as buttons, combo boxes and menu items are enlarged to make up for the smaller pixel size. Therefore, everything looks much sharper.

On Windows the enlargement factor can be defined for all applications in the Display Control Panel under Appearance and Personalization. Under legacy versions of Windows it is also necessary to disable DPI virtualization for the DataWarrior application. To do so, right-click the name of the DataWarrior executable file, click Properties, click the Compatibility tab, and then select the box labeled Disable display scaling on high DPI settings.

On Retina displays of the Macintosh this factor is predefined as 2.0. And on Linux it depends on the Linux dialect. Sometimes the scaling factor can be defined in the display settings dialog as it was under Ubuntu with the Unity desktop. On the Gnome desktop the scaling factor may be defined for all applications using this command:

gsettings set org.gnome.desktop.interface text-scaling-factor 1.4

DataWarrior should recognize these settings and increase its fonts and user interface elements accordingly. This, however cannot be garanteed for all operating systems and version. Therefore, DataWarrior's Help menu contains a User Interface Scaling option to define a static scaling factor instead of using the default one (not for Macintosh). Alternatively, on Linux and Macintosh a dpifactor can be added as JRE option to the startup settings. On Macintosh you can add a line like '-Ddpifactor=1.5' to the Info.plist file in '/Applications/DataWarrior.app/Contents'. On Linux you would need to add '-Ddpifactor=1.5' to the last line of the '/opt/datawarrior/datawarrior' shell script just after the other '-X...' options.


Memory Settings

As all Java programs, DataWarrior has a predefined maximum memory setting, which should allow you to work with rather big data files. If these, however, grow into millions of rows, then you may experience Out of memory errors. If your computer has enough physical memory, then you may increase DataWarrior's maximum memory setting the following way:

On Linux this can be easily done by updating the batch file that launches DataWarrior. Open a shell and type sudo pico /opt/datawarrior/datawarrior (if you can't use sudo, then type su, Enter and, when asked for the password, the super-user password. Then type pico /opt/datawarrior/datawarrior. Look for the -Xmx4096 setting in the last line, which defines the maximum memory size. Increase the number, press Ctrl-O and Enter to save changes and Ctrl-X to exit the editor.

On the Macintosh you do the following: Open a terminal window, type pico /Applications/DataWarrior.app/Contents/Info.plist. A text editor opens. Use the cursor keys to move close to the end of the file, where you will find the -Xmx4096M setting. Increase the number, press Ctrl-O and Enter to save changes and Ctrl-X to exit the editor.

If you use Windows, the procedure is a little more complicated. You need to patch the DataWarrior.exe file. For that start a hex-editor or your choice, search the file for the string -Xmx3600m and increase the number part of it, save the file and you are done.