Closed gunchleoc closed 2 years ago
flatpak permission-show org.telegram.desktop
Table | Object | App | Permissions | Data |
---|---|---|---|---|
background | background | org.telegram.desktop | yes | 0x00 |
Maybe your xdg-desktop-portal backend (or version) doesn't support autostart?
Linux Mint 20 is based on Ubuntu 20.04 what means all software installed from the repos is two years old and may not support all the APIs
I have Signal and Skype on autostart, so it should be possible in theory - of course I don't know which APIs they are using.
The problem with Telegram started when I had to move from the outdated package in the official Repo to the Flatpack - so, a recent change in how Telegram autostarts would certainly explain the problem.
Screenshot for packages versions on my system:
I have Signal and Skype on autostart, so it should be possible in theory - of course I don't know which APIs they are using.
Are they installed through flatpak? Flatpak is sandboxed, so adding to autostart works in a completely another way.
The problem with Telegram started when I had to move from the outdated package in the official Repo to the Flatpack - so, a recent change in how Telegram autostarts would certainly explain the problem.
Well, there were no change in how Telegram autostarts since autostart was added IIRC
Screenshot for packages versions on my system:
It seems autostart support was added in portals 1.4.0, so versions seem to be ok... Hmm... Which files present in ~/.config/autostart?
Signal is a Flathub package, Skype is not. I did have to fiddle with Signal a bit to start it minimized with a tray icon, call looks like this:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=signal --file-forwarding org.signal.Signal --use-tray-icon --start-in-tray @@u %U @@
And this is the Telegram command:
/home/<user>/Downloads/Telegram/Telegram -workdir /home/<user>/.local/share/TelegramDesktop/ -- %u -startintray
The -startintray
bit was added my me in one of my fixing attempts-
I have 2 files for Telegram in ~/.config/autostart
.
org.telegram.desktop.desktop:
[Desktop Entry]
Version=1.5
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=telegram-desktop --file-forwarding org.telegram.desktop -- @@u %u @@
Icon=org.telegram.desktop
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
Actions=Quit;
SingleMainWindow=true
X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true
X-Flatpak=org.telegram.desktop
[Desktop Action Quit]
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=telegram-desktop org.telegram.desktop -quit
Name=Quit Telegram
Icon=application-exit
telegram-desktop.desktop:
[Desktop Entry]
Type=Application
Exec=telegram-desktop -- %u
Hidden=false
X-MATE-Autostart-enabled=true
Name[gd_GB]=Telegram Desktop
Name=Telegram Desktop
Comment[gd_GB]=Official desktop version of Telegram messaging app
Comment=Official desktop version of Telegram messaging app
It seems when you added Telegram to autostart via Cinnamon menu, you've screwed that all and flatpak didn't update already installed (incorrect) file by Cinnamon. So, you need to remove these files and disable-enable the setting in Telegram settings
Done, but still not working. I'm wondering if the blank space in the localized "Downloads" directory name might be a problem?
Switching it on and off created the following autostart file:
appimagekit_ddea7328d578c0a94855eb4e72f69bb5-Telegram_Desktop.desktop
[Desktop Entry]
Version=1.5
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/home/<user>/Luchdaidhean a-nuas/Telegram/Telegram
Exec=/home/<user>/Luchdaidhean\\ a-nuas/Telegram/Telegram -workdir /home/<user>/.local/share/TelegramDesktop/ -autostart
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
Actions=Quit;
SingleMainWindow=true
X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true
[Desktop Action Quit]
Exec=/home/<user>/Luchdaidhean\\ a-nuas/Telegram/Telegram -workdir /home/<user>/.local/share/TelegramDesktop/ -quit
Name=Quit Telegram
Icon=application-exit
What is not working? I see the desktop file is correct now
Telegram is not starting after system start. If I right-click on the entry in the start menu, the tick mark is there, so everything looks correct, but it's still not working.
I just double-checked the rights of the executable, it's on -rwxrwxr-x
, so that looks OK too.
BTW I'm on MATE, not Cinnamon, in case this makes a difference.
Are you sure it's not starting? Maybe you've activated the start minimized option and it's starting, just tray icon doesn't work?
I have the same problem. Telegram Desktop won't autostart anymore. I'm on Linux Mint 20.1 Cinnamon.
@zaemiel check what is present in ~/.config/autostart
Maybe you've activated the start minimized option and it's starting, just tray icon doesn't work?
Good guess, but removing the tick from "Launch minimized" didn't fix it.
:( Maybe it's something Mint-specific? E.g. there was a system update that broke the autostart mechanism. Because I can't reproduce this on NixOS with MATE nor I have enough space on my SSD to create a VM with Mint.
Maybe. I just double-checked with ps aux
and there are no processes with "telegram" in heir name.
@zaemiel check what is present in ~/.config/autostart
It's the same like gunchleoc has. I have a solution. I've made manually a startup command for System Settings > Startup Applications
And used this command:
~/Telegram/Telegram -startintray
It's solved the problem. "Official way" no longer works for me.
It's solved the problem. "Official way" no longer works for me.
Thank you. This works for me.
Problem is Version in .config/autostart/ Telegram_Desktop.desktop [Desktop Entry] Version=1.5 Name=Telegram Desktop .... --- Change to Version=1.5 to Version=1.0 --- and it works [Desktop Entry] Version=1.0 Name=Telegram Desktop
The version couldn't be changed, the file uses features from the version 1.5 of the XDG spec
Looks like you should request support for version 1.5 in Cinnamon
run this: desktop-file-validate .config/autostart/Telegram_Desktop.desktop ( tname of your file) Telegram_Desktop.desktop: error: value "1.5" for key "Version" in group "Desktop Entry" is not a known version
just Mint left behind ;-)
Yeah, looks like your Mint is too old for this feature now, you should ask Mint developers to add support if you want to use this feature
Linux Mint 20.3 Cinnamon/Ubuntu 20.04.3 LTS same latest LTS. better keep Version=1.0 until next LTS release. or skip/remove 'Version=..' line in .desktop file also can work.
I don't think the progress should be stopped because of LTS
Then if users complain just find this thread fix himself. Can close the issue now. Not a bug, Ubuntu/Mint LTS not support/left behind in progress :)
Yeah, there's no sign that would be supported in 22.04 and waiting another 2 years is not something really wanted here given that tdesktop is bleeding edge by its nature
Also, if changing the Version key value or removing it helps, this means desktop-file-validate is unrelated here as it would fail with those changes anyway (either because version 1.0 doesn't support the used keys or because the file lacks the version), so it's most likely a bug in Cinnamon that you need to report if you want to see it fixed
Ubuntu/Mint LTS all same. Just remove Version=... and all users will be happy
all users will be happy
Users of Linux Mint will be happy obviously. Not all users though. In other words, changing that would fix for you, but break for users of other DEs that conform the spec more strictly. So this needs a fix on Cinnamon side.
My system still doesn't like it, so I'll just have to start it manually for now.
Thank you all very much for the time spent trying to help me! I fully understand why you don't want to spend more time programming for this.
The thing is change needs to be done on Cinnamon side
Steps to reproduce
/home/<user>/Downloads/Telegram/Telegram -workdir /home/<user>/.local/share/TelegramDesktop/ -- %u -startintray
but that didn't help eitherExpected behaviour
Telegram will autostart on system start after being told to autostart
Actual behaviour
Telegram will not autostart on system start after being told to autostart - possible regression of https://github.com/telegramdesktop/tdesktop/issues/422
Operating system
Release Linux Mint 20.2 Uma 64-bit, MATE 1.24.0
Version of Telegram Desktop
3.5
Installation source
Static binary from official website
Logs
No response