ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

Steam tray menu not using gtk theme #4428

Open ghost opened 8 years ago

ghost commented 8 years ago

Since moving to gtk 3.18 and 3.20, steam does not use the correct gtk theme for the system tray menu: 89485f0c-0b89-11e6-9f84-a3a9e58710a1

Currently running cinnamon on arch, but also had the issue in gnome 3.18/3.20. I have submitted bug reports to the cinnamon and arc-theme authors and they pointed toward steam as being the main culprit.

kopr12 commented 8 years ago

Having the same problem, every other gtk app that uses system tray looks fine but Steam. I wonder what's the problem. It's not just the menu from the tray, if some game is launched that uses configuration menu, for example Unity engine games, it uses that same ugly white gtk theme. Maybe that's not the theme that's shipping with steam that's causing this, but I don't know what it could be then. I'm getting this warning : (steam:4747): Gtk-WARNING **: Unable to locate theme engine in module_path:"adwaita",`

Maybe it's related to this issue ?

kopr12 commented 8 years ago

Found where's the problem !

For some reason steam doesn't recognize 'directiion' identifier in gtk themes, throwing this error : error: unexpected identifierdirection', expected character }'

@jmauss , for arc-theme edit this file : /usr/share/themes/Arc-Dark/gtk-2.0/main.rc

search for direction = LTR and direction = RTL

delete every line and that's it.

ghost commented 8 years ago

I will give it a shot when I get home, thanks!

r4-xx commented 7 years ago

This issue still exists. Will it be corrected for steam? OS: Arch Linux Arc Theme Version: 640.e4b0e99-1

kantlivelong commented 7 years ago

Also seeing this on Mint 18.2 with Mint-Y-Dark theme.

TheSHEEEP commented 6 years ago

Still a problem as of this date.

AsciiWolf commented 6 years ago

Yep, still the same issue (the one mentioned by @kajzersoze) in the latest GNOME 3.28 and default Adwaita theme. Please, fix this!

h1z1 commented 6 years ago

Somewhat amusing other projects got hit with this too, including vmware aparently . Though I can't find what part of X (be it GNOME specific or some other lib), was updated. It works as of at least gnome-themes-standard-3.22. Possibly because steam is still gtk2?

SingingBush commented 6 years ago

over 2 years since reported and still not fixed.

(steam:19482): Gtk-WARNING **: 20:48:59.733: Unable to locate theme engine in module_path: "adwaita",
/usr/share/themes/Adwaita/gtk-2.0/main.rc:733: error: unexpected identifier 'direction', expected character '}'

is the steam client going to get updated to handle direction = LTR and direction = RTL?

brunofin commented 6 years ago

+1

ghost commented 6 years ago

Seems like this was fixed in a recent update, tested with Adwaita and Greybird themes.

steamtrayadwaita

kantlivelong commented 6 years ago

@orekix could you provide distro/de info?

I'm on the latest Steam Beta and the issue still occurs but used to work a while ago.

Mint 18.3 Cinnamon 3.6.7 GTK3 3.18.9-1ubuntu3.3 GTK2 2.24.30-1ubuntu1.16.04.2

ghost commented 6 years ago

this is under:

Arch Linux Xfce 4.12 gtk3 3.22.30-1 gtk2 2.24.32-1

AsciiWolf commented 6 years ago

Still the same issue on the latest Steam client beta under Fedora 28.

GNOME 3.28.2 (with TopIcons Plus) gtk3 3.22.30-1 gtk2 2.24.32-2

critbase commented 6 years ago

Issue exists under Void Linux as well. I have:

