Tdesktop: Telegram for linux is not able to open tg links

Created on 12 Nov 2016  ·  16Comments  ·  Source: telegramdesktop/tdesktop

Hi there! My problem is the Telegram desktop client for linux is not opening tg links from Firefox. The Telegram client is being opened but there is no an appropriate chat/bot opened. My telegramdesktop.desktop file has this line

Exec=telegram-desktop -- %u

if I run

telegram-desktop -- tg:link

the link is being opened fine. Is it just my installation problem or what?

Most helpful comment

@AndydeCleyre I've got two entries there. http://itmag.es/2PW8k I had Use telegram-desktop selected. When I select "Use Telegram Desktop (default)" (but it wasn't default) I have the links opened as they supposed to be. I'm quite sure I haven't been changing this setting. Weird. So the issue is solved then.

All 16 comments

What do you see when you run the command below?
xdg-mime query default x-scheme-handler/tg

speranza@~$ xdg-mime query default x-scheme-handler/tg
telegramdesktop.desktop

The app is being launched but it doesn't open up the link.

@sprnza Can you launch it by a link and then look at ~/.TelegramDesktop/log.txt (or ~/.local/TelegramDesktop/log.txt), the arguments should be listed there.

[2016.11.12 16:00:17] Launched version: 10011, alpha: [FALSE], beta: 0, debug mode: [FALSE], test dc: [FALSE]
[2016.11.12 16:00:17] Executable dir: /usr/bin/, name: telegram-desktop
[2016.11.12 16:00:17] Initial working dir: /home/speranza/
[2016.11.12 16:00:17] Working dir: /home/speranza/.TelegramDesktop/
[2016.11.12 16:00:17] Arguments: "/usr/bin/telegram-desktop" "tg://resolve?domain=mpscmaterial"

@sprnza Where did the "--" argument go? :/

@john-preston Good question.

speranza@~$ locate telegramdesktop.desktop
/usr/share/applications/telegramdesktop.desktop
speranza@~$ cat /usr/share/applications/telegramdesktop.desktop |grep Exec
Exec=telegram-desktop -- %u

@sprnza double check that you don't have a broken telegram launcher hiding in ~/.local/share/applications.

@AndydeCleyre, yep "locate telegramdesktop.desktop" in the previous post searches through the whole system

@sprnza Yes, I'm familiar with locate. It's not a "live" search, but rather depends on a periodically updated index, which can be invoked with updatedb. This means that recent filesystem changes will not always be reflected by a locate search.

The DB is updated, I've double checked it.
On another PC (ArchLinux; telegram-desktop-bin from AUR):

speranza@~$ sudo updatedb
[sudo] password for speranza: 
speranza@~$ locate telegramdesktop
/home/speranza/.config/plank/dock1/launchers/telegramdesktop.dockitem
/home/speranza/.config/plank/dock1_1/dock1/launchers/telegramdesktop.dockitem
/home/speranza/.config/plank/dock1_1/launchers/telegramdesktop.dockitem
/home/speranza/.config/plank/dock1_2/launchers/telegramdesktop.dockitem
/usr/share/applications/telegramdesktop.desktop
speranza@~$ cat /usr/share/applications/telegramdesktop.desktop 
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
Exec=telegram-desktop -- %u
StartupWMClass=telegram-desktop
Icon=telegram
Terminal=false
Type=Application
Categories=Network;
MimeType=application/x-xdg-protocol-tg;x-scheme-handler/tg;
X-Desktop-File-Install-Version=0.22
speranza@~$ cat .TelegramDesktop/log.txt 
[2016.11.23 19:35:47] Launched version: 10019, alpha: [FALSE], beta: 0, debug mode: [FALSE], test dc: [FALSE]
[2016.11.23 19:35:47] Executable dir: /usr/bin/, name: telegram-desktop
[2016.11.23 19:35:47] Initial working dir: /home/speranza/
[2016.11.23 19:35:47] Working dir: /home/speranza/.TelegramDesktop/
[2016.11.23 19:35:47] Arguments: "/usr/bin/telegram-desktop" "tg://resolve?domain=MovieHDChannel"
[2016.11.23 19:35:47] Logs started
[2016.11.23 19:35:47] Connecting local socket to /tmp/85d4e40145b999bca6b3cbee79d88cb0-{87A94AB0-E370-4cde-98D3-ACC110C5967D}...
[2016.11.23 19:35:47] This is the only instance of Telegram, starting server and app...
[2016.11.23 19:35:47] Moved logging from '/home/speranza/.TelegramDesktop/log_start0.txt' to '/home/speranza/.TelegramDesktop/log.txt'!
[2016.11.23 19:35:47] Could not load 'appindicator3' with version 1 :(
[2016.11.23 19:35:47] App Info: reading settings...
[2016.11.23 19:35:47] App Info: reading encrypted settings...
[2016.11.23 19:35:47] LibNotify capabilities: actions, body, body-hyperlinks, body-markup, icon-static, x-canonical-private-icon-only
[2016.11.23 19:35:47] Notifications Server: Xfce Notify Daemon
[2016.11.23 19:35:48] App Info: reading map...
[2016.11.23 19:35:48] App Info: reading encrypted map...
[2016.11.23 19:35:48] App Info: reading encrypted user settings...
[2016.11.23 19:35:48] App Error: attempt to write settings while reading them!
[2016.11.23 19:35:48] App Info: encrypted user settings read.
[2016.11.23 19:35:48] App Info: reading encrypted mtp data...
[2016.11.23 19:35:48] Map read time: 5
[2016.11.23 19:35:48] TCP Error: network - Network unreachable
[2016.11.23 19:35:48] HTTP Error: network error 99 - Network unreachable
[2016.11.23 19:35:48] Using appindicator tray icon.
[2016.11.23 19:35:48] Not using Unity Launcher count.
[2016.11.23 19:35:48] Getting difference! no updates timer: 0, remains: -1

@sprnza Do you want to confirm what shows up under Firefox prefs > Applications > tg > Application Details?

@AndydeCleyre I've got two entries there. http://itmag.es/2PW8k I had Use telegram-desktop selected. When I select "Use Telegram Desktop (default)" (but it wasn't default) I have the links opened as they supposed to be. I'm quite sure I haven't been changing this setting. Weird. So the issue is solved then.

@sprnza Great! Please go ahead and close the issue when you get a chance.

Мдас... Только понял что телеграм мозили;)). А линкедин это чисто "наше" изобритение?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Liudvikas picture Liudvikas  ·  3Comments

TotalKrill picture TotalKrill  ·  3Comments

FunctionalHacker picture FunctionalHacker  ·  3Comments

Yanrishatum picture Yanrishatum  ·  3Comments

ArmeF97 picture ArmeF97  ·  3Comments