ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.21k stars 174 forks source link

Steam not using default mouse theme #825

Open Majkl578 opened 11 years ago

Majkl578 commented 11 years ago

On Gnome Shell 3.6, I have Adwaita as my default mouse theme. All applications obey the preference and use it, but Steam does not. When I start steam from console, I see:

(steam:9400): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

This is a follow-up of #600, which has been (thankfully) fixed.

System info

Majkl578 commented 11 years ago

I installed gnome-themes-standard:i386 which contains /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/theming-engines/libadwaita.so. This fixed the warning, but not the problem with the theme used by Steam.

ghost commented 11 years ago

It looks like Steam is using the cursor theme from /usr/share/icons/default/index.theme You can change it by running update-alternatives --config x-cursor-theme as root.

Majkl578 commented 11 years ago

Unfortunately, on my Debian system, I don't have /usr/share/icons/default/index.theme file at all. Also there is no x-cursor-theme alternative.

weirddan455 commented 10 years ago

Try setting the environment variable XCURSOR_THEME to the desired cursor. All of your cursors should have folders in /usr/share/icons/ (although some of those folders contain only icons and no cursors.) If it's a cursor it should have a sub-directory called cursors under it. For example, if you want to use Adwaita, the directory /usr/share/icons/Adwaita/cursors should exist (else it's probably not installed) and then you need to set XCURSOR_THEME=Adwaita Note that this location is possibly different on some distributions but it seems to be common for most people.

To fix this, you first need to verify the variable is incorrectly set. From a console run "echo $XCURSOR_THEME" If it returns a blank line, it's not set at all. Then for a quick test, you can simply set the variable on the same command as you launch Steam (either via a console or by editing the desktop shortcut) for example "XCURSOR_THEME=Adwaita steam" This will set the variable only for one execution and only for Steam (will not affect other applications.)

If that works, you should probably set the variable permanently to prevent future issue with other applications (it will also allow you to remove the "XCURSOR_THEME=Adwaita" from Steam's launcher if you set it.) The best place to do so depends on your distribution but /etc/profile is common to set environment variables globally and ~/.profile is common if you want to set it only for the local user (~ means the user's home folder in Linux speak.) You will then probably need to either logout or reboot for the change to take effect.

This is the standard way to tell any X application which cursor to use. The problem is that some DEs aren't setting XCURSOR_THEME correctly (notably it seems GNOME is at fault here.) As a KDE user, I never ran into this problem as I verified that KDE correctly sets XCURSOR_THEME in the /usr/bin/startkde script. This problem also seems to be affecting Google Chrome (bug report: https://code.google.com/p/chromium/issues/detail?id=356228) so Steam isn't really at fault here. (In fact, a bug report has been filed for GNOME here: https://bugzilla.gnome.org/show_bug.cgi?id=711703) The way the X protocol works is that every application controls which cursor to use. Your other applications are likely getting the cursor settings either through a GTK theme or by looking at wherever non-standard location GNOME puts its cursor configuration (likely in dconf.)

In any case, not all applications will look in those locations but every X application I've tested will respect XCURSOR_THEME. Specifically, Google Chrome only ran into this issue when it switched from GTK to its own Aura toolkit and Steam, while it uses GTK, doesn't use the standard, themeable GTK window decorations since Valve hard coded it to look the same everywhere. Therefore, neither application has a reason to dig through your GTK themes to try to find the GNOME's cursor settings.

ghost commented 9 years ago

GNOME uses XSettings[1] for this. Enviorment variabels are not viable for setting these kinds of things (If I understand this correctly): https://bugzilla.gnome.org/show_bug.cgi?id=711703

[1] http://www.freedesktop.org/wiki/Specifications/xsettings-spec/

zeus86 commented 1 year ago

steam on linux still does use the systems' cursor instead of the users' one in 2023.... Just experienced this right now on linux mint 21, only noticed it, because the default cursor changed in Mint 21.1 ... However, setting a new cursor-theme for the whole system as @ghost suggests, fixes the problem.