Valve packages both a light and dark theme app menu icon, and leaves it up to the distro packager to pick which one they want their users to use.
I'm using the latest version of Debian (Jessie) stable. I installed Steam via the repos (with i386 arch). Would it make any difference to install the debian package off the Steam web site?
It most likely will not make a difference as the for-dark-theme icon is the default. As far as I know this is ~/.local/share/Steam/public/steam_tray_mono.png and you want ~/.local/share/Steam/public/steam_tray_posix.tga (or maybe steam_tray.tga). I have not personally tried to swap this out, so I don't know if there is a simple config setting somewhere.
I closed Steam, copied steam_tray_posix.tga to steam_tray_mono.png, reopened Steam, and it just overwrote what I did with the original steam_tray_mono.png.
I have the same problem, and I tried to invert colors of steam_tray_mono.png, but Steam overwrote it with the original version when I opened it.
I am using the official package. Which means, as said in the second post, that both icons should be available. Is there any sane, recommended way to switch to the "light theme" icon, so that updates do not overwrite it, and stuff?.. I've tried renaming icons, but Steam updated immediately and wiped it, so this won't work.
For some reason, the official package chose to put the correct icon in my menus, but the wrong one in my tray. This is how the Steam icon looks in the default MATE setup:
Maybe there should be a switch in the options, like many other Linux applications do it?
In my case, I solved it by editing /usr/share/pixmaps/steam_tray_mono.png.
That helped!! And I don't think Steam will be able to overwrite that file after an update since it never runs as root! Thank you!
Both icons are available: steam.png and steam_tray_mono.png . Steam really should have an option for choosing the preferred one.
Update: Steam will overwrite this on the next update, since apparently it does run something as root. ~(By the way, the functionality of running something as root without the user giving consent to it is known as "a rootkit". The functionality of overriding the user's settings is called "a backdoor". I don't even hope that Valve would someday remove a rootkit and a backdoor from their software; also, I just found this: https://github.com/ValveSoftware/steam-for-linux/issues/4919 .)~ (Possible PEBKAC here - might have been a package update which I might have missed.)
~Still, you can prevent that from happening, by making that file "immutable" - even root won't be able to overwrite it. Here is what I do to replace the icon and prevent future changes to it:~ (I've had this for years with no problem, but now this does mess up system upgrades, so this is no longer an option.)
sudo cp /usr/share/pixmaps/steam.png /usr/share/pixmaps/steam_tray_mono.png
sudo chattr +i /usr/share/pixmaps/steam_tray_mono.png
What should work now: replace the icon and just don't update the Steam launcher.
sudo cp /usr/share/pixmaps/steam.png /usr/share/pixmaps/steam_tray_mono.png
sudo apt-mark hold steam-launcher
Hello @dark-penguin, Steam itself doesn't run anything as root.
There's a couple of known cases where it hands off a command to pkexec which requires consent from the user (Ask for the package manager to install libc6:i386, libgl1-mesa-dri:i386 if it is missing on Ubuntu and setcap vrcompositor-launcher to access the gpu high priority queue for async reprojection). Running Steam itself as root is not supported and if you find any evidence that it is, that's a serious issue and we'd love to hear about it.
Both these pixmaps are part of the Steam package which is installed by the package manager. It most likely got replaced by the package manager in a normal steam package update, not by the Steam client.
Oh, that's right, that would explain it. For some reason, I was certain that the icon got overwritten during a client update. But that might be because I know I did not update the package manually, and I forgot that nowadays manually installed packages inject their repositories to get updates. :) Possible PEBKAC here. :)
Also, with an immutable icon, steam-launcher package can not update because dpkg can not overwrite that file, and exits with an error. I have never seen that before, so I don't think I could have updated the package and not notice it (I've had it immutable for years now, and I always update manually and read the output). I'll see if I can confirm this.
Concerning a client update, I just had one, but my icon was immutable. I've removed the "immutable" attribute, restored ~/.local/Steam folder from a backup, and ran steam again, but it said it was already on the last version... I've switched it back, and the version was indeed the same... I don't understand how does the client update works. x_x I'll try to confirm this on the next client update.
(But seriously, would it be that hard to add a checkbox for a light/dark icon?.. That's what other applications do, so it's not really a bad thing even if it looks like one.)
UPDATE: I just had a second client update in a row. The icon was not reverted (meaning, I am an idiot, which is good in this case). The version in "About Steam" is still the same ( T_T I DON'T understand client updates).
Valve lets us change the icon even if it's manually.
See what's easier just to make contingencies!
@kayzzen01 I've never managed to find that setting. Where is it?
@dark-penguin
Currently the directory where the launcher takes the system tray icon is: ~/.local/share/Steam/public/
The problem is that when calling steam-runtime, it checks the installation files and if it finds anything different it overwrites them.
Analyzing the output of the steam-runtime command:
03/15 11:03:44 Init: Installing breakpad exception handler for appid(steam)/version(1709846872)/tid(26146)
[2024-03-15 11:03:44] Loading cached metrics from disk (/home/myUser/.local/share/Steam/package/steam_client_metrics.bin)
[2024-03-15 11:03:44] Using the following download hosts for Public, Realm steamglobal
[2024-03-15 11:03:44] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2024-03-15 11:03:44] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2024-03-15 11:03:44] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-03-15 11:03:44] Verifying installation...
[2024-03-15 11:03:44] BVerifyInstalledFiles: public/steam_tray_mono.png is 1704 bytes, expected 5405
[2024-03-15 11:03:44] Verification complete
[2024-03-15 11:03:44] Downloading update...
[2024-03-15 11:03:44] Checking for available updates...
[2024-03-15 11:03:44] Downloading manifest: https://client-update.akamai.steamstatic.com/steam_client_ubuntu12
[2024-03-15 11:03:44] Manifest download: send request
[2024-03-15 11:03:44] Manifest download: waiting for download to finish
[2024-03-15 11:03:45] Manifest download: finished
[2024-03-15 11:03:45] Downloaded new manifest: /steam_client_ubuntu12 version 1709846872, installed version 1709846872, existing pending version 0
[2024-03-15 11:03:45] Download complete.
[2024-03-15 11:03:45] uninstalled manifest found in /home/myUser/.local/share/Steam/package/steam_client_ubuntu12 (1).
[2024-03-15 11:03:45] Extracting package...
[2024-03-15 11:03:49] Installing update...
[2024-03-15 11:03:58] Cleaning up...
[2024-03-15 11:03:58] Update complete, launching Steam...
We can see that it checks the number of bytes to compare the files, I believe it uses hash perhaps somewhere.
So I thought I would check the size of the icon and create one with the same amount of bytes.
The size of the steam_tray_mono.png icon is 5405 bytes, the steam.png icon is 2697 bytes.
I backed up the original icon:
cp ~/.local/share/Steam/public/steam_tray_mono.png ~/.local/share/Steam/public/steam_tray_mono-orig.png
I copied the default icon to the public directory overwriting the current icon:
cp /usr/share/pixmaps/steam.png ~/.local/share/Steam/public/steam_tray_mono.png
Then I added empty bytes to the file to make it the same amount:
steam_tray_mono.png(5405) - steam.png(2697) = 2708 bytes
truncate -s +2708 ~/.local/share/Steam/public/steam_tray_mono.png
And it worked. :smile:
It is possible to do this with other PNG icons as long as they do not exceed 5405 bytes in size.
Valve, this is just a contingency. Help us for a better solution.
Creating a way to manually change it within the launcher is a good idea, then you can create a solution to detect the theme automatically without removing the first option :wink:
That... it not really "giving up an option". That's more like a voodoo way to hack something that is adamant about making sure we do NOT, under any circumstances, get what we want. %)
Neither is my current solution: replace the icon in /usr/share/pixmaps , then apt-mark hold steam so that it never updates, otherwise it replaces the icon.
Man, with the way light themes are not so unpopular, not having an actual "option" to fix a broken UI... Even the most important element in the UI, I would say...
By the way, does your solution survive a Steam update? Wouldn't it overwrite the icon when unpacking a new archive?
@dark-penguin,
I see you use a solution for Debian/Ubuntu systems. I think some things work differently here for me on Arch Linux.
I haven't yet tested whether this solution survives a Steam update, I came to this conclusion today :smile:
I will update here as soon as possible.
@kayzzen01 Does it? I think most at least "fairly normal" systems have the basics the same way. You install the small "launcher" package using either your package manager or maybe some kind of flatpak. Then you launch it, and it downloads and runs the Steam distribution update that unpacks into your home directory. At that point, we're already outside of distribution-specific stuff. And I would assume the Steam distribution update unpacks on top of whatever's there, so it would overwrite any changes you might have made.
You could try to make the file immutable by changing its extended attributes, but that might cause the distribution update extraction to fail.
Valve, this is just a contingency. Help us for a better solution.
Creating a way to manually change it within the launcher is a good idea, then you can create a solution to detect the theme automatically without removing the first option 😉
I believe automatic detection would be nearly impossible to implement, since there's no way to detect your "light/dark" theme on Linux. Not only there are multiple desktop environments without any kind of standardization, but AFAIK even the concept of "light or dark" does not exist - only "colors in the theme". And since you can run any of the existing "tray" applications which can paint themselves any color they want... there's no reliable way to get that color. Therefore most applications I've seen simply leave that up to the user, exposing a checkbox in the settings. But that setting is a must! Come on, you already have both icons anyway!
I've tried this hack. I've copied the icon from /usr/share/pixmaps/steam.png into ~/.local/share/Steam/public/steam_tray_mono.png, then updated the steam package which has overwritten the icons in /usr/share/pixmaps/.
Result: the icon in ~/.local/share/Steam/public/ survived the Steam client launch, which should have been an update since it's been quite a while I've launched Steam on this PC. But I'm not sure it actually was, because there was no visual confirmation, and I was unable to see the logs (launched it from a launcher instead of commandline). HOWEVER, the icon displayed was the "wrong" one. So, on Debian, seems like icons in ~/.local/share/Steam/public/steam_tray_mono.png don't matter, and only icons from /usr/share/pixmaps/ are used.
@dark-penguin,
Today my Steam Launcher updated and the icon was kept. It's already something.
I can't believe I posted this issue over 9 years ago, but it's still open. Why doesn't Steam have a setting for a "dark theme" or "light theme" on the system tray? It's probably against Steam's UI design to use anything OS specific. I was able to temporarily fix it using @dark-pengiun 's solution:
sudo cp /usr/share/pixmaps/steam.png /usr/share/pixmaps/steam_tray_mono.png
sudo chattr +i /usr/share/pixmaps/steam_tray_mono.png
By the way, on KDE Plasma at least, it's easy enough to have an icon in ~/.local/share/icons called steam_tray_mono.png. You could also add a symlink with the same name in /usr/share/icons. It doesn't matter if these two actually point to an svg, just as long as the filename is the same.
Now to do it within a theme, you need to match the filetype. In something like breeze, you make a symlink called ./apps/48/steam_tray_mono.svg, while in something like Oxylite, you call it ./apps/steam_tray_mono.svg. So if you want to hack your own theme or a local copy of a theme, it's pretty straight forward. Just cd into the directory that steam's icon is and run:
$ ln -s steam.svg steam_tray_mono.svg
I don't think many projects would like to upstream a hack like this though.
For KDE Plasma 6 users, I've written a script to conveniently keep the steam tray icon in sync with the theme color scheme: https://github.com/marcotuliomatos/ksteamtrayicon
I've also made an AUR package available for Arch users: https://aur.archlinux.org/packages/ksteamtrayicon
System tray icon is not compatible with light themes. It is too bright and hard to see.