Did you just get a Chromebook, and excited to get mapping with it? You can run JOSM on Chromebook with a little bit of effort. This guide was written for ChromeOS 74.0.3729.159 and up and relies on the Debian Stretch 9 emulator Crostini. As you’re entering these commands, you can copy and paste them from the website to the Debian terminal by using a right click (or Alt + Click if you don’t have an external mouse connected)
Open the Settings app, and search for Linux. Click “Turn On” to enable Linux support. On the popup installer, click Install. Sit back and wait. When the installation is complete, a Debian Linux shell terminal will automatically open.
This command adds the JOSM repository to the sources list.
echo deb https://josm.openstreetmap.de/apt alldist universe | sudo tee -a /etc/apt/sources.list
Download and register the OpenStreetMap public key.
wget -q https://josm.openstreetmap.de/josm-apt.key -O- | sudo apt-key add -
This will query updates to all packages, and install josm afterwards. This will take quite some time. Go grab a coffee.
sudo apt update ; sudo apt install josm
Open up JOSM within the App Folder “Linux Apps” from the launcher. It’s possible that JOSM could have too small a font to read on your screen. The fix is to install Java 11 and use UIScaling to render the applet with a larger font. If you wish to fix this and give JOSM a larger font, follow the next steps:
Debian Stretch doesn’t come with Java JDK 11 by default, but we can enable it by adding the backports software repository.
UIScaling is only compatible with JDK 11, not the default JDK 8. We need to upgrade. Enter this command:
sudo apt install openjdk-11-jdk
We want to make sure JOSM is configuring itself to use JDK 11 instead of 8. Reinstall it.
sudo apt remove josm ; sudo apt install josm
We need to inject the UI Scaling parameters into the launcher tile. The best way to do this is with the command line text editor nano, but you can use whichever editor you are most familiar with.
sudo apt install nano
Once nano is installed, use the command sudo nano /usr/bin/josm
Navigate to line 27, and you should see this option:
JAVA_OPTS=”-Djosm.restart=true -Djava.net.useSystemProxies=true $JAVA_OPTS”
Edit this line to state the following:
JAVA_OPTS=”-Dsun.java2d.uiScale=2.0 -Djosm.restart=true -Djava.net.useSystemProxies=true $JAVA_OPTS”
Comment from SomeoneElse on 27 June 2019 at 15:32
Thanks for this. It’s always good to have an alternative to doing things via a Linux GUI and “crouton” on a Chromebook. Chromebooks are surprisingly capable for the money, and if you don’t want to use the Google stuff, you don’t have to. You’ve also got the option of keeping all the data (or software) you care about on an external USB stick and just putting that in your pocket when you’re worried that the PC might get stolen.
(one minor note - an extra space has crept into “/etc/apt/sourc es.list”).
Comment from CjMalone on 21 October 2021 at 17:42
Someone just found this, and asked me for help with it. This is a bit outdated and doesn’t work with Debian buster.
The quickest solution was just to use the one in the Debian repos. It might be a bit outdated, but it works.