Xaprb

Stay curious!

How to install beautiful X11 cursors

with 13 comments

X11 comes with unattractive mouse cursors, but it’s trivial to replace them with other themes. In this article I’ll explain how to install mouse cursors system-wide or for a single user, and give you links to my favorite cursor themes.

Nicely crafted mouse cursors are very important for usability, in my opinion. I need my mouse cursors to be unobtrusive, yet really easy to see. They need to be easy to find without peering at the screen or waving the mouse wildly, and easy to use precisely on every kind of background. Smooth, beautiful cursors are a definite plus.

Themes are supported in XFree86 4.3 or newer. All versions of xorg, the successor to XFree86, support themes. I hope you’re using xorg by this time.

Available mouse cursor themes

Many themes are available — a great site to look for them is KDE look. In my opinion, and this is only my opinion, most cursor themes are something only a mother could love. I don’t even like the “high-quality” cursors packaged specifically for Gentoo.

Then again, maybe I’m not like most folks. I like very minimal and functional things with as little clutter as possible. When I look at screenshots of other people’s desktops cluttered with a million windows and root-tail displays, transparent terminals and a huge gkrellm window along the side displaying system load, all I can think of is attention deficit disorder. I like XFCE with nothing but a taskbar showing, or Fluxbox, or even Ratpoison. Heck, I’m happy with just a terminal and a screen session. But, that’s just me.

I digress — back to beautiful cursors. I think the neutral cursor theme is very nice, but I like the Red Hat 9 cursors even better. The I-beam is thinner, the default arrow has a single-pixel black tip when in front of a white background for precision, and the busy cursor is less distracting. On the plus side, both themes are very straightforward and plain, yet highly attractive and usable.

If you like the looks of these but prefer colorful cursors, the jaguarx cursor theme is very similar, but has color added. And if you want to mix and match cursors from different themes, well, they’re just files — make your own! It’s really easy.

These themes are licensed under the GPL, so I’m free to redistribute them, a liberty I’m happy to take. I’ve provided links below for your convenience:

  1. Neutral cursor theme
  2. Another (older?) version of the neutral cursor theme
  3. Red Hat 9 cursor theme
  4. Jaguarx cursor theme

Installation options

There are three basic ways to install the themes:

  1. System-wide
  2. System-wide in the local directory
  3. For one user only

System-wide installations place the cursors in subdirectories of /usr/share/cursors/xorg-x11. System-wide in the local directory means placing them in /usr/local/share/cursors/xorg-x11. The difference is /usr/share/ installations will get cleaned out by installation and package management systems, so unless you install them through your distribution’s package management system, you may lose them when upgrading X11. /usr/local/share installations won’t get wiped out when upgrading your system.

Single-user installations require no access to system directories, so a non-root user can alter his or her own theme easily, and even take it from computer to computer. In this case, the themes are placed in subdirectories in ~/.icons/.

User-specific settings override local settings, which override system-wide settings.

Installing the theme

To install a theme, download the theme and unpack it. You should have a directory structure like the following:

  • theme_name
    • index.theme
    • cursors
      • cursor files…

Move the entire theme_name directory to the installation destination: /usr/share/cursors/xorg-x11/, /usr/local/share/cursors/xorg-x11/, or ~/.icons/.

In Gentoo, you can install packages from Portage as usual: emerge blueglass-xcursors.

Choosing a default theme

There’s a concept of a default theme. The default theme is located in the default/ subdirectory of wherever you’ve installed your theme. This is how the system decides which theme to use — it uses the “default” theme. It reads the index.theme file and looks at it.

If you installed your theme system-wide or system-wide local, you need to edit the /usr/share/cursors/xorg-x11/default/index.theme or the /usr/local/share/cursors/xorg-x11/default/index.theme file. Specify the default theme should inherit from the theme you want to use. For example, here is the default X11 theme if you haven’t specified anything else:

[Icon Theme]
Inherits=core

That file tells X11 to use the core cursor theme — the one built right into X11 itself. If you want to use the neutral theme instead, edit the file thusly:

[Icon Theme]
Inherits=neutral

If you installed the theme in your ~/.icons/ directory, you can do several different things:

  • Rename the theme directory from theme_directory to default.
  • Leave your themes in their original directories, and make a default directory and create in it a single file called index.theme with the contents as shown just above.
  • Leave your themes in their original directories, and make a symlink named default to the theme directory. For instance, ln -sfnT ~/.icons/redhat9cursors/ ~/.icons/default.

