ES:JOSM/Linux

From OpenStreetMap Wiki
Jump to navigation Jump to search

broom

Help (89606) - The Noun Project.svg

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

Install from desktop: System->Administration->Add/Remove Software - type "josm" into search box & click Find. Click checkbox & then Apply.

Install from command line: $ dnf install josm<CR> (Logged in as root or use sudo]

JOSM will then be installed & 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 `grep "VERSION=" /etc/os-release |
awk '{ print $2 }' | tr [:upper:] [:lower:]` universe" |
sudo tee -a /etc/apt/sources.list

openSUSE

OpenSUSE Build Service has regularly updated builds at Applications:Geo. Installation via YaST, zypper or rpm.

Older stuff (if you use openSUSE and this is really not needed any more, please delete):

JOSM packages are available in the openSUSE's build service, in the Application:Geo repository.

Go to http://download.opensuse.org/repositories/Application:/Geo/, select you distibution and find the RPM in the noarch directory. Install using RPM or your favourite package manager.

Example for openSUSE 10.3 using zypper:

zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_10.3
zypper ref
zypper in josm

The first command has changed slightly for openSUSE 11.0 (and openSUSE 11.1):

zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.0/Application:Geo.repo
zypper ref
zypper in josm

Use this for openSUSE OneClick install:

 http://packages.opensuse-community.org/index.jsp?searchTerm=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