2

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:

program

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.

1

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:

| improve this answer | |
0

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

-Dglass.gtk.uiScale=2.0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.