You are not logged in.

#1 2016-05-27 00:22:30

Salkay
Member
Registered: 2014-05-22
Posts: 618

[SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

This was reported four years ago and was fixed, but seems to have regressed again. Firefox doesn't respect my mouse cursor theme, instead reverting to the default (Adwaita). My theme works fine in other applications. After Firefox is open, I can specifically reset the cursor theme in KDE Plasma 5's system settings, and Firefox temporarily respects the new setting. However, as soon as I restart Firefox, it's back to the default.

I tried several workarounds, which all failed. (I didn't revert each step before trying the next.)

1. The cursor theme was already set in the system settings, but I tried following the instructions here for good measure, by creating `~/.icons/default/index.theme`, linking my theme to `~/.icons/default/cursors` and restarting.
2. I tried modifying `/usr/share/icons/default` to point to my custom theme instead of Adwaita, then restarting.
3. I also tried changing the cursor theme in the system settings to "default" instead of my custom name.

Up-to-date Arch
KDE Plasma 5.6.4-1

Last edited by Salkay (2016-06-04 00:39:13)

Offline

#2 2016-05-27 06:16:11

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,093

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

What is XCURSOR_THEME set to?

Offline

#3 2016-05-27 10:47:30

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

I'm using this theme, and XCURSOR_THEME is set to 'DOT'.

I'm actually not sure what it should be. The theme (installed via Plasma's "Get New Theme…") is at `~/.icons/DOT`. However, `~/.icons/DOT/cursor.theme` says

[Icon Theme]
Inherits=TheDOT 0.2

In any case, I also tried launching Firefox with

XCURSOR_THEME='TheDOT 0.2' firefox

and this also failed.

Offline

#4 2016-06-03 18:21:41

NumLOCK
Member
Registered: 2016-06-03
Posts: 4

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

Hi Salkay,

I registered to this forum just to respond here ;-)

For Firefox, after creating the usual symlink named "default" in the ~/default/ directory, make sure that you have the following in ~/.config/gtk-3.0/settings.ini in the [Settings] section:

gtk-cursor-theme-name=default

Adding this line resolved the problem for me - and I'm also using KDE Plasma, so hopefully it'll resolve the issue for you too!

Offline

#5 2016-06-04 00:38:45

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

NumLOCK wrote:

I registered to this forum just to respond here ;-)

Thank you so much! I really appreciate it!

NumLOCK wrote:

For Firefox, after creating the usual symlink named "default" in the ~/default/ directory, make sure that you have the following in ~/.config/gtk-3.0/settings.ini in the [Settings] section:

gtk-cursor-theme-name=default

Excellent! Thank you! FWIW I found I could reduce this to ever fewer steps.

1. As per your advice, I tried creating "default" as per my first post (and the wiki), then modified `~/.config/gtk-3.0/settings.ini`. This worked.
2. I tried removing "default", and changing `gtk-cursor-theme-name=DOT`. This worked. I needed `DOT` and not `TheDOT 0.2`, i.e. the name/inherits of the theme is not important, it's the string from the path that is needed, i.e. `~/.icons/DOT`.
3. I took a guess based on arojas's post. Since XCURSOR_THEME was also set to `DOT`, I tried just deleting the entire `gtk-cursor-theme-name` line. This also worked!

I guess that `~/.config/gtk-3.0/settings.ini` is overwriting our custom mouse themes. By deleting that line, GTK applications inherit XCURSOR_THEME instead. Thank you both very much for your help!

Offline

#6 2016-06-04 10:56:28

NumLOCK
Member
Registered: 2016-06-03
Posts: 4

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

Hi Salkay,

My pleasure. Glad to have helped! I've been annoyed by this issue for a couple months myself, until I found a solution.

Thank you for the additional research. Here's the minimal configuration I came up with, for Adwaita cursor in size 64:

• [Automatic by KDE] XCURSOR_THEME=Adwaita
• [Automatic by KDE] XCURSOR_SIZE=64
• [Symlink] ~/.icons   --->  /usr/share/cursors/xorg-x11/ 
• [Still required for Firefox] gtk-cursor-theme-name=Adwaita   in ~/.config/gtk-3.0/settings.ini

