tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Run Telegram Desktop in background without displaying a tray icon

Open dancojocaru2000 opened this issue 3 years ago • 90 comments

At the moment, on all Linux desktop environments that are phasing out tray icons, Telegram Desktop lacks the ability to run in the background.

Where the tray is not available, Telegram Desktop should still have an option to run in the background instead of entirely shutting down when the window is closed.

Having a tray icon is undesired, and extensions for adding tray icons are slowly growing unsupported / phased out. Therefore, suggesting installing such an extension is not a solution, nor a desirable workaround.

Furthermore, this is not "minimize on close". The app window should be closed (not visible in Alt+Tab, for example), but the application should still be running, and notifications should still be delivered. Essentially, while the window is closed in this mode, Telegram Desktop would act like a daemon. Keeping the window open when pressing the close button is also undesired behaviour.

Finally, this option should be available on other desktop environments or platforms too (for example Windows). Namely, the option to not show a tray icon but still keep the application running.

dancojocaru2000 avatar Mar 29 '21 09:03 dancojocaru2000

At the moment, on all Linux desktop environments that are phasing out tray icons

That's completely false. Only GNOME and Pantheon lack tray icons, all other desktop environments have tray icons.

As for the feature request itself I vote for wontfix: if GNOME developers think other apps will adapt to their design choices, they're completely wrong and only their apps will work without tray icons correctly.

ilya-fedin avatar Mar 29 '21 10:03 ilya-fedin

That's completely false. Only GNOME and Pantheon lack tray icons, all other desktop environments have tray icons.

Please read what I said again. I didn't say that all DEs do that, I said that on DEs that do that, Telegram Desktop lacks a feature.

if GNOME developers think other apps will adapt to their design choices, they're completely wrong and only their apps will work without tray icons correctly.

As I said, this is not only about GNOME. Personally, when using KDE I also like to only have useful things in my tray like choosing the WiFi network, and not "hey, app is running". This setting should apply to all DEs and OSes.

In particular, this would also apply to macOS. On macOS, applications should not use the tray (menu bar extra / status icon) to convey "this app is open" information, the dock does that.

Furthermore, from macOS HIG:

Let people decide whether to enable your menu bar extra. Users, not apps, should choose when a menu bar extra is added to the menu bar. Typically, this is done by changing a setting in an app’s preferences window. To ensure discoverability, however, consider giving people the option of enabling the menu bar extra during setup.

Don’t rely on the presence of menu bar extras. The system hides and shows menu bar extras regularly, and you can’t be sure which other menu bar extras users have chosen to display, or where your menu bar extra will be placed in the menu bar.

Finally, setting the "GNOME [and perhaps Apple] decisions bad" aside, the application running in the background is totally unrelated functionally to having a tray icon. Therefore, pointlessly binding the two together is 100% a Telegram Desktop problem, not a GNOME problem.

dancojocaru2000 avatar Mar 29 '21 11:03 dancojocaru2000

I am experiencing the same issue here. I am using Fedora 34 and Telegram Desktop app won't show any notification unless it is open. They have only two states: open or close. No option keep running minimized.

I have tested in other Desktop environments (Windows and Mac) and they work fine, they have a minimize option.

And this is indeed an UX issue, because user should be able to receive notification even if the app is not running in foreground. You may be able to close it and not receive any notification or just run in background mode.

And I don't agree with wontfix logic. Every OS have their own design system and the decision of not supporting one just because you don't use it or don't like it seems selfish.

For example: I don't agree with plenty of Apple decisions, but as a software developer I must comply and follow their design system or don't even bother to release to their platform. If some developer team takes time to discuss, create and document a design system is to help software developers to build applications that fell more integrated to their system.

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

As I have check now, Discord have implemented a way to keep running minimized in this scenario.

So that is not something impossible, just that isn't implemented yet.

Slack and Telegram does not support this yet.

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

@lcsvcn Please install tray extension. Tray-less environments are considered broken (even if it is a design choice).

ilya-fedin avatar Apr 07 '21 14:04 ilya-fedin

@Aokromes can you close this with wontfix?

ilya-fedin avatar Apr 07 '21 14:04 ilya-fedin

It is installed. This does not fix anything. That is not a tray issue, it is Telegram issue. Telegram does not work in background mode.

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

If you have tray icon enabled, Telegram should run in background. If you don't have, enable it.

ilya-fedin avatar Apr 07 '21 14:04 ilya-fedin

It is enable, but telegram does not work.

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

Discord does...

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

Screenshot from 2021-04-07 11-56-28

lcsvcn avatar Apr 07 '21 14:04 lcsvcn

It is enable, but telegram does not work.

If you're on Wayland, make sure you have Wayland-compatible tray extension (Discord is probably running via XWayland, while Telegram is not). TopIcons, for instance, is not compatible with Wayland, while gnome-shell-extension-appindicator is.

ilya-fedin avatar Apr 07 '21 14:04 ilya-fedin

I am using this one: https://extensions.gnome.org/extension/2890/tray-icons-reloaded/

lcsvcn avatar Apr 07 '21 15:04 lcsvcn

@lcsvcn its README изображение

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

So Telegram won't support Wayland?

lcsvcn avatar Apr 07 '21 15:04 lcsvcn

Telegram supports Wayland, your tray extension is not. Replace it.

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

"XWayland is an X Server that runs under Wayland. It provides backwards compatibility for legacy X11 applications." - It supports XWayland, should not support Wayland too since it runs under?

lcsvcn avatar Apr 07 '21 15:04 lcsvcn