I like the last option, because it never leaves me in doubt about which theme I’m really using.

Update: in Ubuntu Hardy Heron, open System/Preferences/Appearance and click “Customize…” then select the Pointer tab. Select your preferred cursor set here. The list will include cursors installed under ~/.icons/

Written by Xaprb

April 24th, 2006 at 10:37 pm

Posted in Desktop

13 Responses to 'How to install beautiful X11 cursors'

Subscribe to comments with RSS or TrackBack to 'How to install beautiful X11 cursors'.

  1. Excellent text ;)

    Beket

    30 Apr 06 at 3:09 pm

  2. Great article! I’m just getting started with GNU/Linux and I couldn’t find nowhere any detailed description of how the cursor-themes works.

    Thanks :)

    Soul Hunter

    27 Aug 06 at 3:25 pm

  3. GREAT!! Thanks for the Howto!!! It worked for me!

    Archlinux 0.8 Voodoo + Fluxbox
    P4 @ 2.26GHz — 512MB RAM

    josesito

    23 Mar 07 at 2:08 pm

  4. in ubuntu i think its /usr/share/icons but it could just be my system

    imadoofus123

    6 May 07 at 1:03 pm

  5. It’s a nice instruction, but I’d like to know whether anything like this could be done on Solaris 10 with Java Desktop System (their default cursors, though they are minimalistic as I like, are not particularly nice). I’m not a very experienced UNIX/Linux user, but I’ve noticed that various Linux distributions use different directories for their themes from the ones that are used on Solaris. As I can see, the default cursors (something that resembles them, anyway :-) ) are kept in /usr/share/gnome/cursor-fonts folder and I’ve seen no way to tell the system that I want some more cursors to be installed (placing them in ~/.themes/ThemeName/cursors folder does nothing. Personally I like Bluecurve cursor icons (Fedora Core 4 default theme), and I already have them, but it seems that the system cannot understand their format (the files that are in /usr/share/gnome/cursor-fonts have .PCF extension, while the Fedora files have no extension at all). Is there a way to circumvent all these problems or am I just dreaming to? :-)

    LittleAlex

    29 May 07 at 4:44 am

  6. This info seems to be a bit outdated. I’m using Blag, a Fedora Core 6 derivative from the UK, and the paths are not corrent.

    Here I explain how I fixed it…

    http://geekgaucho.blogspot.com/2007/07/red-mouse-pointer-in-linux-really.html

    Fernando Cassia

    22 Jul 07 at 11:39 pm

  7. This is one nice tutorial. Thanks!

    But how can I change the default X’s cross cursor to an arrow?
    I mean when I start X, then the cursor is a cross, a big fat X. I want it to be a standard arrow…

    Felix

    24 Oct 07 at 9:34 pm

  8. I know what you mean, but I don’t know how to change that.

    Xaprb

    24 Oct 07 at 10:15 pm

  9. Thank you so much! I’m using coLinux and I couldn’t get the cursors to change using the Control Panel. It asked me to restart the computer and that did appear to select the cursor theme as default in the Control Panel, but it didn’t actually do anything. Creating a simple link using Konqueror located at /usr/share/icons named default that pointed to the theme did the job immediately, at least for all newly started applications. Does X11 have a way to update the cursors of applications that are already running?

    Anonymous Coward

    15 Nov 07 at 1:55 pm

  10. Oh my gosh! This worked without a hitch! This is a great howto, thanks!

    Robert

    12 Jan 08 at 12:24 am

  11. Great article! I’m just getting started with GNU/Linux and I couldn’t find nowhere any detailed description of how the cursor-themes works.

    Thanks :)

    camper

    26 Oct 08 at 3:29 pm

  12. To change the annoying root cursor (the one one that looks like an ‘X’) to the default cursor do the following steps under Debian and derivate distributions:

    1. Install a nice cursor package: apt-get install crystalcursors
    2. Set default cursor theme: update-alternatives –config x-cursor-theme
    3. Put ‘xsetroot -cursor top_left_arrow’ in some window manager startup script (.ratpoisonrc, startup, rc.xml, etc.)

    Jo

    14 Dec 08 at 8:41 am

  13. The right command to change the cursor from cross to arrow is ‘xsetroot -cursor_name top_left_arrow’

    Sebastián Benítez

    19 Nov 09 at 6:40 pm

Leave a Reply