18

I'm on Ubuntu 15.10 and recently switched to Gnome. It's great but the mouse cursors in Chrome are always different.

I'm using google-chrome from the official repo:

$ more /etc/apt/sources.list.d/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

In gnome-tweak-tool I have the cursors set to Adwaita. When I run sudo update-alternatives --config x-cursor-theme I also have Adwaita set:

$ sudo update-alternatives --config x-cursor-theme
There are 7 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
  0            /usr/share/icons/DMZ-White/cursor.theme   100       auto mode
  1            /etc/X11/cursors/core.theme               30        manual mode
  2            /etc/X11/cursors/handhelds.theme          20        manual mode
  3            /etc/X11/cursors/redglass.theme           20        manual mode
  4            /etc/X11/cursors/whiteglass.theme         20        manual mode
* 5            /usr/share/icons/Adwaita/cursor.theme     90        manual mode
  6            /usr/share/icons/DMZ-Black/cursor.theme   30        manual mode
  7            /usr/share/icons/DMZ-White/cursor.theme   100       manual mode

Press <enter> to keep the current choice[*], or type selection number:

This works fine for all applications except Chrome, which displays white cursors (I think it's DMZ-White).

My /usr/share/icons/default/index.theme contains this:

[Icon Theme]
Inherits=Adwaita

The weird thing is that if I use gnome-tweak settings and configure the x-cursor theme to use DMZ-White, Chrome starts using Adwaita!

Ideally I'd like to use DMZ-White, but it would be fine as long as it's consistent between Gnome and Chrome.

I have a feeling it's something to do with the "Priority" in the x-cursor-theme.

I don't mind work-arounds, I'd really just like to get the cursors consistent! Thanks in advance.

5 Answers 5

15

Edit the text file /usr/share/icons/default/index.theme.

Replace its contents with the .theme of the cursor you want.

In this case, your cursor of choice is /usr/share/icons/Adwaita/cursor.theme.

Therefore, replace the contents of /usr/share/icons/default/index.theme with those of /usr/share/icons/Adwaita/cursor.theme.

Restart Chrome.

5
  • Thanks! My /usr/share/icons/default/index.theme already has the contents on /usr/share/icons/Adwaita/cursor.theme, and the cursor is still different. Any ideas?
    – david_nash
    Mar 22, 2016 at 6:01
  • @david_nash Then you can try raising the priority by supplying it as an argument to update-alternatives
    – user423626
    Mar 22, 2016 at 7:31
  • Could you clarify that? I looked at the man page for update-alternatives but couldn't see anything about priority - is it in some other documentation?
    – david_nash
    Mar 23, 2016 at 19:08
  • 1
    sudo update-alternatives --config x-cursor-theme <priority number>
    – user423626
    Mar 24, 2016 at 8:56
  • Instead of messing with /usr/share/icons folder, simply put the content of the cursors theme into ~/.local/share/icons/default then kill all chrome instances and relaunch it.
    – Ikbel
    Jan 14, 2019 at 4:02
2

To add to UniversallyUniqueID's answer, I want to point out that Chrome often leaves threads running in the background when you close it. I edited /usr/share/icons/default/index.theme, then closed & reopened Chrome and got some real wackiness where some of its cursors changed but the pointer stayed the same. It wasn't until I did a

ps -eaf | grep chrome

in a terminal that I saw that part of it was still running. Did a

pkill chrome

then relaunched Chrome, and all was good.

2

Try the following: https://wiki.archlinux.org/index.php/Cursor_themes#XDG_specification

You should then edit ~/.config/gtk-3.0/settings.ini, replacing the cursor_theme_name with the chosen one:

~/.config/gtk-3.0/settings.ini

[Settings]
gtk-cursor-theme-name=cursor_theme_name

In my experience, this configuration change fixed the cursor theme in Chromium-based browsers to the one specified.

1

When you have chromium installed as a snap package, that might be the issue

bug report

At the time of writing, this bug isn't fixed yet. Workaround is to replace the snap by a regular package:

  • First make sure you are logged into an account so that your settings are synced and can be restored later
  • In Ubuntu 18.04's software center, remove Chromium (snap package) and and install Chromium web browser (regular package)
  • Launch the browser and log in to your account to restore bookmarks etc.
1

I too had the same problem. The following steps worked for me

  1. Kill all Google Chrome windows.
  2. Relaunch Google Chrome.

After doing this, the correct set of cursors were displayed in Google Chrome.

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .