Ubuntu XFCE – Fix Huge Cursor on High Resolution Monitor

cursorUbuntuxfce

So I have a 4k display, and for some reason Ubuntu decides that it's a good idea to give me a huge cursor instead of something normal. I don't have any DPI settings on the 4k monitor, and I don't want any, so why is the cursor so huge? This is how it looks like:

This is on Ubuntu 15.04 with XFCE4 with Nvidia drivers.

It only looks like that when the mouse is over system-dependant things (or something in that nature), such as the desktop, window titles, menu bar (File, Edit, View, …) and context menus.

In Firefox it seems to work just fine, except in the bookmarks dropdown.

What I've already tried:

  • Running update-alternatives to force the cursor theme. This changes the cursor theme, but it doesn't change the cursor size.
  • Modify the cursor size in dconf-editor. This doesn't do anything.
  • Put Xcursor.size: 24 in ~/.Xdefaults. This also doesn't appear to do anything.

xrdb -query returns the following:

*customization: -color
Xft.dpi:    96
Xft.hintstyle:  hintnone
Xft.rgba:   none
Xcursor.theme:  DMZ-Black
Xcursor.size:   24
Xcursor.theme_core: 1

Best Answer

I ended up solving it myself (kind of). It's not the ultimate way, but it's a workaround that I can live with myself.

Essentially, I took the original sources of the DMZ-Cursors package and created a fork of DMZ-Black, then I removed the 32x32 and 42x42 images, and am now using that as my cursor set.

For convenience sake, I've put up my version of DMZ-Black on Github: https://github.com/codecat/dmzblack-96dpi

If you wish to do the same with DMZ-White, simply download the sources here, copy DMZ-White, and remove all lines mentioning 32x32 and 42x42 in the *.in files. You can also remove the folders for those images if you want. Then simply run make.sh and copy the generated cursor files (in ../xcursors) to your cursors folder. (You can take my install script and change_cursor.sh as an example.)

Related Question