Ubuntu – Mouse pointer size inconsistent

12.04mouseresizethemes

Since installing Ubuntu 12.04, I've been having a problem with the mouse pointer size. On the desktop, it is quite a bit larger than it should be (24), though the different cursors (editing text, hyperlink hand, etc) are correct. The size changes to the correct size when the pointer is over some application windows (GVim, Netbeans, Firefox), but then changes back once it is moved out of the window.

There was a similar question here, but the Xdefaults solution did not work for me, and I didn't want to try the one requiring editing the icon image. In addition, I've tried changing the cursor theme using

sudo update-alternatives --config x-cursor-theme

as well as using the dconf-editor, but though I can change the theme, the size issue remains.

In case it's relevant, I'm running on a dual-screen setup with monitor sizes of 2560×1600 and 1920×1080, using the NVidia video driver. Is there another way to control pointer size, or a setting that might be messing it up?

EDIT: These are the values/options I have for update-alternatives and in dconf-editor. I'm now wondering if Netbeans and Firefox are making the mouse pointer smaller than it should be, but I'm not sure how big 24 should be…

update-alternatives:

  Selection    Path                                     Priority   Status
------------------------------------------------------------
  0            /usr/share/icons/DMZ-White/cursor.theme   90        auto mode
  1            /etc/X11/cursors/core.theme               30        manual mode
  2            /etc/X11/cursors/handhelds.theme          20        manual mode
  3            /etc/X11/cursors/redglass.theme           20        manual mode
  4            /etc/X11/cursors/whiteglass.theme         20        manual mode
* 5            /usr/share/icons/DMZ-Black/cursor.theme   30        manual mode
  6            /usr/share/icons/DMZ-White/cursor.theme   90        manual mode

dconf-editor:

I can't post the image since I'm a new user but the cursor-size is set to 24 and the cursor-theme is DMZ-Black.

Best Answer

This is actually a bug, however, there is a known solution.

First, edit your /etc/X11/Xresources/x11-common file:

sudo nano /etc/X11/Xresources/x11-common

Now, add this to or edit the file to include the following:

Xcursor.size: 22
Xcursor.theme: DMZ-Black

Known sizes are 8, 16, 22, 24, 32

Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit nano.

Log out and then log back in or restart your xsession to apply the changes.

Personally, I use Adwaita instead of DMZ-Black. Adwaita is a quite similar black cursor but has a different spinning icon for when the system is busy.

You can install it:

sudo apt-get install adwaita-icon-theme-full

Then, set the file like so:

Xcursor.size: 22
Xcursor.theme: Adwaita

source: bugs.launchpad.net


See this related answer for how to change the cursor size on certain applications.