Cursor themes

From Gentoo Wiki
Jump to:navigation Jump to:search

This article provides instructions for cursor theme management on an X11-based system.



Before installing any new packages, check to see what cursors are available on the system. Cursors can be found beneath the /usr/share/cursors/ directory.

x11-themes/xcursor-themes comes with the whiteglass and the redglass themes:

root #emerge --ask x11-themes/xcursor-themes

Additional software

Other packages with some Gentoo themed cursors is available as well.

x11-themes/gentoo-xcursors comes with gentoo, gentoo-blue, and gentoo-silver cursor themes:

root #emerge --ask x11-themes/gentoo-xcursors

To install all of the cursor themes available from Portage:

root #emerge --ask x11-themes/blueglass-xcursors x11-themes/chameleon-xcursors x11-themes/comix-xcursors x11-themes/gentoo-xcursors x11-themes/golden-xcursors x11-themes/haematite-xcursors x11-themes/neutral-xcursors x11-themes/obsidian-xcursors x11-themes/pearlgrey-xcursors x11-themes/silver-xcursors x11-themes/vanilla-dmz-aa-xcursors x11-themes/vanilla-dmz-xcursors x11-themes/xcursor-themes


Edit the user's ~/.Xresources file:

FILE ~/.XresourcesChoose a cursor theme
Xcursor.theme: redglass

Cursor size can be optionally chosen as well:

FILE ~/.XresourcesChoose the cursor size
Xcursor.size: 16


Cursor theme is not loaded at all

For window managers it might be necessary to load the cursor theme before starting the window manager using xrdb via ~/.xinitrc:

FILE ~/.xinitrc
xrdb -merge ~/.Xresources
eval $(dbus-launch --sh-syntax --exit-with-session <window_manager>)

Restart X to apply the changes:

user $pkill X
user $startx

Cursor keeps going back to default X cursors

In some desktop environments the mouse theme can change when hovering outside of a window. Inside the window the mouse cursor respects the user's choice. But outside the window the mouse cursor changes into the default X cursor.

Create the symlink to the user's home path:

user $ln -s /usr/share/cursors/xorg-x11 ~/.icons

GTK 2 and GTK 3

With some GTK applications the mouse cursor changes to default settings when it is inside the GTK application window. Users can fix this problem by setting the gtk-theme-name and gtk-cursor-theme-name variables in the ~/.config/gtk-3.0/settings.ini and ~/.gtkrc-2.0 configuration files. In the examples below the gentoo cursor theme has been chosen.

For GTK 3 applications:

FILE ~/.config/gtk-3.0/settings.ini
gtk-theme-name = gentoo
gtk-icon-theme-name = gnome
gtk-cursor-theme-name = gentoo
gtk-cursor-theme-size = 16

For GTK 2 applications:

FILE ~/.gtkrc-2.0
gtk-theme-name = gentoo
gtk-icon-theme-name = gnome
gtk-cursor-theme-name = gentoo

See also

External resources