NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

How can I scale the JOSM GUI so its a bit more readable on a high resolution screen? See the attached picture for an illustration.

I'm guessing it might be some java environment variables, but which, and where do I set them?

I'm using Ubuntu 17.10.

asked 17 Dec '17, 16:03

FredrikLindseth's gravatar image

FredrikLindseth
815132435
accept rate: 13%

edited 31 Dec '17, 14:28


See https://josm.openstreetmap.de/wiki/Help/HiDPISupport

The first step is to be sure to use Java 9.

permanent link

answered 17 Dec '17, 16:06

don-vip's gravatar image

don-vip
30056
accept rate: 33%

It doesn't really say WHERE to set 'GDK_SCALE=2 java -jar josm.jar'. Just in my .bash_profile?

(17 Dec '17, 16:13) FredrikLindseth

In your environment, but this is only needed if it does not work out the box. Did you update to Java 9 first?

(17 Dec '17, 16:15) don-vip

where do you download Java 9?

(18 Dec '17, 19:31) skfd

@skfd: according to ubuntusers.de: just install package openjdk-9-jre (which is in universe, for Ubuntu 16.04 or later) using your usual package management tool. It may be good to uninstall other Java versions before. In general: see https://wiki.openstreetmap.org/wiki/Java_Runtime_Environment .

(18 Dec '17, 19:56) aseerel4c26 ♦
1

For Windows you should go to this link and click on the left "Download" under JRE (whatever that is). http://www.oracle.com/technetwork/java/javase/downloads/index.html

(18 Dec '17, 20:27) skfd

Will this only work by downloading the JAR and running it or can it be used when installing JOSM via a package manager/apt/ a ppa?

(01 Feb '18, 16:01) FredrikLindseth

@FredrikLindseth: I do not have ubuntu at hand (but am running Linux), but it also should work (theoretically it depends on what stuff the package builder did in addition to package the vanilla JOSM). The command mentioned on Help/HiDPISupport is a bash trick approach and requires you to run the jar directly (you would have to find out the path to the jar on your disk after package installation). Likely it will also work if you run the package's startup script for JOSM (likely named "josm") - just use GDK_SCALE=2 josm in a terminal window.

To run JOSM for example from your GUI the easiest way would be to set the environment variable GDK_SCALE=2 permanently, see Persistent_environment_variables. To check if it worked, open a terminal window and execute (without ") "echo $GDK_SCALE". It should return "2".

Please give feedback if and how it worked.

(01 Feb '18, 19:31) aseerel4c26 ♦

Yes! Thanks, skfd, simply downloading that and making sure you uninstall any previous versions of java does the trick!

(16 Aug '18, 04:48) brublanc

Windows 10 user: @skfd Can't see JRE 9, latest seems Java SE 8u212 where JRE is mentioned. Some help please. Windows fonts scaled at 150%, UHD display.

(15 Jul '19, 10:12) Plamen
showing 5 of 9 show 4 more comments

In linux, if JOSM installed normally you can prepend a scaling factor like this:

export GDK_SCALE=2 && josm

This will only scale JOSM for this run, but you can create an alias

alias josm='export GDK_SCALE=2 && josm'

To run it like this every time. You can also set the scale in your .profile (in your home-folder), by adding

export GDK_SCALE=2

anywhere in your .profile and restarting bash (or source .bashrc).

Running with the 'export_GDK_SCALE=2 && josm' will scale up JOSM, but not every other program you have, but when setting the GDK_SCALE in your .profile every program using this GTK-setting will scale.

permanent link

answered 16 Sep '18, 10:17

FredrikLindseth's gravatar image

FredrikLindseth
815132435
accept rate: 13%

-1

How do I do it with the Flatpak version installed?

Version 17833

Thanks

permanent link

answered 08 May '21, 07:03

Evo_Evz's gravatar image

Evo_Evz
10112
accept rate: 0%

flatpak override --user --env=GDK_SCALE=1.6 org.openstreetmap.josm

then run as normal

(11 May '21, 17:44) knix

Hey thanks but it didn't work. So what I did was run your command in a terminal then started JOSM from the menu. Then I rebooted to see if that would help. Then I added your command to the bottom of my .profile file in my home directory and saved it then started JOSM and that didn't work either. So I rebooted again. Then I installed all system updates and rebooted again. I am doing something wrong that you can see? Thanks for your help

(11 May '21, 18:23) Evo_Evz
2

Hmm.. Is there any difference with:

flatpak override --user --env=GDK_SCALE=2 org.openstreetmap.josm

(11 May '21, 18:28) knix

Oh wow a big difference! Maybe a bit too big but much better than too small as it was before. So no decimal places allowed?

(11 May '21, 18:32) Evo_Evz
1

Yes, It has to be integer, sorry my fault. https://developer.gnome.org/gtk3/stable/gtk-x11.html

(11 May '21, 18:36) knix

No worries it's way better. Thanks heaps for your help it's much appreciated. Legend.

(11 May '21, 18:40) Evo_Evz
showing 5 of 6 show 1 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×7
×3
×1
×1

question asked: 17 Dec '17, 16:03

question was seen: 5,697 times

last updated: 11 May '21, 18:40

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum