I am using Ubuntu 18.10 and I am creating a javaFX application. I have used a lot of time to research google and found no way at all to make my program scale on linux. Here is how it looks like:


I have tried different things like adding Dprism.allowhidpi=true in VM options and adding System.setProperty("prism.allowhidpi", "true"); at the start of my program which is nothing but a simple window. What could I do?

I am using openJDK 11 and openJFX 11

I have seen some people saying that you can launch the jar file with some scaling commands, the problem here is that I am coding, it's inside intellij, it's not a jar file.

2 Answers 2


The problem seems to be that javafx is looking for something which GNOME is no longer setting/not in all cases. A quick fix is:

gsettings set org.gnome.desktop.interface scaling-factor 2 (replace 2 with the actual scaling factor you want) and reset with

gsettings reset org.gnome.desktop.interface scaling-factor

Others discussing the same problem:


You might use following VM parameter specified when starting your Application. In Intellij Idea this can be done in the Run/Debug configuration:


PS: It is known the DPI recognition on Linux is crap/not working on all the different Linux flavors/environments.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .