KDE wrong cursor theme in application "nomachine"

I am having trouble with the mouse cursor changing theme when hovering the GUI for the application “nomachine” (a remote desktop client, installed from AUR). It looks like it is reverting to the Adwaita theme cursor, and also a very small size. So when I move the cursor in and out from the “nomachine” window on the desktop, the cursor keeps shifting theme and size. I wonder if there is any way to fix this awkward behavior?

This is the “nomachine” app info in pamac (just for reference):

This is the “nomachine” GUI and with the cursor inside the app window (the wrong themed cursor):

This is the “nomachine” GUI and with the cursor on the window caption (the correct themed cursor):

My system:
Operating System: Manjaro Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.6-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

1 Like

That’s a GTK application. Check the file ~/.config/gtk-3.0/settings.ini. It will contain a line for your cursor. Make sure it is set to the same cursor theme as you use for Plasma and KDE applications.

For instance, on my system here, it’s… :arrow_down:

[Settings]
gtk-application-prefer-dark-theme=true
gtk-button-images=true
gtk-cursor-theme-name=Oxygen 01 Yellow                 <======
gtk-cursor-theme-size=24                               <======
gtk-decoration-layout=close,minimize,maximize:
gtk-enable-animations=true
gtk-fallback-icon-theme=hicolor
gtk-font-name=Noto Sans,  10
gtk-icon-theme-name=WhiteSur
gtk-menu-images=true
gtk-modules=colorreload-gtk-module:appmenu-gtk-module
gtk-primary-button-warps-slider=false
gtk-shell-shows-menubar=1
gtk-theme-name=Gradient-black-325
gtk-toolbar-style=3

It looks like this:

[Settings]
gtk-application-prefer-dark-theme=false
gtk-button-images=true
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=close,minimize,maximize:icon
gtk-enable-animations=true
gtk-fallback-icon-theme=Adwaita
gtk-font-name=Noto Sans, 10
gtk-icon-theme-name=breeze
gtk-menu-images=true
gtk-modules=window-decorations-gtk-module:colorreload-gtk-module:appmenu-gtk-module
gtk-primary-button-warps-slider=false
gtk-shell-shows-menubar=1
gtk-theme-name=gnome-professional-solid-40.1
gtk-toolbar-style=3

I tried to change it like this:

gtk-cursor-theme-name=xcursor-breeze

But the file reverts back by itself to what it was after I have saved it (and logging out and in). Anyway, it didn’t change anything. Also, I have other GTK-apps installed (e.g. gedit). There is no problem with the cursor theme in there.

Try clearing out your cache directory. Log out of Plasma completely, hit Ctrl+Alt+F3 at the graphical login screen, then log in at the character mode console, and issue the following command… :arrow_down:

rm -rf ~/.cache/*

Press Ctrl+D to log out, and Alt+F1 to return to the graphical login screen. Log in again and see if it makes any difference.

:man_shrugging:

You could also try setting the icon theme for the entire system in
/usr/share/icons/default/index.theme
I have found that occasionally my cursor reverts to adwaita when hovering over the Plasma desktop and some applications if not set there. I had to create the file manually on some of my systems. For example, my index.theme simply contains:

[Icon Theme]
Inherits=Oxygen_Zion

and this has fixed similar behaviour for me.

1 Like

Made no difference.

Already checked that. It has the correct setting.

:thinking: Nothing new here…

Strange behavior. If I go into the KDE System Settings, and change the cursor theme to some other theme (no mater what, just some other theme). Then it is OK with the nomachine GUI. But if I log out and log in again, then the problem is back (also with other cursor themes).

This behavior also repeats if I close and restart nomachine. So, something with the cursor theme is resetting that not respects the KDE theme setting when launching nomachine.

Also, when looking closely to the nomachine cursor it appears to be the theme “KDE Classic” cursor theme (not the “Adwaita” theme).

Tried this, to force icon theme in nomachine:
$ XCURSOR_THEME=Oxygen_White /usr/NX/bin/nxplayer
Did not make any difference.