steam-for-linux
steam-for-linux copied to clipboard
Add option to disable system tray icon.
I think a lot of users would appreciate this.
I would also like to have this option. On my desktop of choice (GNOME 3) tray icons are not really meant to be used.
:+1:
Here is a quick fix that works for me: Rename ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/libappindicator.so.1.0.0 to something else, e.g. libappindicator.so.1.0.0~.
I agree and would also very much like such an option.
Most Linux desktops are moving away from the old system tray metaphor. The tray is not really meant to be used any more in the first place, it's just kept around for legacy applications that still have one. Instead there is a "notification system" and it's for notifications that are supposed to inform the user of specific events. "This program is running" is not something that requires a notification.
As long as the Steam Library window is open, which is easy on Linux desktops because there are multiple virtual desktops to tuck the window away, there should not be any icon in the tray. Maybe if we "minimize to tray" the icon can or should appear.
This would be in line with the HIG of the freedesktop.org project which is implemented by all Desktop environments, or at least all the big desktop environments like KDE, GNOME and Unity. I think this would improve integration with Linux desktops, because in many cases - and this is one of them - Steam just feels alien and not at all like a native Linux application.
+1
Bug report for same thing on Windows:
https://steamcommunity.com/discussions/forum/10/558749824315045191/
+1 Still no solution? With AwesomeWM I tend to want to keep the tray area clear. I do have lots of workspaces, so I don't really have the need for steam to hide in the tray. I can just have it on it's own work space, and I would be happy.
On a side note: I do have some problem with tendonitis, so i try to limit my use of the mouse when not needed. That is one reason why I use a window manager where almost everything is controllable via keyboard, but so far everything that involves the tray seems to always require mouse interaction. That is why it's nice for me when programs have an option to disable use of a tray icon. With many workspaces I tend to never minimize windows (tray or otherwise). They are just open until I close them, and this is acceptable.
Just thought I could elaborate a bit. Hope you don't mind :)
+1 Same thing, I like the tray area clear cause I don't use tray icons anyway, plus I have to go to the icon (or to Steam > Exit) to properly exit, instead of the usual way, which is annoying considering that all other Ubuntu either work that usual way or offer the "disable" option.
And this has been requested almost 4 years ago, here and on Steam forums... Come on. I do realize this is a minor issue and I'm being all bitchy. :) But fixing this would still make for a better Ubuntu integration and a smoother user experience.
Great job bringing Steam to Linux, by the way! Thanks
Yes, make this an optional setting. That can't be so difficult. Linux ain't Windows, tray icons aren't used as a second task bar here. (Make it at least a "hidden" feature, controlled through an environment variable)
+1, this is super annoying. When I press the 'x', I want the software to close. I use ctrl-c, but that causes problems with Steam Sync sometimes.
IMO, the whole mindset of, "my application is so important that it's going to stay running in the background" is poison. Every application thinks it's so important that it should stay running, and then computers run like crap. Opt out plz.
I don't have a tray. When I want to exit Steam, I use the Steam menu and select the Exit option.
However, frequently, the window with the Steam menu is missing! I think Steam is "minimized to the tray" and that's why I can't find the window.
In that case, to exit Steam, I send polite SIGHUPs to some steam processes. Sometimes this works, sometimes it causes me to lose in-game items (cloud sync fails).
Please:
- document which process I should send which signal to fully and safely exit steam.
- Provide an option to never "minimize to tray"
- test the steam client on plain xorg (invoked by
startx) withexec stumpwmin the.xsession.
@daveloyall Starting Steam a second time might help. On my system Steam doesn't launch a second instance but instead the existing instance pops up.
By the way, does anyone know if it's possible to force a client shutdown by modifying some files or by LD_PRELOADing some custom functions?
If you don't have a system tray, consider setting STEAM_FRAME_FORCE_CLOSE=0 to make the close button on the main steam window minimize to the application bar.
+1 Why does it need an unremovable tray icon in the first place? Steam can't be launched other ways? Or it really have to force it's way to users eyes? I think such things must be optional.
@kisak-valve I don't have an application bar. Nor is it possible to "minimize" a window. BUT... based on your description, I think STEAM_FRAME_FORCE_CLOSE=0 might work for me. I think the result will be that the window remains in my window list, so I can always switch to it, send it a kill command, etc. Good, thanks!
Yet another +1 for this. (Though at 6 years and counting it's pretty clear it's never going to happen).
Steam can't even get the icon size right: it's 4x as large as it should be. But the bigger problem is that the icon doesn't even WORK any more: clicking on it does nothing. so not only do I have this defective icon stuck in the tray, it doesn't even serve any purpose. Quality stuff. :)
the tray icon is pretty normal here, cliking on it works and it has the size that it should have... do not blame the developers for some misconfiguration on your system or for some crappy DE you choose to use.... Nevertheless, I would like to have the option to remove this icon too, not even the distro Steam chooses to support, Ubuntu's default DE, GNOME, supports tray icons without an external extension anymore, I think it would be great to have the option to disable it from the internal settings without tweaking variables
Is this still under consideration? GNOME has taken a pretty firm stance against supporting tray icons out of the box, which might be a questionabe decision, but the matter of fact is that this leaves a lot of users who can not use the system tray and may not even be aware that Steam keeps running after closing the window. It's fine if closing to tray remains the default behavior, but at least make it optional for people without a system tray.
I'm using KDE and prefer to close apps with middle mouse button on apps bar or alt-f4. But, even steam icon dissapears from bar, some time later I see nothifications, that xxxNAGIBATOR1999xxx started playing CSGO. And then I'm going to hidden tray icons and kill steam. That is nasty.
Holly cow, eight years gone! Add an option to destroy this tray icon, please 🙏🏻
Maybe someone could write some code to preload into Steam during launch to disable the tray icon?
+1
For those of you wondering about the renaming ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/libappindicator.so.1.0.0 trick, it does not work anymore. The file has been moved, and I found the file with grep at ~/.steam/bin/steam-runtime/usr/lib/i386-linux-gnu/libappindicator.so.1.0.0. After renaming the file, steam refused to start.
Very upsetting that rather than implementing a simple option to toggle something wanted by the community, Valve decided to remove the ability to bypass it, assuming this was an intentional decision. Regardless, this has really made me question Valve's outward support for linux when in reality they don't seem to be supporting normal desktop users, only focusing on making linux better for their own benefits, especially considering this issue has been present for nearly a decade now and it's not the only problem I've had with the steam client.
I will be continuing to try to find ways to get rid of it, and if I find a general solution that isn't specific to my window manager I'll post it here.
libappindicator can be patched so that the icon will never be shown (app_indicator_new and app_indicator_new_with_path):
--- app-indicator.c.bak 2020-07-06 15:23:10.000000000 +0200
+++ app-indicator.c 2023-01-12 22:47:33.469112186 +0100
@@ -1820,13 +1820,7 @@ app_indicator_new (const gchar
const gchar *icon_name,
AppIndicatorCategory category)
{
- AppIndicator *indicator = g_object_new (APP_INDICATOR_TYPE,
- PROP_ID_S, id,
- PROP_CATEGORY_S, category_from_enum (category),
- PROP_ICON_NAME_S, icon_name,
- NULL);
-
- return indicator;
+ return NULL;
}
/**
@@ -1849,14 +1843,7 @@ app_indicator_new_with_path (const gchar
AppIndicatorCategory category,
const gchar *icon_theme_path)
{
- AppIndicator *indicator = g_object_new (APP_INDICATOR_TYPE,
- PROP_ID_S, id,
- PROP_CATEGORY_S, category_from_enum (category),
- PROP_ICON_NAME_S, icon_name,
- PROP_ICON_THEME_PATH_S, icon_theme_path,
- NULL);
-
- return indicator;
+ return NULL;
}
/**
The problem: clicking on 'X' will still "minimize" instead of closing it.
If a tool could find out that the window is no longer listed in the WM's taskbar it could send -shutdown to ~/.steam/steam.pipe to close the client properly.
I was able to to put something together. However, it's far from perfect and should be used with caution: https://github.com/darealshinji/steamwm
Just checkout the repository and run ./steamwm.sh. If everything is working correctly the client should shutdown whenever you click on the main window's X button.
However, a much better solution would probably be to either inject code that always keeps the main window entry in the task bar or to inject code that sets the correct PID for _NET_WM_PID so that anyone can simply check if the Steam PID is among the output of wmctrl -lp.
Update:
Here's a similar tool: https://github.com/darealshinji/steam-taskbar
However for people with tray icon issues it might just be the best solution to start Steam with export STEAM_FRAME_FORCE_CLOSE=0.