======== Updates ========
– v1.1 The installation steps are modified
Before starting this tutorial, thanks the txt guide from sole and the video guide from MrGondol90. It is my first time to create a xcursor theme and these guides helped me a lot.
1) Config files
Suppose that we’ve already finished our design of cursors and saved them as .PNG files, then we need config files to hold their information such as size, frames, etc.
The format of a config file looks like this:
As a result, for a single-frame cursor:
and for a multi-frame cursor:
I felt that 300 is good for a cursor that has 2 frames, but you may need a lower value of the refresh rate if your cursor has more frames. After creating config files for your image files, let’s move to the next step.
2) xcursorgen
We need to create xcursor files using our config files.
The command line for generating xcursor files looks like this:
Example:
“arrow” is just one cursor in the xcursor list. For a list of reference, run this (take DMZ-White as an example):
and here is the result:
Since there are lots of files, I recommend using shell scripts to generate xcursor files.
Notice that some cursor files have a hash name, like 9081237383d90e509aa00f00170e968f.
This is because that some programs may have their custom cursors.
In order to let our cursor theme work in these programs, we also need to create xcursor files for them.
For example:
9081237383d90e509aa00f00170e968f has the same function as move, so we use the same config file on both of them.
For more information, this site might be helpful:
https://wiki.archlinux.org/index.php/Cursor_themes#Troubleshooting
3) index.theme
In the main folder of our theme, create a file named index.theme.
The folder structure should look like this:
Inside index.theme, add following lines:
4) Testing
To test that if the cursor theme works, use this site:
http://elektronotdienst-nuernberg.de/bugs/cursor.html
5) Install
Notes: Some tweak tools such as GNOME Tweaks might be useful.
Install GNOME Tweaks either from command line or Ubuntu Software
Copy the whole folder of our theme in ~/.icons. If there is no such a folder, we could create one using mkdir or install another theme using apt-get.
[Optional(?)] For user-specific configuration, put the index.theme in ~/.icons/default/; for system-wide configuration, put the index.theme in /usr/share/icons/default/.
Log out and re-login, and the theme could be seen in GNOME Tweaks.