JOSM/Linux

From OpenStreetMap Wiki
Jump to navigation Jump to search
Linux mascot “Tux”

This page provides help for JOSM on Linux systems.

Installing JOSM

The following distributions have JOSM available in their package libraries, however the maintenance of these packages may be some way behind the recent JOSM developments and bug fixes.

In general JOSM simply requires a single jar file, so downloading and starting a recent version of this jar file can be the best way to work with a reasonably up-to-date version of JOSM. See the general JOSM/Installation page for this.

Some of the following instructions use wget to download. In case the wget complains about a certificate error you may want to install the required root CA certificates to your system, or wget's --no-check-certificate switch, or use the unsecured http URL.

Arch Linux

Install the josm package available in the official repositories.

pacman -S josm

Debian

This is the recommended way to install on all debian versions. Add the apt repository from openstreetmap.de:

1. Use the following one-liner in a terminal to create a new repository:

echo deb https://josm.openstreetmap.de/apt alldist universe | sudo tee /etc/apt/sources.list.d/josm.list > /dev/null

2. Next, it is necessary to download and register the openstreetmap.de public key. That can also be done in a single line:

wget -q https://josm.openstreetmap.de/josm-apt.key -O- | sudo apt-key add -

3. The final item is to refresh the sources and install. Run

sudo apt-get update ; sudo apt-get install josm

Troubleshooting

Sudo-error

See the debian documentation about sudo if this command fails.

Apt-https-error

You may suffer an extra wrinkle at this point, not mentioned on the Download page:

:~$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?

(it is a simple matter of installing apt-transport-https first)

JOSM-Plugins:

The simple instruction for all distributions is: do not install. Install instead from within JOSM (that was easy).

Java

JOSM requires minimum Java-8, if this is not available on your distribution please see elsewhere how to install a newer java-version.

Ubuntu

On Ubuntu 16.04 and above we recommend to follow the Debian install above as it ensures you will get updates. Alternatively the manual installation or the JOSM packages. The version from the official Ubuntu repositories is often outdated and is not recommended.

Fedora

Fedora 31+32 provide a JOSM package. Starting with Fedora 33, JOSM is no longer packaged. [1]

Install from desktop: System → Administration → Add/Remove Software → type "josm" into search box → click find → click checkbox → apply

Install from command line: $ dnf install josm (as root or use sudo)

JOSM will then be installed and a launcher item put into the Applications → Education menu

FreeBSD

On FreeBSD JOSM is available at ports/astro/josm.

Gentoo

See JOSM/Gentoo

Linux Mint

You can use the Ubuntu package in Linux Mint :

#Add the key
wget -q https://josm.openstreetmap.de/josm-apt.key -O- | sudo apt-key add -
#Add the repository
echo "deb https://josm.openstreetmap.de/apt `awk -F= '/^UBUNTU_CODENAME=/ { print $2 }' /etc/os-release` universe" | sudo tee -a /etc/apt/sources.list

openSUSE

OpenSUSE Build Service has regularly updated builds at Applications:Geo. Install via YaST, or with `zypper in josm`.

Start JOSM

  • See JOSM/Installation#Start JOSM.
  • If you installed JOSM via a package (e.g. from your distribution), you may be able to simply use a simpler josm command.

To automate updating and starting you can use

  • an update and startup script that backs up a number of old versions if the current one doesn't work as desired
  • or you can use the following simple script to use always the latest JOSM version (note that it contains some stuff which you may not need – proxy — or which you may not have – kdialog):
#!/bin/sh
GPSDIR=/home/sven/Desktop/gps
PROXY=www-proxy
export JAVA_HOME=/usr/local/java/jdk1.6.0_04/
DCOPREF=`kdialog --title "Hole JOSM"  --progressbar "Hole JosmLatest" 100`
cd $GPSDIR
wget -N https://josm.openstreetmap.de/download/josm-latest.jar
dcop "$DCOPREF"  close
$JAVA_HOME/bin/java -Xmx1024M -DproxyHost=$PROXY -DproxyPort=8080 -jar josm-latest.jar