Difference between revisions of "Cursor themes"

From ArchWiki
Jump to: navigation, search
(added pacman command lines, corrections)
(Add configuration instructions for Gnome 3.8)
(24 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:X Server (English)]]
+
[[Category:X Server]]
{{i18n|X11 Cursors}}
+
[[es:X11 Cursors]]
 
+
[[it:X11 Cursors]]
There are many cursor themes available for the X11 Windowing System besides the default black pointer.
+
[[ja:Cursor Themes]]
 +
[[pt:X11 Cursors]]
 +
[[ru:X11 Cursors]]
 +
[[zh-CN:X11 Cursors]]
 +
There are many cursor themes available besides the default black pointer.
 
This guide will instruct you on where to get them, installing them, and configuring them.
 
This guide will instruct you on where to get them, installing them, and configuring them.
  
Line 9: Line 13:
 
  ls /usr/share/icons/*
 
  ls /usr/share/icons/*
 
Search for directories with the cursors subdirectory.
 
Search for directories with the cursors subdirectory.
 +
find /usr/share/icons -type d -iname "*cursors*"
 +
 +
Also, check the official Arch repositories for cursor themes: [https://www.archlinux.org/packages/?sort=&q=xcursor-&maintainer=&last_update=&flagged=&limit=50 search "xcursor-"].
  
Also, check the official Arch repositories for cursor themes: [https://www.archlinux.org/packages/?sort=&q=xcursor-&maintainer=&last_update=&flagged=&limit=50 search "xcursor-"]. One particularly popular with many distributions theme is xcursor-vanilla-dmz (white) with it's black version xcursor-vanilla-dmz-aa. Use one or both of these commands to install them:
+
{{Note| The {{Pkg|xcursor-themes}} package comes with the 'redglass' and 'whiteglass' themes in {{ic|/usr/share/icons}}.}}
pacman -S xcursor-vanilla-dmz  #white
+
pacman -S xcursor-vanilla-dmz-aa  #black
+
{{Note| The {{Package Official|xcursor-themes}} package (installed by default with the {{Package Official|xorg}} group) already comes with the 'redglass' and 'whiteglass' themes in {{Filename|/usr/share/icons}}.}}
+
  
Some themes available through [http://aur.archlinux.org/packages.php?O=0&L=0&C=17&K=cursor&SeB=nd&SB=n&SO=a&PP=50&do_Search=Go AUR].
+
Some themes available through [https://aur.archlinux.org/packages.php?O=0&L=0&C=17&K=cursor&SeB=nd&SB=n&SO=a&PP=50&do_Search=Go AUR].
  
 
Here are links to where else you may download cursor:
 
Here are links to where else you may download cursor:
 
*[http://kde-look.org/index.php?xcontentmode=36 KDE Look]
 
*[http://kde-look.org/index.php?xcontentmode=36 KDE Look]
*[http://themes.freshmeat.net/browse/982/ Freshmeat]
 
 
*[http://www.customize.org/list/xcursors Customize.org]
 
*[http://www.customize.org/list/xcursors Customize.org]
  
 
==Installing Mouse Cursor Themes==
 
==Installing Mouse Cursor Themes==
This manual installation method is only required if you're not using pacman to install themes like described above.
+
This manual installation method is only required if you are not using pacman to install themes like described above.
  
 
'''Extract the cursor theme package:'''
 
'''Extract the cursor theme package:'''
Line 63: Line 66:
 
'''Create links to missing cursors:'''
 
'''Create links to missing cursors:'''
  
Applications may keep using the default X11 cursors when a theme lacks some cursors.  If you experience this, it can be corrected by adding links to the missing cursors.  For example:
+
Applications may keep using the default cursors when a theme lacks some cursors.  If you experience this, it can be corrected by adding links to the missing cursors.  For example:
  
 
  $ cd ~/.icons/foobar/cursors/
 
  $ cd ~/.icons/foobar/cursors/
Line 80: Line 83:
 
  $ ln -s left_ptr_watch 08e8e1c95fe2fc01f976f1e063a24ccd
 
  $ ln -s left_ptr_watch 08e8e1c95fe2fc01f976f1e063a24ccd
  
If the above links do not resolve the problem, look in {{Filename|/usr/share/icons/whiteglass/cursors}} for additional cursors your theme may be missing, and create links for them as well.
+
If the above links do not resolve the problem, look in {{ic|/usr/share/icons/whiteglass/cursors}} for additional cursors your theme may be missing, and create links for them as well.
  
== Choosing and Configuring Cursor Themes ==
+
== Note on Cursor Themes not Working with Awesome Window Manager ==
  
If you use some desktop environment like Gnome, you can use it's GUIs to choose cursor themes.
+
Xcursor does not work correctly with Awesome Window Manager. You may notice all of the themed cursors work except the default cursor.
  
To locally name a cursor theme, add to your {{Filename|~/.Xresources}}:
+
For more information see this link http://awesome.naquadah.org/wiki/FAQ#How_to_change_the_cursor_theme.3F
  
Xcursor.theme: foobar
+
== Choosing and Configuring Cursor Themes ==
  
To have the cursor theme properly loaded it will need to be called by your window manager. If it does not, you can force it to load prior your window manager by putting the following command in {{Filename|~/.xinitrc}} or [[.xprofile]] (depending on your setup):
+
If you use some desktop environment like Gnome, you can use its GUIs to choose cursor themes.
  
xrdb ~/.Xresources &
+
=== Using the XDG Icon Theme Specification ===
  
Refer to your window manager documentation for details.
+
{{Note|This method will also set both the [[X11]] and [[Wayland]] cursor theme.}}
  
Alternatively, you can create a symlink "default" in {{Filename|~/.icons}}, which points to your installed cursor theme:
+
You can create a symlink "default" in {{ic|~/.icons}}, which points to your installed cursor theme:
  
 
  $ ln -s /usr/share/icons/foobar/ ~/.icons/default
 
  $ ln -s /usr/share/icons/foobar/ ~/.icons/default
  
If you rather want to change the cursor globally (e.g. used by graphical login managers like kdm, gdm, ...), or if you experience problems with above method (for example in Firefox), create the {{Filename|/usr/share/icons/default/}} directory '''(only if needed)''':
+
If you rather want to change the cursor globally (e.g. used by graphical login managers like kdm, gdm, ...), or if you experience problems with above method (for example in Firefox), create the {{ic|/usr/share/icons/default/}} directory '''(only if needed)''':
  
 
  # mkdir -p /usr/share/icons/default  '''(only if needed)'''
 
  # mkdir -p /usr/share/icons/default  '''(only if needed)'''
  
Edit or create the {{Filename|/usr/share/icons/default/index.theme}} file and add the following:
+
Edit or create the {{ic|/usr/share/icons/default/index.theme}} file and add the following:
  
  [icon theme]  
+
[icon theme]  
 
  Inherits=foobar
 
  Inherits=foobar
  
Or if you have/want your cursor themes in {{Filename|~/.icons}} only. Create the {{Filename|~/.icons/default/}} directory:
+
Or if you have/want your cursor themes in {{ic|~/.icons}} only. Create the {{ic|~/.icons/default/}} directory:
  
 
  $ mkdir -p ~/.icons/default
 
  $ mkdir -p ~/.icons/default
  
And create the {{Filename|~/.icons/default/index.theme}} file with the same contents as above {{Filename|/usr/share/icons/default/index.theme}}.
+
And create the {{ic|~/.icons/default/index.theme}} file with the same contents as above {{ic|/usr/share/icons/default/index.theme}}.
  
You can optionally add this line to {{Filename|~/Xresources}} if your cursor theme supports multiple sizes:
+
=== With Gnome 3.8 ===
 +
 
 +
To change the cursor theme with Gnome 3.8, run the following command:
 +
 
 +
gsettings set org.gnome.desktop.interface cursor-theme foobar
 +
 
 +
Or alternatively, use the dconf-editor to change the given key manually to the name of the theme.
 +
 
 +
That will change the theme of the user, but not the one used in GDM. To change the cursor theme in the greeter create the file {{ic|/etc/dconf/db/gdm.d/10-cursor-settings}} with content:
 +
 
 +
[org/gnome/desktop/interface]
 +
cursor-theme='foobar'
 +
 
 +
And run as root the following command:
 +
 
 +
dconf update
 +
 
 +
=== Using X resources ===
 +
 
 +
To locally name a cursor theme, add to your {{ic|~/.Xresources}}:
 +
 
 +
Xcursor.theme: foobar
 +
 
 +
To have the cursor theme properly loaded it will need to be called by your window manager. If it does not, you can force it to load prior your window manager by putting the following command in {{ic|~/.xinitrc}} or [[.xprofile]] (depending on your setup):
 +
 
 +
xrdb ~/.Xresources &
 +
 
 +
You can optionally add this line to {{ic|~/.Xresources}} if your cursor theme supports multiple sizes:
 
  Xcursor.size:  16      !  32, 48 or 64 may also be good values
 
  Xcursor.size:  16      !  32, 48 or 64 may also be good values
  
 
If you do not know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.
 
If you do not know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.
 +
 +
Refer to your window manager documentation for details.
  
 
== More information ==
 
== More information ==
 
For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:
 
For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:
 
  $ man Xcursor
 
  $ man Xcursor
 
{{Note| If the animations are flickering on your nvidia card, add the following line to your {{Filename|/etc/X11/xorg.conf}} file, into the nvidia device section, to fix it:}}
 
Option "HWCursor" "off"
 

Revision as of 19:52, 23 April 2013

There are many cursor themes available besides the default black pointer. This guide will instruct you on where to get them, installing them, and configuring them.

Getting Mouse Cursor Themes

First, check which themes you already have installed:

ls /usr/share/icons/*

Search for directories with the cursors subdirectory.

find /usr/share/icons -type d -iname "*cursors*"

Also, check the official Arch repositories for cursor themes: search "xcursor-".

Note: The xcursor-themes package comes with the 'redglass' and 'whiteglass' themes in /usr/share/icons.

Some themes available through AUR.

Here are links to where else you may download cursor:

Installing Mouse Cursor Themes

This manual installation method is only required if you are not using pacman to install themes like described above.

Extract the cursor theme package:

$ tar -zxvf foobar-cursor-theme-package-foo.tar.gz

or

$ tar -jxvf foobar-cursor-theme-package-foo.tar.bz2

Make a directory for the cursor theme:

Example: FooBar-AweSoMe-Cursors-v2.98beta

User-specific installation:

$ mkdir -p ~/.icons/foobar/cursors

System-wide installation:

# mkdir -p /usr/share/icons/foobar/cursors
Note: To simplify the name of the theme, the name being used is 'foobar' instead of 'FooBar-AweSoMe-Cursors-v2.98beta' when creating the dir(s) above.

Copy cursor files into the appropriate directory:

User-specific installation:

$ cp -a FooBar-AweSoMe-Cursors-v2.98beta/cursors/* ~/.icons/foobar/cursors/

System-wide installation:

# cp -a FooBar-AweSoMe-Cursors-v2.98beta/cursors/* /usr/share/icons/foobar/cursors/

If the package includes index.theme file check if there is an "Inherits" line inside. If yes, check whether the inherited theme also exists under this name in your system (rename if needed).

Copy index.theme file into the appropriate directory:

User-specific installation:

$ cp -a FooBar-AweSoMe-Cursors-v2.98beta/index.theme ~/.icons/foobar/index.theme

System-wide installation:

# cp -a FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme

If the package does not have index.theme or if it does not include an "Inherits" line, you do not have to copy this file.

Create links to missing cursors:

Applications may keep using the default cursors when a theme lacks some cursors. If you experience this, it can be corrected by adding links to the missing cursors. For example:

$ cd ~/.icons/foobar/cursors/
$ ln -s right_ptr arrow
$ ln -s cross crosshair
$ ln -s right_ptr draft_large
$ ln -s right_ptr draft_small
$ ln -s cross plus
$ ln -s left_ptr top_left_arrow
$ ln -s cross tcross
$ ln -s hand hand1
$ ln -s hand hand2
$ ln -s left_side left_tee
$ ln -s left_ptr ul_angle
$ ln -s left_ptr ur_angle
$ ln -s left_ptr_watch 08e8e1c95fe2fc01f976f1e063a24ccd

If the above links do not resolve the problem, look in /usr/share/icons/whiteglass/cursors for additional cursors your theme may be missing, and create links for them as well.

Note on Cursor Themes not Working with Awesome Window Manager

Xcursor does not work correctly with Awesome Window Manager. You may notice all of the themed cursors work except the default cursor.

For more information see this link http://awesome.naquadah.org/wiki/FAQ#How_to_change_the_cursor_theme.3F

Choosing and Configuring Cursor Themes

If you use some desktop environment like Gnome, you can use its GUIs to choose cursor themes.

Using the XDG Icon Theme Specification

Note: This method will also set both the X11 and Wayland cursor theme.

You can create a symlink "default" in ~/.icons, which points to your installed cursor theme:

$ ln -s /usr/share/icons/foobar/ ~/.icons/default

If you rather want to change the cursor globally (e.g. used by graphical login managers like kdm, gdm, ...), or if you experience problems with above method (for example in Firefox), create the /usr/share/icons/default/ directory (only if needed):

# mkdir -p /usr/share/icons/default  (only if needed)

Edit or create the /usr/share/icons/default/index.theme file and add the following:

[icon theme] 
Inherits=foobar

Or if you have/want your cursor themes in ~/.icons only. Create the ~/.icons/default/ directory:

$ mkdir -p ~/.icons/default

And create the ~/.icons/default/index.theme file with the same contents as above /usr/share/icons/default/index.theme.

With Gnome 3.8

To change the cursor theme with Gnome 3.8, run the following command:

gsettings set org.gnome.desktop.interface cursor-theme foobar

Or alternatively, use the dconf-editor to change the given key manually to the name of the theme.

That will change the theme of the user, but not the one used in GDM. To change the cursor theme in the greeter create the file /etc/dconf/db/gdm.d/10-cursor-settings with content:

[org/gnome/desktop/interface]
cursor-theme='foobar'

And run as root the following command:

dconf update

Using X resources

To locally name a cursor theme, add to your ~/.Xresources:

Xcursor.theme: foobar

To have the cursor theme properly loaded it will need to be called by your window manager. If it does not, you can force it to load prior your window manager by putting the following command in ~/.xinitrc or .xprofile (depending on your setup):

xrdb ~/.Xresources &

You can optionally add this line to ~/.Xresources if your cursor theme supports multiple sizes:

Xcursor.size:  16       !  32, 48 or 64 may also be good values

If you do not know about supported cursor sizes just start X without this setting and let it choose the cursor size automatically.

Refer to your window manager documentation for details.

More information

For more information about cursors in X (supported directories, formats, compatibility, etc.) refer to the man page:

$ man Xcursor