As you can see, the symlink is improved so it should work with any cursor theme. NOTE: the symlink target is for gentoo linux, your mileage may vary.
For me the last item is still required, as Firefox correctly detects the cursor size but *not* the theme name.
Of course, there's nothing in ~/.gtkrc-2.0 anymore.

Last edited by NumLOCK (2016-06-04 10:59:11)

Offline

#7 2016-06-04 11:49:40

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

So in your case, what happens if you totally remove the line `gtk-cursor-theme-name=Adwaita` in `~/.config/gtk-3.0/settings.ini`? As per my previous post, I think it just reverts to the KDE "default" as defined by XCURSOR_THEME… but perhaps not for you?

Also, as far as the symlink goes, I'm surprised that your user can't simply source the system cursors. However, in Arch, these are at `/usr/share/icons` instead, which seems more consistent with the user's `~/.icons`. So perhaps this differs in Gentoo, and the user cannot access these because they are in an odd location.

Offline

#8 2016-06-04 20:58:51

NumLOCK
Member
Registered: 2016-06-03
Posts: 4

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

Salkay wrote:

So in your case, what happens if you totally remove the line `gtk-cursor-theme-name=Adwaita` in `~/.config/gtk-3.0/settings.ini`? As per my previous post, I think it just reverts to the KDE "default" as defined by XCURSOR_THEME… but perhaps not for you?

No way - I just tripled-check it: as soon as I remove that line (then kill firefox and relaunch it), firefox will ignore my cursor theme choice, no matter what I have as XCURSOR_THEME, in ~/.Xdefaults, in everything that I tried. This seems to be firefox-specific, though.

As to why it only happens for me - well, maybe our firefox builds are different in this regard? For example I built my firefox 46.0 without the "force-gtk2" option (it's called a "USE flag" in gentoo), so it's using gtk3 - which explains why I had to tweak the gtk3 settings.ini.    Maybe your firefox build uses gtk2, which sidesteps this issue?

Salkay wrote:

Also, as far as the symlink goes, I'm surprised that your user can't simply source the system cursors. However, in Arch, these are at `/usr/share/icons` instead, which seems more consistent with the user's `~/.icons`. So perhaps this differs in Gentoo, and the user cannot access these because they are in an odd location.

Yeah, maybe there's something unusual in Gentoo. I haven't found any info on this yet.

Offline

#9 2016-06-04 21:38:39

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

NumLOCK wrote:

Maybe your firefox build uses gtk2, which sidesteps this issue?

My Firefox is still being affected by changes in `~/.config/gtk-3.0/settings.ini` (although responding differently to yours), so I'd say it's still gtk3. Yeah, I'm not sure why the differences then… Anyway, thanks again for your registration and all your comments!

Offline

#10 2016-06-04 21:40:18

NumLOCK
Member
Registered: 2016-06-03
Posts: 4

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

Salkay wrote:
NumLOCK wrote:

Maybe your firefox build uses gtk2, which sidesteps this issue?

My Firefox is still being affected by changes in `~/.config/gtk-3.0/settings.ini` (although responding differently to yours), so I'd say it's still gtk3. Yeah, I'm not sure why the differences then… Anyway, thanks again for your registration and all your comments!

You're very welcome! Cheers :-)

Offline

#11 2016-10-08 06:38:24

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [SOLVED] Firefox doesn't respect mouse cursor theme; uses the default

For some reason, ~/.config/gtk-3.0/settings.ini reverted itself, and I had to apply this fix (i.e. deleting the `gtk-cursor-theme-name` line from `~/.config/gtk-3.0/settings.ini`).

This fixed Firefox again. However, Thunderbird is not respecting my cursor theme for some reason.

#UPDATE
Again, ~/.config/gtk-3.0/settings.ini reverted itself, by restoring the following line again.

gtk-cursor-theme-name=Adwaita

This time, instead of removing it, I'm attempting to hardcode it to my chosen cursor theme. Hopefully this prevents again future modifications.

gtk-cursor-theme-name=DOT

I also found the settings file to modify for Thunderbird. It's at ~/.gtkrc-2.0 . I could achieve a similar fix in Thunderbird by changing the relevant line to

gtk-cursor-theme-name="DOT"

Last edited by Salkay (2016-11-21 02:26:18)

Offline

Board footer

Powered by FluxBB