Ubuntu – New mouse cursor doesn’t appear in list sudo update-alternatives –config x-cursor-theme


I tried installing a new mouse cursor and put the unzipp/tarred file in the folder named ~/.icons.

I selected the theme with gnome-tweak-tool, but it won't change properly. The default cursor doesn't change, all the rest does though. I've tried this method (and many others now) of manually adding it through gksu gedit /usr/share/icons/default/index.theme. I've tried it with gnome-tweak-tool, with ubuntu tweak, with gconf-editor and even sudo update-alternatives --config x-cursor-theme, but when I try this method my mouse cursor doesn't even appear in the list. How can I add my new mouse cursor to this list?

Best Answer

I believe you have to move your theme to the /usr/share/icons directory for it to work.

Also you have to locate the index.theme (or any .theme file) of the theme you want to install and add it to update-alternatives using the --install option.

Let's take as example the theme ComixCursors-LH-White-Small ( a left-handed cursor theme from the package comixcursors-lefthanded Install comixcursors-lefthanded). Its index.theme file looks like

[Icon Theme]
Name = Comix Cursor LH White Small Bold
Comment = The left-handed Comix Cursors - White Small Bold
Example = default

but it should have an Inherits line equal to the directory in /usr/share/icons in which the theme is saved, otherwise it won't work. So add

Inherits = ComixCursors-LH-White-Small

Now tell update-alternatives about your new theme

sudo update-alternatives --install /usr/share/icons/default/index.theme x-cursor-theme /usr/share/icons/ComixCursors-LH-White-Small/index.theme 91

where you should change the second last parameter to the index.theme of your theme. If you did this correctly

sudo update-alternatives --config x-cursor-theme

should display your new theme, and after logging out and in, your new theme should be applied.