Difference between revisions of "Cursor themes"

From ArchWiki
Jump to: navigation, search
(Configuring Cursor Themes)
Line 22: Line 22:
 
*[http://www.customize.org/list/xcursors Customize.org]
 
*[http://www.customize.org/list/xcursors Customize.org]
 
Also, 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]
 
Also, 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]
 
+
{{Note |That X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.}}
 
==Installing Mouse Cursor Themes==
 
==Installing Mouse Cursor Themes==
* '''Extract the cursor theme package:'''
+
'''Extract the cursor theme package:'''
  $ tar -zxvf foobar-cursor-theme-package-foo.tar.gz
+
  tar -zxvf foobar-cursor-theme-package-foo.tar.gz
 
or
 
or
  $ tar -jxvf foobar-cursor-theme-package-foo.tar.bz2
+
  tar -jxvf foobar-cursor-theme-package-foo.tar.bz2
* '''Make a directory for the cursor theme:'''
+
'''Make a directory for the cursor theme:'''
Example: ~FooBar-~AweSoMe-Cursors-v2.98beta
+
 
 +
''Example:'' FooBar-AweSoMe-Cursors-v2.98beta
  
 
Per-user installation:
 
Per-user installation:
  $ mkdir -p ~/.icons/foobar/cursors
+
  mkdir -p ~/.icons/foobar/cursors
  
 
System-wide installation:
 
System-wide installation:
 
  # mkdir -p /usr/share/icons/foobar/cursors
 
  # mkdir -p /usr/share/icons/foobar/cursors
  
Be sure to simplify the name of the theme ('foobar' instead of '~FooBar-~AweSoMe-Cursors-v2.98beta')
+
{{Tip|To simplify the name of the theme, we are using 'foobar' instead of 'FooBar-AweSoMe-Cursors-v2.98beta' when creating the dir(s) above.}}
  
* '''Copy cursor files into the appropriate directory:'''
+
'''Copy cursor files into the appropriate directory:'''
  # cp -R FooBar-AweSoMe-Cursors-v2.98beta/cursors/* /usr/share/icons/foobar/cursors/
+
 
 +
Per-user 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).
 
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).
  
Note that X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.
+
'''Copy index.theme file into the appropriate directory:'''
  
Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [http://www.kde-look.org/content/show.php?content=5265 3Dcursors project at KDE-Look] to fix this.
+
Per-user installation:
 +
cp -a FooBar-AweSoMe-Cursors-v2.98beta/index.theme ~/.icons/foobar/index.theme
  
* '''Copy index.theme file into directory:'''
+
System-wide installation:
  # cp -R FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme
+
  # cp -a FooBar-AweSoMe-Cursors-v2.98beta/index.theme /usr/share/icons/foobar/index.theme
  
 
If the package doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.
 
If the package doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.
 +
 +
{{Note|Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [[http://www.kde-look.org/content/show.php?content=5265 3Dcursors project at KDE-Look]] to fix this.}}
  
 
== Configuring Cursor Themes ==
 
== Configuring Cursor Themes ==
To locally change a cursor theme, add this line to your ~/.Xdefaults:
+
To locally change a cursor theme, add this line to your <code>~/.Xdefaults</code>:
 
  Xcursor.theme: foobar
 
  Xcursor.theme: foobar
  
Make sure the file ~/.Xdefaults is called by your window manager. You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from .xinitrc if you use startx). Refer to your window manager documentation for details.
+
{{Note |Make sure the file ~/.Xdefaults is called by your window manager. You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from ~/.xinitrc if you use startx). Refer to your window manager documentation for details.}}
  
Alternatively, you can create a symlink "default" in ~/.icons, which should points to your installed cursor theme:
+
Alternatively, you can create a symlink "default" in <code>~/.icons</code>, which should 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 /usr/share/icons/default/ directory (only if needed), create the /usr/share/icons/default/index.theme file and add the following:
+
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 <code>/usr/share/icons/default/</code> directory '''(only if needed)''':
  
  # mkdir /usr/share/icons/default  *only if needed
+
  # mkdir -p /usr/share/icons/default  '''(only if needed)'''
  
# editor /usr/share/icons/default/index.theme
+
Edit or create the <code>/usr/share/icons/default/index.theme</code> file and add the following:
  
[icon theme]  
+
  [icon theme]  
 
  Inherits=foobar
 
  Inherits=foobar
  
Or if you have your cursor themes in ~/.icons only. Create the ~/.icons/default/ directory and create the ~/.icons/default/index.theme file with the same contents as above:
+
Or if you have/want your cursor themes in ~/.icons only. Create the <code>~/.icons/default/</code> directory:
  
  mkdir ~/.icons/default
+
  mkdir -p ~/.icons/default
  
editor ~/.icons/default/index.theme
+
And create the <code>~/.icons/default/index.theme</code> file with the same contents as above <code>/usr/share/icons/default/index.theme</code>.
  
*editor = your favorite text editor, for example vim, nano, emacs, etc...
 
  
You can optionally add this line to ~/.Xdefaults if your cursor theme supports multiple sizes:
+
You can optionally add this line to <code>~/.Xdefaults</code> if your cursor theme supports multiple sizes:
 
  Xcursor.size:  32      #  32, 48 or 64 are probably good values
 
  Xcursor.size:  32      #  32, 48 or 64 are probably good values
  
Line 88: Line 96:
 
  man Xcursor
 
  man Xcursor
  
'''Note:''' if the animations are flickering on your nvidia card, add the following line to your xorg.conf file, into the nvidia device section, to fix it:
+
{{Note |if the animations are flickering on your nvidia card, add the following line to your /etc/X11/xorg.conf file, into the nvidia device section, to fix it:}}
 
  Option "HWCursor" "off"
 
  Option "HWCursor" "off"
  

Revision as of 00:56, 5 November 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Introduction

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

Getting Mouse Cursor Themes

Here are links to where you may download cursor:

Also, some themes available through AUR

Note: That X already comes with the 'redglass' and 'whiteglass' themes in /usr/X11R6/lib/icons or /usr/share/icons.

Installing Mouse Cursor Themes

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

Per-user installation:

mkdir -p ~/.icons/foobar/cursors

System-wide installation:

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

Copy cursor files into the appropriate directory:

Per-user 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:

Per-user 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 doesn't have index.theme or if it doesn't include an "Inherits" line you don't have to copy this file.

Note: Some applications keep using the default X11 cursor when a themed version of left_ptr_watch and the like should be shown. Have a look at the symlinks in the changelog belonging to the [3Dcursors project at KDE-Look] to fix this.

Configuring Cursor Themes

To locally change a cursor theme, add this line to your ~/.Xdefaults:

Xcursor.theme: foobar
Note: Make sure the file ~/.Xdefaults is called by your window manager. You can force it to get loaded by running xrdb ~/.Xdefaults before loading your window manager (for example from ~/.xinitrc if you use startx). Refer to your window manager documentation for details.

Alternatively, you can create a symlink "default" in ~/.icons, which should 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.


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

Xcursor.size:  32       #  32, 48 or 64 are probably good values

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

More information

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

man Xcursor
Note: if the animations are flickering on your nvidia card, add the following line to your /etc/X11/xorg.conf file, into the nvidia device section, to fix it:
Option "HWCursor" "off"

Enjoy!

WikiMigration--dlanor 13:33, 23 Jul 2005 (EDT)