BSPWM (shouldn't affect anything) gtk3 3.24.0 gtk2 2.24.32

It seems to work when i manually override the gtk2 theme, using the GTK2_RC_FILES variable, and set it to Industrial, but not with most other gtk2 themes.

Draconicrose commented 5 years ago

Mint 19.1 64bit Cinnamon 4.0.8 GTK3: 3.22.30-1ubuntu1 GTK2: 2.24.32-1ubuntu1

brunofin commented 5 years ago

Had this problem on every DE, but it seems to work fine on KDE:

image

(K)Ubuntu 18.04.1 LTS plasmashell 5.12.7

ptkato commented 5 years ago

It seems to be working fine in Xmonad and Stalonetray.

image

Leeo97one commented 5 years ago

In fact, it works fine with AppIndicator/KStatusNotifierItem. image

dpanter commented 5 years ago

Works correctly for me too, another KDE user. Updated Steam beta just yesterday, and again today. Debian sid, Plasma 5.14.3, Breeze Dark theme for both KDE/GTK

Leeo97one commented 5 years ago

I suppose it works out of the box in KDE because of KStatusNotifierItem. But on GNOME for example you can use this extension: https://extensions.gnome.org/extension/615/appindicator-support/

Photon89 commented 5 years ago

Just stumbled upon this problem (Xfce, Arch Linux). Looks like it appears only with particular GTK themes. Most of my themes work fine but the one I started using recently shows this problem. It is the Qogir theme: https://www.opendesktop.org/s/XFCE/p/1230631/

kantlivelong commented 5 years ago

It's definitely something related to the bundled libgtk version. If I move/delete the symlink ~/.steam/ubuntu12_32/steam-runtime/pinned_libs_32/libgtk-x11-2.0.so.0 the menu looks normal and steam appears to function properly.

nwb99 commented 5 years ago

~/.steam/ubuntu12_32/steam-runtime/pinned_libs_32/libgtk-x11-2.0.so.0 This location is not even present on my Arch system. Just installed Steam and it has other ones but not anything libgtk.

StaticRocket commented 5 years ago

You guys hit the nail on the head. Steam-runtime is preferring it's runtime libraries, as it should, and it's not inheriting the system theme. I think this must be somewhat deliberate considering the runtime dependencies are supposed to insure Steam can run regardless of the host's libraries. Adapting the host's theme could potentially hinder this if it's incompatible in any way. However, that's assuming steam-runtime is designed to be used as a debugging tool and not the default mode it's currently being shipped as.

Alternative library location: .steam/bin32/steam-runtime/pinned_libs_32/libgtk-x11-2.0.so.0

Photon89 commented 5 years ago

Maybe add a startup flag to use the system default library for GTK in Steam-runtime? Steam-native worked very poorly for me the last time I tried it (regarding ingame performance) so Steam-runtime is the option of choice in my case for the time being but this particular library should not affect ingame performance so it would be great if here the native library could be used.

alextpedro commented 5 years ago

For people using Cinnamon, enabling support for indicators seems to fix this issue.

robin92 commented 4 years ago

It's definitely something related to the bundled libgtk version. If I move/delete the symlink ~/.steam/ubuntu12_32/steam-runtime/pinned_libs_32/libgtk-x11-2.0.so.0 the menu looks normal and steam appears to function properly.

Confirmed that removing (renaming) this file solves the issue for me. I wonder what it will cause though and why system settings are not taken into account. Seems like some build-type configuration to me.

Also, on my system (Arch Linux) it was located in ~/.steam/steam/ubuntu12_32/steam-runtime/pinned_libs_32.

mmt84 commented 4 years ago

To solve this on Arch Linux, install lib32-libappindicator-gtk2. This solved my problem on xfce (it'll probably work on other DEs and WMs).

Photon89 commented 4 years ago

@mmt84: The theming is only present in steam-native, but not in steam-runtime even with lib32-libappindicator-gtk2 installed.

mmt84 commented 4 years ago

@Photon89: Well i'm not running steam-native. I'm running steam-runtime. I had native runtime installed at one time but i uninstalled it completely (using pacman -Rsn which should not leave any files behind). So right now i only have steam and lib32-libappindicator-gtk2. I'm executing steam by calling steam-runtime command.

Photon89 commented 4 years ago

@mmt84 That's weird, I have both installed and inly get the properly themed menu in steam-native... Running an up to date Arch (a rather old install though).

gandalf3 commented 4 years ago

@Photon89 @mmt84 Can you confirm if your themes contain direction = RTL|LTR directives? (Also see https://github.com/ValveSoftware/steam-for-linux/issues/4428#issuecomment-397420462)

In my case (with Ark-Dark) neither steam-runtime nor steam-native have correctly themed tray menues, but if I remove all lines containing LTR or RTL (with sed '/RTL\|LTR/d' -i /usr/share/themes/Arc-Dark/gtk-2.0/main.rc) then both work.

Photon89 commented 4 years ago

@gandalf3 I can confirm this, I guess: https://github.com/vinceliuice/Qogir-theme/search?q=rtl&unscoped_q=rtl

mmt84 commented 4 years ago

gandalf3: Here's my main.rc (Mint-Y theme): https://github.com/linuxmint/mint-themes/blob/master/src/Mint-Y/gtk-2.0/main.rc

There are lines containing RTL and LTR. I don't know about gtk theming so i'm not sure.

kisak-valve commented 4 years ago

Outdated or incomplete GTK2 framework version used by steam

Issue transferred from https://github.com/ValveSoftware/steam-for-linux/issues/5576. @Hanro50 posted on 2018-07-21T22:26:14:

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist

Steam seems to be using an out of date or incomplete version of the GTK2 framework which leads to theming being broken in about 99% of all themes I've tried since most modern themes make use of the "direction" attribute. When steam attempts to load this attribute it fails and reverts back to a fallback theme which often looks unpleasant.

This causes the following error: "/usr/share/themes/deepen-dark/get-2.0/main.rc:1090: error: unexpected identifier 'direction', expected character '}'"

The main side effect of this is the broken menu theming found when you click on the steam system tray icon. Even if the rest of your system looks modern, that menu will look asif it were ripped strait from an OS from 2 decades ago

Steps for reproducing this issue:

  1. Download a them that contains the "direction attribute" e.g. the deepen dark theme I am using has it at line 1090

image { function = SHADOW setail = "entry" state = NORMAL shadow = IN file = "assets/combo-entry.png" border = { 4, 4, 5, 4 } stretch = TRUE direction = LTR }

  1. Install steam
  2. run "steam" via terminal and look for the error I've described above

    @kisak-valve commented on 2018-07-21T22:59:25:

Related to #1542.


@darealshinji commented on 2018-09-17T14:10:17:

Gtk2 being outdated may also be related to https://github.com/ValveSoftware/steam-for-linux/issues/5579


@Hanro50 commented on 2019-08-14T20:02:07:

Found a hacky fix for those stuck with this problem. This doesn't 100% fix the problem, but comes pretty damn close on Linux Mint 19.2

Try "sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386 libxmu6:i386" along with "sudo apt install libdbusmenu-gtk4:i386"

I did do some messing about with my repositories so I don't know if they're in the official repos...but they should be. Long story short it seems steam gives preference to the native libs on your system rather then those that come prepackaged with its runtime.

Also thanks darealshinji, I discovered this fix thanks to your suggestion within #5579

Block81838 commented 4 years ago

Just need to install lib32-libappindicator-gtk2 and lib32-libappindicator-gtk3

Hanro50 commented 4 years ago

I checked this on Linux mint 20 I'm unsure if a change in Linux mint fixed it or the included runtime recieved an update, but I no longer seem to be facing this problem on a near stock installation of Linux mint.

For the most part, it seems fixed.

sistematico commented 4 years ago

To solve this on Arch Linux, install lib32-libappindicator-gtk2. This solved my problem on xfce (it'll probably work on other DEs and WMs).

Works for me under Arch Linux, XFCE, Nordic Theme, thank you very much.

Comment Link

Foro38 commented 3 years ago

I had the same problem but after installing steam-native-runtime the problem is solved

cyberpunkrocker-zero commented 3 years ago

@Foro38 steam-native-runtime installs lib32-libappindicator-gtk2 as a dependency

DusanLesan commented 3 years ago

I can confirm that lib32-libappindicator-gtk2 solves this issue for me, but why should I include this package requiring 30 dependencies as this happens only for steam? I think fixing this should be done by steam.

igrmm commented 3 years ago

I can confirm that lib32-libappindicator-gtk2 solves this issue for me, but why should I include this package requiring 30 dependencies as this happens only for steam? I think fixing this should be done by steam.

lib32-libappindicator-gtk2 solved the issue until last week. Since the last steam update, it does not use the correct gtk theme anymore.

codevski commented 2 years ago

I can confirm that lib32-libappindicator-gtk2 solves this issue for me, but why should I include this package requiring 30 dependencies as this happens only for steam? I think fixing this should be done by steam.

lib32-libappindicator-gtk2 solved the issue until last week. Since the last steam update, it does not use the correct gtk theme anymore.

Is this still the case?

Photon89 commented 2 years ago

For me the issue is solved both in steam-native and in steam-runtime, not sure for how long already.

igrmm commented 2 years ago

@Photon89 @mmt84 Can you confirm if your themes contain direction = RTL|LTR directives? (Also see #4428 (comment))

In my case (with Ark-Dark) neither steam-runtime nor steam-native have correctly themed tray menues, but if I remove all lines containing LTR or RTL (with sed '/RTL\|LTR/d' -i /usr/share/themes/Arc-Dark/gtk-2.0/main.rc) then both work.

For me the issue is solved after doing this. lib32-libappindicator-gtk2 and dependencies is not needed anymore.

codevski commented 2 years ago

@Photon89 @mmt84 Can you confirm if your themes contain direction = RTL|LTR directives? (Also see #4428 (comment)) In my case (with Ark-Dark) neither steam-runtime nor steam-native have correctly themed tray menues, but if I remove all lines containing LTR or RTL (with sed '/RTL\|LTR/d' -i /usr/share/themes/Arc-Dark/gtk-2.0/main.rc) then both work.

For me the issue is solved after doing this. lib32-libappindicator-gtk2 and dependencies is not needed anymore.

worked with Dracula theme thanks

rakvium commented 8 months ago

Found this thread due to finding this issue in logs for Ubuntu 22.04, Adwaita theme when running steam:

/usr/share/themes/Adwaita/gtk-2.0/main.rc:733: error: unexpected identifier 'direction', expected character '}'
/usr/share/themes/Adwaita/gtk-2.0/hacks.rc:28: error: invalid string constant "normal_entry", expected valid string constant

Steam version: 1708985249 Steam API version: SteamClient021 Default GTK version 3.24.33

$ gtk-launch --version
3.24.33

Installed GTK packages:

$ apt list --installed libgtk*
Listing... Done
libgtk-3-0/jammy-updates,now 3.24.33-1ubuntu2 amd64 [installed,automatic]
libgtk-3-bin/jammy-updates,now 3.24.33-1ubuntu2 amd64 [installed,automatic]
libgtk-3-common/jammy-updates,jammy-updates,now 3.24.33-1ubuntu2 all [installed,automatic]
libgtk-4-1/jammy-updates,now 4.6.9+ds-0ubuntu0.22.04.1 amd64 [installed,automatic]
libgtk-4-bin/jammy-updates,now 4.6.9+ds-0ubuntu0.22.04.1 amd64 [installed,automatic]
libgtk-4-common/jammy-updates,jammy-updates,now 4.6.9+ds-0ubuntu0.22.04.1 all [installed,automatic]
libgtk2.0-0/jammy,now 2.24.33-2ubuntu2 amd64 [installed,automatic]
libgtk2.0-bin/jammy,now 2.24.33-2ubuntu2 amd64 [installed,automatic]
libgtk2.0-common/jammy,jammy,now 2.24.33-2ubuntu2 all [installed,automatic]
libgtk2.0-dev/jammy,now 2.24.33-2ubuntu2 amd64 [installed,automatic]
libgtk3-perl/jammy,jammy,now 0.038-1 all [installed,automatic]
libgtkmm-3.0-1v5/jammy,now 3.24.5-1build1 amd64 [installed,automatic]
libgtksourceview-4-0/jammy,now 4.8.3-1 amd64 [installed,automatic]
libgtksourceview-4-common/jammy,jammy,now 4.8.3-1 all [installed,automatic]

The tray menu seems to correctly use the correct scheme (light/dark) depending on the system-wide setting though: image image

AsciiWolf commented 8 months ago

This is because the AppIndicator extension handles this differently. However the problem is still there.

joezhouchenye commented 8 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/4428#issuecomment-216055465

This is unbelievable that a comment from 8 years ago partially works. It solved my problem when using the Tray Icon Reloaded extension on Ubuntu 23.10. Although the round corners of the tray menu are still missing, it looks better now.

I searched for direction[ ]+= LTR\n and direction[ ]+= RTL\n using regex and replaced them with empty strings in my case.

录屏 2024-03-01 13-55-34.webm