Rofi, Cursor scaling on HiDPI screen

Hello. I’ve followed the good tips here: Ten tweaks for EOS i3 wm on lenovo with high dpi - #2 by ricklinux but remain stuck on a few things not scaling on my 3840x2160 screen. So far I have followed all the tips outlined there but remain with a minuscule cursor and rofi being way too small. That also includes the power options menu. I’m wondering if it has something to do with the mouse being “context-aware” of what application I’m on (as a weird note, the mouse goes to a larger size when hovering over the Flameshot dock icon, but is small when hovering over terminal/Firefox/etc.). I’m just hoping someone has ran into this or can provide any ideas.

This is a fancy way of saying: It does whatever It thinks is best for you.

But using i3, archlinux, etc. suggests you want to control what’s going on yourself.
I don’t know if you intentionally bought this really smart mouse, but you have to find a way to communicate with it, or just accept its decisions for what is best for you. :joy:

If I have misunderstood your issue, please, provide more details, so you may get a better advice. :wink:


1 Like

Hi! Welcome to the forum :rocket: :enos_flag:

There are quite a few things you can do depending on your setup. The simplest one I am aware of is to add following to your ~/.Xresources file

Xcursor.size: 32

You will however need a cursor theme that supports large cursor icon.

Edit: Are you using a multi monitor setup by any chance?

1 Like

Did you?

Thank you for the warm welcome everyone!
I will add some more information. I just installed this yesterday and it’s virtually untouched since then.

Here’s the problem in picture form: Pics
My ~/.Xresources:
My bashrc:
Those are pretty much the only things I’ve touched. I am using the “Capitaine Cursors - White” according to the “Look and Feel” menu.
The cursor behavior: video

I am on a Dell Precision 5510, one monitor @flyingcakes.

@Elloquin I’m not using a multi monitor setup, is that part of the guide relevant for me?

Not a stranger to setting things up myself on Linux but this is one issue where I follow the advice online but get no results :frowning:
Thanks for any help!


Ohhh… the cursor is now a good size when hovering over the desktop/other apps (aside from Firefox which is weird). Awesome! However I guess there’s something different for the text select? It switches its size back to the tiny version when hovering over text (terminal, text editor). Video
And rofi appears to still be very small. Hmm.

Any thoughts?

Test in terminal

rofi -show drun -dpi 1

Would you mind specifying the specific apps or issues that relate to dpi? It may be a common issue.

Oh jeez, that -dpi 1 solved the rofi issue. My utmost thanks! You guys have helped me out a ton already.
I don’t have much installed right now but the ones I see are Firefox, Brave, xfce-terminal, and Discord.
Pictures (first 2 are xfce-terminal and the power menu, which I believe I can fix the power menu by just doing that -dpi 1 option somewhere?): 1 2 3

Video of Brave behavior: Video

Check for a script in $HOME/.config/rofi/ ( Find the rofi command and add the parameter, following the same format method.
You can do the same wherever rofi is used (polybar script or other).

For GTK3 apps, try changing the values in .bashrc for these:

export GDK_SCALE=2  # this is an integer, 1 or 2 etc
export GDK_DPI_SCALE=0.5  # start from this, use other decimal, 0.8 1.0 etc

Yep, adding that rofi parameter worked like a charm.

As for the GTK3 apps, I’ve changed that (see here) but to no effect. I have tried increasing the decimals as well but nothing appears to change. Hmm. I wish I remember what I did for my pure Arch install to normalize everything but I totally forgot :man_facepalming:

Yes, it is complicated and I try to make up a failproof method for my bspwm desktop.

Add those settings in /.profile and ~/.xprofile and test env vars on login, in a GTK terminal (Gnome Terminal?).

Well, creating the ~/.xprofile seemed to help, as I am getting a regular size cursor in a few apps now, but not all of them yet. In terms of GTK Apps, it would appear that it’s ‘somewhat’ working in a few apps i.e. regular sized pointer but tiny text selector (Transmission, Thunar, Gnome-Terminal) but in others it’s no difference (Firefox which appears to use GTK, gThumbs). Another video of the behavior

We seem to be running out of options :frowning_face: I wonder if there is some way to just hardcode the cursor icon to the size I want and delete anything smaller. Nuclear option.
& Sorry, what do you mean by test the env vars?

Hey I came up with the ten tweaks, @ricklinux just copied a line from my post! :face_with_raised_eyebrow:

Anyways, welcome to eos, no hard feelings :rofl:

1 Like

Nice wish :laughing:
I struggle with such issues on my Bspwm setup.
Different toolkits (gtk, qt) cannot be unified and controlled from one place (today) without a unifying tool. I try to experiment and study on this to possibly create such utility.
For now, using the same themes and values in the different settings can produce the desired effect, depending on your DE of course.
LXappearance, Qt5ct, profile, xprofile, Xresources and maybe some others, are the different places to set the same values.
env vars (environment variables) play significant role and checking their values after modifications may help understand what’s working as intended.

echo $LC_LANG

etc, for vars that you change, to get active value.
For Firefox and other apps, you have to read wikis, manuals and fora to see workarounds.

I just mentioned that one entry because i tried that tweak on my HP originally when trying i3 but i ended up using KDE and set the global size like it’s set on Windows. Most of these HiDpi laptops with Windows come set at 150% which is a bit larger than i want anyway so i set it at 125% both on Windows and KDE and it’s the same. On i3 your tweak is what i would have to use for sure because it doesn’t have these global settings. The OP made an error listing the link as mine. Honest mistake on their part.

I guess the major challenge with high dpi is to get all the gtk and qt apps, icons and fonts to scale the same. That’s when I change the .Xresources. Even for DE like KDE or gnome, while they generally scale well their apps built on their framework, others may still need these tweaks.

For wm, the ten tweaks generally work, but I don’t recall what I did with the mouse cursor, it’s true that on firefox or qt apps or others there were some problems. I believe I might have used qt5ct for qt apps but not sure anymore.

1 Like

copyright :stuck_out_tongue_winking_eye:

1 Like