Telegram: Difference between revisions

From ArchWiki
(fixed section fragments (interactive))
(Added Materialgram - telegram desktop fork app)
 
(43 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Instant messaging]]
[[Category:Instant messaging]]
[[fa:Telegram]]
[[ja:Telegram]]
[[ja:Telegram]]
[[pt:Telegram]]
[[pt:Telegram]]
Line 7: Line 6:
[[wikipedia:Telegram (software)|Telegram]] is a cloud-based cross-platform instant messaging service with optional end-to-end encryption. Account creation requires a phone number.
[[wikipedia:Telegram (software)|Telegram]] is a cloud-based cross-platform instant messaging service with optional end-to-end encryption. Account creation requires a phone number.


The official clients are open-source but the code for recent versions is not always immediately published. The server-side code is proprietary.
{{Note|Although the telegram client(s) are open source, the server side is proprietary and centralised, therefore having privacy issues. Use at your own risk as data is controlled by a centralised company.}}


== Installation ==
== Installation ==
Line 13: Line 12:
You can use one of following methods in order to use Telegram:
You can use one of following methods in order to use Telegram:


{{Style|Might be more presentable with [[Template:App]].}}
=== Graphical clients ===
 
* {{App|Telegram Desktop|The official application built by Arch Linux.|https://desktop.telegram.org|{{Pkg|telegram-desktop}}}}
* {{App|Kotatogram|Unofficial experimental Telegram Desktop fork.|https://kotatogram.github.io/|{{AUR|kotatogram-desktop}}}}
* {{App|64Gram|Unofficial feature-rich Telegram Desktop fork.|https://64gr.am|{{AUR|64gram-desktop}}}}
* {{App|Materialgram|Telegram Desktop fork with material icons and some improvements.|https://github.com/kukuruzka165/materialgram|{{AUR|materialgram-git}}}}


=== Chat client plugins ===
=== Web-based clients ===


* By using the {{AUR|telegram-tdlib-purple-git}} package, connection to Telegram through (graphical or command-line) messenger software based on {{Pkg|libpurple}} such as [[Pidgin]] is provided.
Two official browser-agnostic clients exist: [https://web.telegram.org/k/ Telegram WebK] and [https://web.telegram.org/a/ Telegram WebA], while the [https://telegram.org/dl/webogram/chromeapp Telegram Chrome app] for [[Chromium]]-based browser is also available. There are also third-party clients:
* Messaging apps that are using [[wikipedia:Telepathy_(software)|Telepathy]] can make use of {{Pkg|telepathy-haze}} package, which provides possibility of using {{Pkg|libpurple}} and thus {{AUR|telegram-tdlib-purple-git}} to connect Telegram.
* In the [[KDE]] desktop environment using {{Pkg|telepathy-morse}} provides capability of connecting the default messenger to Telegram.


=== Graphical clients ===
* {{App|Franz|An [https://github.com/meetfranz/franz open-source] web-based application that can be used for various instant messaging software.|https://meetfranz.com/|{{AUR|franz}}}}
* {{App|Rambox|An alternative to Franz, no longer open source, that offers all features of its counterpart.|https://rambox.app/|{{AUR|rambox-bin}}}}


The [https://desktop.telegram.org/ official application] built by Arch Linux: {{Pkg|telegram-desktop}}.
=== Chat client plugins ===


Third-party clients:
Some multi-purpose chat clients provide a plugin for Telegram:  


* {{AUR|kotatogram-desktop-bin}}, {{AUR|kotatogram-desktop}}, {{AUR|kotatogram-desktop-dynamic-bin}}
* {{App|[[Pidgin]]|{{Pkg|libpurple}} Telegram plugin implemented using official tdlib client library. Needs TD_API_ID and TD_API_HASH env vars to be set for makepkg.|https://github.com/ars3niy/tdlib-purple|{{AUR|telegram-tdlib-purple-git}}}}
* {{App|[[wikipedia:Telepathy (software)|Telepathy]]|The libpurple telepathy backend, in conjunction with {{AUR|telegram-tdlib-purple-git}} allows access to Telegram.|https://telepathy.freedesktop.org|{{AUR|telepathy-haze}}}}


=== Command-line clients ===
=== Command-line clients ===


* {{AUR|telegram-cli-git}} provides command-line interface to connect and use Telegram. For more information about the program, visit the program page on [https://github.com/kenorb-contrib/tg Github].
* {{App|Telegram messenger CLI|A command-line interface for Telegram which uses the readline interface.|https://github.com/kenorb-contrib/tg|{{AUR|telegram-cli-git}}}}
* {{AUR|nctelegram-git}} is a command-line interface for Telegram based on [[wikipedia:Ncurses|Ncurses]] and needs {{AUR|telegram-cli-git}} to run. For more information about the program, visit the program page on [https://github.com/Nanoseb/ncTelegram Github].
* {{App|ncTelegram|A ncurses Telegram client developed in Python with the urwid library.|https://github.com/Nanoseb/ncTelegram|{{AUR|nctelegram-git}}}}
* {{AUR|telegram-tg}} Telegram terminal client. For more information about the program, visit the program page on [https://github.com/paul-nameless/tg Github].
* {{App|tg|Telegram terminal client.|https://github.com/paul-nameless/tg|{{AUR|telegram-tg}}}}
* {{AUR|python-telegram-send}}, not a full client but a command-line tool to directly send messages or files via Telegram.
* {{App|nchat|A terminal-based chat client with support for Telegram.|https://github.com/d99kris/nchat|{{AUR|nchat-git}}}}
* [https://github.com/zevlg/telega.el telega.el] - GNU Emacs Telegram client.
* {{App|telega.el|GNU Emacs Telegram client.|https://github.com/zevlg/telega.el}}
* [https://github.com/vtr0n/TelegramTUI TelegramTUI] - terminal Telegam client with a pseudo-graphic GUI
* {{App|telegram-send|A command-line tool to directly send messages or files via Telegram.|https://github.com/rahiel/telegram-send|{{AUR|python-telegram-send}}}}
* {{AUR|nchat-git}} Terminal-based Telegram client for Linux and macOS with support for external editor compose, visit the program page on [https://github.com/d99kris/nchat Github].
 
=== Web-based clients ===
 
* The official [https://web.telegram.org/k/ Telegram WebK].
* The official [https://web.telegram.org/z/ Telegram WebZ].
* {{AUR|franz}} is an [https://github.com/meetfranz/franz open-source] web-based application that can be used for web-based interface of various instant messaging software such as [[wikipedia:Telegram (software)|Telegram]], [[wikipedia:WhatsApp|WhatsApp]], [[wikipedia:Facebook|Facebook]], and more.
* {{AUR|rambox-bin}} is an alternative to Franz, also open source. It offers all features of its counterpart.
* Use [https://telegram.org/dl/webogram/chromeapp Telegram Chrome app] for [[Chromium]], to connect to Telegram in your browser via web interface.


== Tips and tricks ==
== Tips and tricks ==


=== GTK dialogs in Telegram Desktop ===
=== File chooser style ===


If you want to use [[GTK]] file dialogs instead of Qt ones, set {{ic|QT_QPA_PLATFORMTHEME}} [[environment variable]] to {{ic|gtk3}}.
{{Accuracy|The xdgdesktopportal QPT is for flatpak/snap and can lead to issues as it's not meant to be used outside of them. This QPT has nothing to do with KDE and the right way to get the KDE file chooser is to get the Qt 6 KDE QPT (e.g. by installing Plasma 6).}}


=== KDE dialogs in Telegram Desktop ===
By default, Telegram uses Qt file chooser. You can change it by setting {{ic|QT_QPA_PLATFORMTHEME}} [[environment variable]].


If you want to use [[KDE]] file dialogs instead of Qt ones, set {{ic|QT_QPA_PLATFORMTHEME}} [[environment variable]] to {{ic|xdgdesktopportal}}.
* To use [[GTK]] file chooser, set it to {{ic|gtk3}}.
* To use [[KDE]] file chooser, set it to {{ic|xdgdesktopportal}}.


=== SVG icon theme in Telegram Desktop ===
=== SVG icon theme in Telegram Desktop ===
{{Accuracy|telegram-desktop depends on {{Pkg|qt6-svg}}}}


If you want to use an icon theme based on svg image (e.g. {{Pkg|papirus-icon-theme}}) install {{Pkg|qt5-svg}}. See [[Qt#Icon theme is not applied]] for details.
If you want to use an icon theme based on svg image (e.g. {{Pkg|papirus-icon-theme}}) install {{Pkg|qt5-svg}}. See [[Qt#Icon theme is not applied]] for details.
Line 63: Line 61:
=== Wayland support ===
=== Wayland support ===


{{Merge|GNOME/Troubleshooting|Not specific to Telegram.}}
See [[GNOME/Troubleshooting#Cursor size or theme issues on Wayland]].
 
GNOME Wayland may not set cursor settings for Telegram[https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5894][https://github.com/telegramdesktop/tdesktop/issues/25075#issuecomment-1250020362]. This may result in cursors being of the wrong theme, size and not being able to resize the window.


Set {{ic|XCURSOR_THEME}} and {{ic|XCURSOR_SIZE}} environment variables manually (e.g., {{ic|1=XCURSOR_THEME=Adwaita}} and {{ic|1=XCURSOR_SIZE=24}})
See [[Wayland#Qt]] for generic instructions.


See [[Wayland#Qt]] for further instructions.
=== xdg-open scheme handler ===


=== xdg-open in Telegram Desktop ===
If you want to use [[xdg-open]] for {{ic|t.me}} links and receive an error not finding a handler for {{ic|tg}}, run:


If you want to use xdg-open on t.me links and receive an error not finding a handler for tg:
$ xdg-mime default org.telegram.desktop.desktop application/x-xdg-protocol-tg
$ xdg-mime default org.telegram.desktop.desktop x-scheme-handler/tg


{{bc|1=
=== Real-time priority ===
xdg-mime default telegramdesktop.desktop application/x-xdg-protocol-tg
xdg-mime default telegramdesktop.desktop x-scheme-handler/tg
}}


=== Failed to set real-time priority for thread: Operation not permitted ===
{{Accuracy|Latest openal supports rtkit}}


If you get the following error
If you get the following error:


{{hc|$ telegram-desktop|
{{hc|$ telegram-desktop|
Line 92: Line 86:
=== HiDPI scaling ===
=== HiDPI scaling ===


If you have Qt scaling enabled on your system, and the scaling factor is not an integer, you may encounter problems like [https://github.com/telegramdesktop/tdesktop/issues/23953 pixelated images and icons]. you may need to disable [https://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt high-DPI scaling] for Telegram separately.
{{Accuracy|This may lead to problems when opening files from Telegram (e.g. opening pdf with Okular will inherit the variable).}}
 
If you have Qt scaling enabled on your system, and the scaling factor is not an integer, you may encounter problems like [https://github.com/telegramdesktop/tdesktop/issues/23953 pixelated images and icons]. you may need to disable [[HiDPI#Qt 5|high-DPI scaling]] for Telegram separately.


Copy {{ic|/usr/share/applications/telegramdesktop.desktop}} to your [[Desktop entries#Application entry|user-specific applications]] and [[textedit|edit]] it as follows:  
Unset {{ic|QT_SCREEN_SCALE_FACTORS}} [[Desktop entries#Modify environment variables|environment variable]] as follows:  


{{hc|1=$HOME/.local/share/applications/telegramdesktop-no-scaling.desktop|2=
{{hc|1=$HOME/.local/share/applications/org.telegram.desktop.desktop|2=
...
...
Exec=env -u QT_SCREEN_SCALE_FACTORS telegram-desktop -- %u
Exec=env -u QT_SCREEN_SCALE_FACTORS telegram-desktop -- %u
...
DBusActivatable=false
...
...
}}
}}


You may need to [[Desktop entries#Update database of desktop entries|update the database]] of desktop entries.
You may need to perform [[Desktop entries#Update database of desktop entries]] afterwards.
 
Also consider disabling ''Default interface scale'' in Settings and enabling ''Enable precise High DPI scaling'' in Settings -> ''Advanced'' -> ''Experimental settings'' to avoid incorrect scaling when launch by {{ic|xdg-open}} (e.g. opening {{ic|tg://}} link).


=== Audio backend ===
=== Audio backend ===
Line 111: Line 111:


=== Choose correct web camera ===
=== Choose correct web camera ===
{{Accuracy|https://github.com/telegramdesktop/tdesktop/issues/17269 is closed}}


Telegram version 3.7.1 does not allow to select the web camera to use in video conference. If you want to force telegram to use a different camera, as a workaround you can disable the unwanted camera device as described in [https://askubuntu.com/a/166819].
Telegram version 3.7.1 does not allow to select the web camera to use in video conference. If you want to force telegram to use a different camera, as a workaround you can disable the unwanted camera device as described in [https://askubuntu.com/a/166819].
Line 120: Line 122:
=== Changing the default file browser ===
=== Changing the default file browser ===


On environments where the {{ic|XDG_CURRENT_DESKTOP}} environment variable is unset (like when not running desktop environments, i.e only window managers) telegram-desktop falls back to a very basic file browser. Using the above mentioned variable, the user can change the default one to the one they like that belongs to a certain desktop environment. Valid values for this variable can found [[Xdg-utils#Environment variables|here]]. For example to use [[Thunar]] from the XFCE project:
Telegram Desktop uses the [https://www.freedesktop.org/wiki/Specifications/file-manager-interface/ File Manager DBus Interface] to open the file browser. The spec does not allow to choose the preferred one, ensure you have only one file browser installed.


{{bc|1=XDG_CURRENT_DESKTOP=XFCE telegram-desktop}}
Do not confuse file browsers with file dialogs which are parts of toolkits and is covered by [[#File chooser style]].


== See also ==
== See also ==
Line 130: Line 132:
* [https://t.me/planetarch Planet Arch Linux & News] - Channel with recent Planet Arch updates and Latest News in one place.
* [https://t.me/planetarch Planet Arch Linux & News] - Channel with recent Planet Arch updates and Latest News in one place.
* [https://t.me/archlinux_updates Arch Linux: Recent package updates] - Channel with recent package updates in Arch Linux repositories.
* [https://t.me/archlinux_updates Arch Linux: Recent package updates] - Channel with recent package updates in Arch Linux repositories.
* [https://t.me/archlinuxnews Arch Linux News] - Channel with news from Arch web site ''(not updated since 2018)''.
* [https://t.me/archplanet Planet Arch] - Channel with posts from Planet Arch web site ''(not updated since 2018)''.

Latest revision as of 14:58, 21 April 2024

Telegram is a cloud-based cross-platform instant messaging service with optional end-to-end encryption. Account creation requires a phone number.

Note: Although the telegram client(s) are open source, the server side is proprietary and centralised, therefore having privacy issues. Use at your own risk as data is controlled by a centralised company.

Installation

You can use one of following methods in order to use Telegram:

Graphical clients

  • Telegram Desktop — The official application built by Arch Linux.
https://desktop.telegram.org || telegram-desktop
  • Kotatogram — Unofficial experimental Telegram Desktop fork.
https://kotatogram.github.io/ || kotatogram-desktopAUR
  • 64Gram — Unofficial feature-rich Telegram Desktop fork.
https://64gr.am || 64gram-desktopAUR
  • Materialgram — Telegram Desktop fork with material icons and some improvements.
https://github.com/kukuruzka165/materialgram || materialgram-gitAUR

Web-based clients

Two official browser-agnostic clients exist: Telegram WebK and Telegram WebA, while the Telegram Chrome app for Chromium-based browser is also available. There are also third-party clients:

  • Franz — An open-source web-based application that can be used for various instant messaging software.
https://meetfranz.com/ || franzAUR
  • Rambox — An alternative to Franz, no longer open source, that offers all features of its counterpart.
https://rambox.app/ || rambox-binAUR

Chat client plugins

Some multi-purpose chat clients provide a plugin for Telegram:

  • Pidginlibpurple Telegram plugin implemented using official tdlib client library. Needs TD_API_ID and TD_API_HASH env vars to be set for makepkg.
https://github.com/ars3niy/tdlib-purple || telegram-tdlib-purple-gitAUR
https://telepathy.freedesktop.org || telepathy-hazeAUR

Command-line clients

  • Telegram messenger CLI — A command-line interface for Telegram which uses the readline interface.
https://github.com/kenorb-contrib/tg || telegram-cli-gitAUR
  • ncTelegram — A ncurses Telegram client developed in Python with the urwid library.
https://github.com/Nanoseb/ncTelegram || nctelegram-gitAUR
  • tg — Telegram terminal client.
https://github.com/paul-nameless/tg || telegram-tgAUR
  • nchat — A terminal-based chat client with support for Telegram.
https://github.com/d99kris/nchat || nchat-gitAUR
  • telega.el — GNU Emacs Telegram client.
https://github.com/zevlg/telega.el || not packaged? search in AUR
  • telegram-send — A command-line tool to directly send messages or files via Telegram.
https://github.com/rahiel/telegram-send || python-telegram-sendAUR

Tips and tricks

File chooser style

The factual accuracy of this article or section is disputed.

Reason: The xdgdesktopportal QPT is for flatpak/snap and can lead to issues as it's not meant to be used outside of them. This QPT has nothing to do with KDE and the right way to get the KDE file chooser is to get the Qt 6 KDE QPT (e.g. by installing Plasma 6). (Discuss in Talk:Telegram)

By default, Telegram uses Qt file chooser. You can change it by setting QT_QPA_PLATFORMTHEME environment variable.

  • To use GTK file chooser, set it to gtk3.
  • To use KDE file chooser, set it to xdgdesktopportal.

SVG icon theme in Telegram Desktop

The factual accuracy of this article or section is disputed.

Reason: telegram-desktop depends on qt6-svg (Discuss in Talk:Telegram)

If you want to use an icon theme based on svg image (e.g. papirus-icon-theme) install qt5-svg. See Qt#Icon theme is not applied for details.

Wayland support

See GNOME/Troubleshooting#Cursor size or theme issues on Wayland.

See Wayland#Qt for generic instructions.

xdg-open scheme handler

If you want to use xdg-open for t.me links and receive an error not finding a handler for tg, run:

$ xdg-mime default org.telegram.desktop.desktop application/x-xdg-protocol-tg
$ xdg-mime default org.telegram.desktop.desktop x-scheme-handler/tg

Real-time priority

The factual accuracy of this article or section is disputed.

Reason: Latest openal supports rtkit (Discuss in Talk:Telegram)

If you get the following error:

$ telegram-desktop
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)

Install realtime-privileges, add yourself to the realtime group and reboot. See Realtime process management#Configuring PAM for details.

HiDPI scaling

The factual accuracy of this article or section is disputed.

Reason: This may lead to problems when opening files from Telegram (e.g. opening pdf with Okular will inherit the variable). (Discuss in Talk:Telegram)

If you have Qt scaling enabled on your system, and the scaling factor is not an integer, you may encounter problems like pixelated images and icons. you may need to disable high-DPI scaling for Telegram separately.

Unset QT_SCREEN_SCALE_FACTORS environment variable as follows:

$HOME/.local/share/applications/org.telegram.desktop.desktop
...
Exec=env -u QT_SCREEN_SCALE_FACTORS telegram-desktop -- %u
...
DBusActivatable=false
...

You may need to perform Desktop entries#Update database of desktop entries afterwards.

Also consider disabling Default interface scale in Settings and enabling Enable precise High DPI scaling in Settings -> Advanced -> Experimental settings to avoid incorrect scaling when launch by xdg-open (e.g. opening tg:// link).

Audio backend

As Telegram makes use of OpenAL, it is possible to configure the audio settings by editing its config files, i.e. ~/.config/alsoft.conf, or the environment variables listed here.

In case sound is not working due to an invalid audio backend being used, it can be overwritten by setting the environment variable ALSOFT_DRIVERS or the drivers property in the [general] section of the OpenAL config. The drivers value "pulse," for example would try pulseaudio first and then fallback to the default driver list.

Choose correct web camera

The factual accuracy of this article or section is disputed.

Telegram version 3.7.1 does not allow to select the web camera to use in video conference. If you want to force telegram to use a different camera, as a workaround you can disable the unwanted camera device as described in [1].

Fcitx support for Qt 6 Telegram

Telegram-desktop is built against Qt 6 since 3.4.2-2. Users upgrading from an older version might notice Fcitx stop working for this application. To make it work again, install fcitx-qt6 or the fcitx-im group. If using Fcitx5, install fcitx5-im.

Changing the default file browser

Telegram Desktop uses the File Manager DBus Interface to open the file browser. The spec does not allow to choose the preferred one, ensure you have only one file browser installed.

Do not confuse file browsers with file dialogs which are parts of toolkits and is covered by #File chooser style.

See also