出自 Arch Linux 中文维基

Telegram 是一種基於雲的跨平台即時消息服務,具有可選的端到端加密。創建帳戶需要手機號。

官方客戶端是開源的,但最新版本的代碼並不總是立即發布。伺服器端代碼是專有的。

安裝

在 Arch Linux 上,你可以這樣使用 Telegram:

聊天軟體的插件

圖形界面

telegram-desktop 提供了官方桌面版客戶端

三方客戶端:

終端客戶端

基於網頁的客戶端

提示和技巧

在 Telegram 中使用 GTK 對話框

如果你想要使用 GTK 對話框來代替 Qt 對話框,將 QT_QPA_PLATFORMTHEME 環境變量設置為 gtk3

KDE dialogs in Telegram Desktop

If you want to use KDE file dialogs instead of Qt ones, set QT_QPA_PLATFORMTHEME environment variable to xdgdesktopportal.

使用 SVG 圖標主題

如果您想使用基於 SVG 圖像的圖標主題 (e.g. papirus-icon-theme),請安裝 qt5-svg。參見 Qt#Icon theme is not applied

Wayland 支持

參見 Wayland#Qt

Telegram Desktop 中的 xdg-open

如果你想在 t.me 連結上使用 xdg-open 並收到一個錯誤,找不到 tg 的處理程序:

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

如果獲得以下錯誤信息:

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

安裝 realtime-privileges,並添加您自己到 realtime 用戶組並重啟。參見Realtime process management#Configuring PAM

HiDPI 縮放

如果系統啟用了 Qt 縮放,且縮放比例不是整數,你可能遇到圖片和圖標出現馬賽克的問題。此時可能需要單獨針對 Telegram 關閉高 DPI 縮放

/usr/share/applications/telegramdesktop.desktop 複製到用戶特定應用程式目錄下,並像這樣編輯:

$HOME/.local/share/applications/telegramdesktop-no-scaling.desktop
...
Exec=env -u QT_SCREEN_SCALE_FACTORS telegram-desktop -- %u
...

您可能需要更新桌面項目資料庫

音頻後端

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.

選擇正確的攝像頭

Telegram 版本 3.7.1 不允許切換用於視頻會議的攝像頭。如果要強制 telegram 使用其他攝像頭, 可以禁用不需要的攝像頭,參見 https://askubuntu.com/a/166819

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

On environments where the 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 here. For example to use Thunar from the XFCE project:

XDG_CURRENT_DESKTOP=XFCE telegram-desktop

Arch Linux 中文社區的 Telegram 群組和頻道

參見