But looks like you run Telegram with native Wayland, without XWayland.

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

should not support Wayland too since it runs under?

XWayland tray extension can handle only XWayland applications. For native Wayland applications you should have extension with native Wayland support.

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

@lcsvcn

https://extensions.gnome.org/extension/615/appindicator-support/

@ilya-fedin

Tray-less environments are considered broken (even if it is a design choice).

This issue is not about tray-less environments.

dancojocaru2000 avatar Apr 07 '21 15:04 dancojocaru2000

This issue is not about tray-less environments.

Yeah, there's no real sense to support running in background without tray since tray-less environments are considered broken.

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

Yeah, there's no real sense to support running in background without tray since tray-less environments are considered broken.

To requote the macOS HIG:

Let people decide whether to enable your menu bar extra. Users, not apps, should choose when a menu bar extra is added to the menu bar.

Even if macOS supports the tray, users should still be able to restrict Telegram from using it.

Likewise for other operating systems and environments.

dancojocaru2000 avatar Apr 07 '21 15:04 dancojocaru2000

Telegram is not forced to follow macOS HIG, fortunately

ilya-fedin avatar Apr 07 '21 15:04 ilya-fedin

Well no, Telegram is not forced to improve its software. It's just that that's usually the goal of modifying currently existing software: to make it better to use.

dancojocaru2000 avatar Apr 07 '21 15:04 dancojocaru2000

If there is no tray icon, how does the app detect if it needs to minimize or quit? How does the user quit the app?

john-preston avatar Apr 07 '21 16:04 john-preston

The app minimizes when the minimize button is pressed. The window still remains open but in the minimized state. The app closes its window without shutting down when the window is closed.

The user shouldn't be concerned with quitting (and almost never is). Apps such as Geary provide no option of quitting when running in the background is turned on and, frankly, there is no need for it. UWP apps on Windows 10 can also run in the background without providing any indication or any way to quit them. Apple's Messages app on macOS delivers notifications even when the window is closed, without displaying a tray icon.

Of course, some people prefer having an indication of the app running and having an explicit quit option (even though services/daemons provide no such indication or option). For those people, the way Telegram Desktop works now is good.

But for the people who prefer the way Geary works - displaying no tray icon and running in the background without necessarily having an explicit quit option - Telegram Desktop should provide the option to keep running in the background without displaying a tray icon.

dancojocaru2000 avatar Apr 07 '21 16:04 dancojocaru2000

Apps such as Geary provide no option of quitting when running in the background is turned on and, frankly, there is no need for it. UWP apps on Windows 10 can also run in the background without providing any indication or any way to quit them. Apple's Messages app on macOS delivers notifications even when the window is closed, without displaying a tray icon.

You are too good at providing bad examples.

etircopyh avatar Apr 07 '21 16:04 etircopyh

You are too good at providing bad examples.

Perhaps I am. Why are they bad examples though?

dancojocaru2000 avatar Apr 07 '21 16:04 dancojocaru2000

Perhaps I am. Why are they bad examples though?

First of all subject itself is absurd as it implies implicit behavior. So it is a bad software design in any case. When you pull the door you expect it to be closed, not remain open. And even if it was implemented as option what for? For poor GNOME decisions? I don't remember apps that would have had such "feature", especially messengers. So Geary and bad software design of Windows UWP and macOS apps is rather an exception than rule.

And the second is that both Windows and macOS never were the ones for good UX. Their only priority is data mining and to sell the product. UWP was a failure concept, for desktop for sure. And macOS has a software design mischief all over the place, the only thing that consistent is UI.

There's basically no point pushing for the edge cases like this, as they are sticking out of software design logic (any logic, really), potentially harmful (user accidentally turning such functionality on and then complaining that TDesktop is a virus)... Well, and there's a ton of reasons why issues like this should be turned to GNOME attention, they are the ones who break things (ask mpv).

etircopyh avatar Apr 07 '21 20:04 etircopyh

First of all subject itself is absurd as it implies implicit behavior. So it is a bad software design in any case.

It does not imply implicit behavior because the behavior is manually turned on. Once I turn it on, I explicitly expect Telegram not to shut down when I close it. Unless you argue that when closing a music player window the music should also stop playing because the player running in the background and continuing to play is implicit behavior.

Telegram doesn't ask the user if they want to receive notifications. Once the app is open, it just sends them. Is that not implicit behavior?

And even if it was implemented as option what for?

For user choice. For hiding a useless tray icon on KDE or on macOS or on Windows (which luckily has built in support for turning off tray icons).

I don't remember apps that would have had such "feature", especially messengers.

I also don't remember apps that tied together two unrelated functionalities, manually created a problem, then pointed the finger at someone else and said "it's their fault".

Discord on Linux runs in the background just fine even if there are no tray icons. Only Telegram manually creates the problem by not running in the background if the tray is disabled, but then blames others.

potentially harmful (user accidentally turning such functionality on and then complaining that TDesktop is a virus)...

I don't hear people swiping away or force closing the Telegram app then complain that Telegram is a virus on their phones because they keep receiving notifications.

Well, and there's a ton of reasons why issues like this should be turned to GNOME attention, they are the ones who break things

If you want GNOME to listen when people complain, perhaps lead by example and not "pull a GNOME" and "no, others should do it like we say"? Doesn't that sound like a better idea since this seems to be specifically a grudge against GNOME?

I don't see why you are entitled to complain about GNOME breaking stuff when Telegram is doing just that, and not listening to feedback when users complain.

dancojocaru2000 avatar Apr 07 '21 20:04 dancojocaru2000