Bug 437612 - Kio doesn't recognize tg:// URI for Telegram
Summary: Kio doesn't recognize tg:// URI for Telegram
Status: RESOLVED DUPLICATE of bug 439132
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-24 15:08 UTC by Thiago Sueto
Modified: 2022-01-18 21:07 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2021-05-24 15:08:48 UTC
SUMMARY
Whenever attempting to add Telegram stickers via web browser, KIOexec gives the following message:

Unable to create io-slave. klauncher said: Unknown protocol 'tg'.

Which makes me assume Kio is unaware of URIs like

tg://addstickers?set=Animals

(Example stickers taken from https://telegram.org/blog/stickers-revolution )
Comment 1 Nate Graham 2021-05-26 18:37:41 UTC
Can confirm.
Comment 2 David Marzal 2021-08-12 16:15:39 UTC
In my setup works, in case you need some testing.

Arch Linux + Telegram binary with Firefox or Chromium

¿Is this issue a dup of https://bugs.kde.org/show_bug.cgi?id=439132?
Comment 3 Patrick Silva 2021-09-22 14:40:47 UTC
Can confirm on Arch Linux, Chromium + Telegram from Arch repos.

Operating System: Arch Linux
KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Graphics Platform: X11
Comment 4 Harald Sitter 2021-10-06 15:33:39 UTC
What's the output of `XDG_UTILS_DEBUG_LEVEL=3 xdg-mime query default x-scheme-handler/tg`, 

What's the output of `ktraderclient5 --servicetype Application --constraint "'telegram' ~ Exec"`
Comment 5 Patrick Silva 2021-10-09 00:43:56 UTC
$XDG_UTILS_DEBUG_LEVEL=3 xdg-mime query default x-scheme-handler/tg
Checking /home/stalker/.config/mimeapps.list
/usr/bin/xdg-mime: line 323: [: too many arguments
/usr/bin/xdg-mime: line 325: [: too many arguments
userapp-Telegram Desktop-WOLV40.desktop


$ktraderclient5 --servicetype Application --constraint "'telegram' ~ Exec"
servicetype is : Application
constraint is : 'telegram' ~ Exec
got 2 offers.
---- Offer 0 ----
Invalid property Actions
StartupWMClass : 'TelegramDesktop'
TryExec : 'telegram-desktop'
X-GNOME-UsesNotifications : 'TRUE'
Type : 'Application'
Name : 'Telegram Desktop'
Comment : 'Official desktop version of Telegram messaging app'
Invalid property GenericName
Icon : 'telegram'
Exec : 'telegram-desktop -- %u'
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'x-scheme-handler/tg - Application'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Invalid property Library
DesktopEntryPath : '/usr/share/applications/telegramdesktop.desktop'
DesktopEntryName : 'telegramdesktop'
Keywords : 'tg - chat - im - messaging - messenger - sms - tdesktop'
FormFactors : ''
Categories : 'Chat - Network - InstantMessaging - Qt'
---- Offer 1 ----
NoDisplay : 'TRUE'
Type : 'Application'
Name : 'Telegram Desktop'
Comment : 'Definição personalizada para Telegram Desktop'
Invalid property GenericName
Invalid property Icon
Exec : '/usr/bin/telegram-desktop -workdir /home/stalker/.local/share/TelegramDesktop/ -- %u'
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'Application'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Invalid property Library
DesktopEntryPath : '/home/stalker/.local/share/applications/userapp-Telegram Desktop-WOLV40.desktop'
DesktopEntryName : 'userapp-telegram desktop-wolv40'
Keywords : ''
FormFactors : ''
Categories : ''
Comment 6 Martin 2021-10-31 17:52:21 UTC
Caused by https://bugs.kde.org/show_bug.cgi?id=434362#c9

Couldn't get TG to generate the desktop file there again after removing it nor could I find it in tgdesktop source code to fix it.
Comment 7 Ilya Bizyaev 2021-10-31 17:59:36 UTC
Close Telegram, delete ~/.local/share/TelegramDesktop/ and restart Telegram, then it will create the desktop file. There's probably an easier way, but this should work.
Comment 8 Nicolas Fella 2022-01-18 21:05:06 UTC
Could be the same root cause as https://bugs.kde.org/show_bug.cgi?id=440062

Check whether Telegram's desktop file has "MimeType=x-scheme-handler/tg;". It does for me and things work fine
Comment 9 Nicolas Fella 2022-01-18 21:07:20 UTC

*** This bug has been marked as a duplicate of bug 439132 ***