Detailed guide to enable High-DPI-scaling on LXQt


I was googling for some time, but couldn’t find any detailed HOW-to enable High-DPI-scaling on a 2K-screen.

For that reason I’d be glad if you could give me a step-by-step guide, which I hope that others having the same problem also will be able to find.

(Pedram Pourang) #2

For Qt apps, set the environment variable QT_SCALE_FACTOR to 2 in Session Settings; don’t know about GTK apps.


That did the trick :slight_smile: Thank you

(Pedram Pourang) #4

For GTK apps, GDK_SCALE may work but GTK changes in a backward incompatible way.


is there any way to scale the openbox window-margins as well? And the mouse cursor?

I tried increasing the x-server-dpi, but that only resizes the fonts and some icons, but not all.

So I’d like to keep GDK_SCALE and QT_SCALE_FACTOR, and additionally change openbox :slight_smile:

(Pedram Pourang) #6

I tested GDK_SCALE and it worked with gtk3-widget-factory.

Programs like openbox are too old to support hdpi. I think that even kwin doesn’t support it but its icon and font sizes can be set separately; maybe you could do the same thing with openbox (sorry, I don’t have openbox).

(Pedram Pourang) #7

I don’t know how the cursor can be scaled. If you find a simple way, please tell me!

(Pedram Pourang) #8

I’ve never needed to change cursor size (doesn’t have a 4k screen) but the answer is here:

(Pedram Pourang) #9

OK, I’d forgotten Ignore Xresources; the EV XCURSOR_SIZE works like a charm.

@agaida Since we don’t have a GUI for HDPI yet, I think we should add the info on this page to a help doc. Actually, I think no GUI is needed because everything is about setting EVs in Session Settings; a simple Help button in Session Settings is enough.

(AndreaS) #10

My understanding is that technically Openbox does not require scaling. What needs to be scaled are widgets, fonts, icons etc… And indeed there are HiDPI themes etc.


Nice! The XCURSOR_SIZE needs to be set to how many times you want to have it bigger times 16, so if your QT_SCALE_FACTOR is 2, set it to 32.

Now I’ve got 99%, Thank you so much tsujan!!!

The only thing that is missing is the size of the window-frames, especially the icons used to maximise/minimise windows. They are still small. I managed to do a workaround by doubling the font-size in the openbox-settings for the active window-title, inactive window-title and so on. At least this makes the window-titles readable, but the icons stay small.

(Alf Gaida) #12

@tsujan - i really have no clue how to do it best. With my little screen all i have to do is

% cat .Xresources 
Xft.dpi: 120

and be done with. The fine thing about is that it works indipendent of the used framework and i see no downsides right now. even better - it should work with any WM too. So in the first step we should make the already available dpi setting working - and be done with it. Maybe a hint at this place how to set some environment things would be nice.

(Pedram Pourang) #13

@agaida The way you use your HDPI display is different from others (although it’s a valid use case with huge monitors): most HDPI users just need to set the above-mentioned EVs, namely, QT_SCALE_FACTOR (=2), GDK_SCALE (=2) and XCURSOR_SIZE (=48, for example).


The downside is that it only resizes the font. So for example if you open pcmanfm, the icons in the menu bar would stay small, while only the text is resized.

Using QT_SCALE_FACTOR and GDK_SCALE prevents this - they also resize the icons. It just seems like they don’t affect the openbox window-manager.

If both Xft.dpi and the scale-factors are set, most of the items will be twice as big as I want them to (as both the dpi-setting and the scale factors make them bigger).

(Pedram Pourang) #15

@agaida’s monitor is huge and he wants to use the available space without scaling icons and other things; a very special use case indeed.

(Alf Gaida) #16

Meh, the screen isn’t big, only 42,5" - and setting the dpi make all things proportional bigger or smaller - just an example, a normal 1920x1080 Window with Gnome, nothing scaled. With a “normal” screen it would be to big for me, not it is a little bit to small.

(Pedram Pourang) #17


Only after the long discussion we had elsewhere, I could understand how you wanted to use that “small” monitor.

(Alf Gaida) #18

in other words - to have the “normal” icon size i’m used to use the screen had to be 52" - downside, not available right now and if - my wife would probably kill me when i try to buy such beast and place it on my desktop :sunglasses:

(Pedram Pourang) #19

You have 48-px icons in LXQt Appearance. If your monitor wasn’t so big, you’d need QT_SCALE_FACTOR=2, which would result in 64-px icons there.

As I said above, I understand that but it isn’t what most HDPI users want.

BTW, how much time do I have to fix ? Will the next release be published soon? (Deja vu? Didn’t I asked a similar question before the previous release?)

(Alf Gaida) #20

Take your time - i want to roll it out as soon as possible - but it should be ready. This weekend i’m in Berlin, so i can probably do not that much, the week before Xmas would be fine i guess.

Edit: The “problem” i have with small HiDPI devices is that they are normally expensive. ( vs my current cheap notebook for tests (fullhd 17" with 1T SSD and 8G for approx. 500€). I’m not willing to pay that much for a device i use only for tests :smiley: - so i have no other usecase for HiDPI at all.

Downside: I can’t test things we talk about because no device :frowning: