41

How can I change X11 cursor and theme in the newest Ubuntu? I can't find it. Please help.

AzkerM
  • 10,270
  • 6
  • 32
  • 51
Jacob
  • 411
  • Related: https://askubuntu.com/questions/966997/mouse-pointer-changes-color-in-firefox-and-chrome-and-libre-office-apps/966998#966998 – Elder Geek Oct 21 '17 at 00:39

10 Answers10

41

In order to get your custom cursor to work with all applications do:

  1. Download a cursor theme.

  2. Open Gnome Tweak Tool and change the cursor theme.

  3. Open a Terminal.

  4. Run this command:

    sudo update-alternatives --config x-cursor-theme
    
  5. Select the number corresponding to your choice

  6. Log out.

  7. Log back in.

Kulfy
  • 17,696
suli8
  • 2,975
  • 1
    The part 4 is really important! Because the icon theme will change between applications – Brallan Aguilar Nov 21 '11 at 07:45
  • 1
    Yep, step 4 is needed, or else you'll only see the cursor theme used in certain places, such as Firefox. A big +1 from me because this was also driving me nuts in 12.04. Note that this will change the cursor for every user and on the login screen, however. – Knowledge Cube Oct 08 '12 at 05:20
  • You can use unity tweak tool instead of gnome tweak tool. – Akronix Dec 06 '14 at 16:49
  • 2
    Trying this, I only still see it in firefox. I even tried a full restart and compiz --replace – Jonathan Apr 05 '15 at 19:22
  • I get the same result, the cursor is only changed inside the firefox, not the whole system. When I go to the desktop or navigate to the menu items, it still shows the old(default) cursor. – ollydbg23 Dec 29 '15 at 03:26
  • BTW: I'm using the 14.04 LTS Ubuntu. – ollydbg23 Dec 29 '15 at 03:42
  • I think some extra steps is need to manually edit the index.theme, see JohnMerlino's answer, and it works fine in my system(Ubuntu 14.04 LTS). – ollydbg23 Dec 29 '15 at 03:51
  • Does this also change the cursor theme at the lightdm greeter screen? Doesn't seem to be the case on my machine – wa4557 Dec 29 '15 at 09:06
  • sudo update-alternatives --config x-cursor-theme update-alternatives: error: cannot stat file '/etc/alternatives/x-cursor-theme': Too many levels of symbolic links – Aaron Franke Dec 15 '16 at 21:48
  • You can also change the cursor size by adding it to the end of your Xresources file: Xcursor.theme: whiteglass (newline) Xcursor.size: 20 Xresources didn't load by default, I had to load it from my .xinitrc file using xrdb -load ~/.Xresources – VikingGlen Feb 10 '19 at 06:22
10

Maybe its too late for reply, but i faced a problem using this in 12.04. If you download a Cursor theme and extract it to /usr/share/icons/, make sure change its permission to 755:

chmod -R 755 cursors/

and change the Cursor theme in /usr/share/icons/default/index.theme to your theme.

then apply instruction described by suli8

Nevercom
  • 317
  • 4
  • 10
  • 1
    You, Sir, have found the missing point! I've literally tried every dirty trick in the book to get my favorite cursor theme working (been using it since 11.10). Never had to struggle this much, but your solution did the trick. Thank you! – FuzzyQ May 16 '13 at 10:29
  • Still works with Lightdm on 20.04. – mchid Sep 27 '23 at 01:20
10

It is quite easy to change the cursor in Unity.

  1. Open a Terminal.
  2. Type in these commands:

    sudo apt-get install gnome-tweak-tool
    sudo apt-get install oxygen-cursor-theme
    sudo apt-get install oxygen-cursor-theme-extra
    
  3. Select a new cursor theme from the Tweak Tool.

  4. Run this command:

    sudo update-alternatives --config x-cursor-theme
    
  5. Press Alt+F2, type this then press Enter:

    compiz --replace
    

(Alternatively reboot if compiz --replace doesn't work)

kiri
  • 28,246
  • 16
  • 81
  • 118
owl
  • 4,951
  • 1
    I'm not sure if I'd call that quite easy, involving buttons like alt-f2 and multiple steps. But, I also have the issue many are having where the cursor only shows correctyl in firefox. – Jonathan Apr 05 '15 at 19:32
  • sudo update-alternatives --config x-cursor-theme update-alternatives: error: cannot stat file '/etc/alternatives/x-cursor-theme': Too many levels of symbolic links – Aaron Franke Dec 15 '16 at 21:50
8

The easiest way to do that is to use the gnome-tweak-tool Install gnome-tweak-tool. It is in the Software Center. But due to some dependencies it will install gnome-shell in addition.

When you've installed gnome-tweak-tool, seek for this via dash as "Advanced Settings" With this you can change to your desired themes and perhaps x11-cursor. But for me the alternative x11-cursor themes are working only for applications like LibreOffice or Firefox.

In addition in System Settings you can find the entry "Appearance" where you can choose the official Ambiance and Radiance theme and HighContrast and HighContrastInverse and if installed Adwaita. This is only a little theme changer. The way more powerful gnome-tweak-tool lets you select all the other gtk3-themes, icons, fonts, cursors, gnome-shell-themes and extensions and the behavior of nautilus handling the desktop.

4

What I did:

  1. Installed cursor theme to /usr/share/icons
  2. Edited /usr/share/icons/default/index.theme and set Inherits=MyThemeName
  3. Used Unity Tweak Tool to set a new cursor theme
  4. Rebooted, don't know why :)

Works for me.

Eric Carvalho
  • 54,385
Kons
  • 193
4

After struggling for 2 years to get themes to work across all windows and applications on 12.04, the following is what I had to do:

  • Download theme from internet
  • Extract it into /usr/share/icons
  • Then I changed the permissions of the theme:

    chmod 777 ComixCursors-White-Small 
    

    // or

    chmod uqo+wrx ComixCursors-White-Small
    
  • Download Gnome Tweak Tool from Software Center

  • Launch it, go to theme and select your theme e.g. ComixCursors-White-Small
  • then as sudo user open the index.theme file:

    sudo vim /usr/share/icons/default/index.theme
    
  • Then change the contents accordingly:

    [Icon Theme]
    Inherits=ComixCursors-White-Small
    
  • Then reboot the system:

    sudo reboot
    

And once system reboots, the theme will take effect.

user.dz
  • 48,105
JohnMerlino
  • 7,309
  • This works OK in my system: Ubuntu 14.04 LTS, so if you need to change the cursor for all the windows and applications, you have to edit the index.theme file manually. Great! – ollydbg23 Dec 29 '15 at 03:50
  • This worked AWESOME in my desktop env: XFCE4 with UBUNTU 20.0, changing index.theme with chmod 777 YourCursorLocation is the best idea. Thanks man!!! – Bishwas Bhandari Oct 25 '20 at 03:02
  • Also ensure you use icons that will loads, e.g.: https://www.gnome-look.org/p/1701595 – Daniel Viglione Feb 10 '22 at 03:46
3

(I think when I read it first I thought you meant in and X11 desktop, like Lubuntu. Sorry if it doesn't help. I don't see how to delete.)

There is 2 ways I have found to do this in Lubuntu. Find a desired curser theme, and hopefully it will give you the terminal command, like sudo apt-get install oxygen-cursor-theme oxygen-cursor-theme-extra. Then go to the menu, to Preferences > Customize Look and Feel and it will be installed. Then you select and apply and you have it.

The other is go to Gnome Look or a site similar and they have a X11 Mouse Cursor section. Just find one you like, download the tar.bz2 file. The go back to where you select your cursor and click install, navigate to where you downloaded it to and then install it. For me, I don't know if it is a bug, the way it is designed or if I'm doing something thing wrong but the program closes after I install it. I just re-open it and select the newly installed cursor and it will be.

Eliah Kagan
  • 117,780
lqlarry
  • 696
2

gnome-tweak-tool can help with this.

Kris Harper
  • 13,477
Samik
  • 2,660
1

The easiest, quickest, and cleanest way to change the cursor to black theme is like this, I think:

gsettings set org.gnome.desktop.interface cursor-theme 'DMZ-Black'

sudo update-alternatives --set x-cursor-theme /usr/share/icons/DMZ-Black/cursor.theme

You can list your available themes with update-alternatives --list x-cursor-theme and replace in the above as you see fit.

On a side note: The comic cursor theme exists as a package, e.g. apt install comixcursors-righthanded.

1

After change cursor.theme file of your theme (I use the theme OpenZone_Black)

[Icon Theme] Inherits=OpenZone_Black    

Sometimes you need install you theme so that you can choose it in alternative x-cursor-theme:

  1. record your theme

    CURSOR=OpenZone_Black
    
  2. add to alternative x-cursor-theme:

    sudo update-alternatives --install /usr/share/icons/default/index.theme x-cursor-theme /usr/share/icons/$CURSOR/cursor.theme 20
    

Then change theme use the following command:

 sudo update-alternatives --config x-cursor-theme
VincentBel
  • 111
  • 2