Difference between revisions of "JOSM"

From wiki
(Created page with "[https://josm.openstreetmap.de JOSM] is an editor for [http://www.openstreetmap.org OpenStreetMap]. == Install == === Linux === Create file <code>/etc/apt/sources.list.d/jos...")
 
(sudo)
 
Line 7: Line 7:
 
deb https://josm.openstreetmap.de/apt alldist universe
 
deb https://josm.openstreetmap.de/apt alldist universe
 
</syntaxhighlight>Then download the repository key<syntaxhighlight lang="console">
 
</syntaxhighlight>Then download the repository key<syntaxhighlight lang="console">
# wget -q https://josm.openstreetmap.de/josm-apt.key -O- | apt-key add -
+
$ wget -q https://josm.openstreetmap.de/josm-apt.key -O- | sudo apt-key add -
 
</syntaxhighlight>and finally install JOSM<syntaxhighlight lang="console">
 
</syntaxhighlight>and finally install JOSM<syntaxhighlight lang="console">
# apt update
+
$ sudo apt update
# apt install josm
+
$ sudo apt install josm
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 21: Line 21:
 
JAVA_OPTS="-Xmx2048M -Djosm.pref=${XDG_CONFIG_HOME:-$HOME/.config}/josm -Djosm.userdata=${XDG_DATA_HOME:-$HOME/.local/share}/josm -Djosm.cache=${XDG_CACHE_HOME:-$HOME/.cache}/josm" /usr/bin/josm
 
JAVA_OPTS="-Xmx2048M -Djosm.pref=${XDG_CONFIG_HOME:-$HOME/.config}/josm -Djosm.userdata=${XDG_DATA_HOME:-$HOME/.local/share}/josm -Djosm.cache=${XDG_CACHE_HOME:-$HOME/.cache}/josm" /usr/bin/josm
 
</syntaxhighlight>and make it executable<syntaxhighlight lang="console">
 
</syntaxhighlight>and make it executable<syntaxhighlight lang="console">
# chmod +x /usr/local/bin/josm
+
$ sudo chmod +x /usr/local/bin/josm
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:Linux Desktop]]
 
[[Category:Linux Desktop]]

Latest revision as of 07:17, 28 February 2017

JOSM is an editor for OpenStreetMap.

Install

Linux

Create file /etc/apt/sources.list.d/josm.list

deb https://josm.openstreetmap.de/apt alldist universe

Then download the repository key

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

and finally install JOSM

$ sudo apt update
$ sudo apt install josm

We now nee to create a launcher for JOSM. This launcher as two goals:

  • Raise the memory limits
  • Move JOSM directories in XDG standard ones

Create file /usr/local/bin/josm

#!/bin/sh

JAVA_OPTS="-Xmx2048M -Djosm.pref=${XDG_CONFIG_HOME:-$HOME/.config}/josm -Djosm.userdata=${XDG_DATA_HOME:-$HOME/.local/share}/josm -Djosm.cache=${XDG_CACHE_HOME:-$HOME/.cache}/josm" /usr/bin/josm

and make it executable

$ sudo chmod +x /usr/local/bin/josm