跳至內容

Telegram

出自 Arch Linux 中文维基

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

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

安裝

[編輯 | 編輯原始碼]

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

聊天軟體的插件

[編輯 | 編輯原始碼]

圖形界面

[編輯 | 編輯原始碼]

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

三方客戶端:

  • Kotatogram Desktop — Kotatogram Desktop 基於 Telegram Desktop,具有 Telegram Desktop 的所有功能,但也有一些更實用、更美觀的功能。
https://kotatogram.github.io/ || kotatogram-desktopAUR 或者 kotatogram-desktop-binAUR

終端客戶端

[編輯 | 編輯原始碼]
  • Telegram messenger CLI — Telegram 的命令行界面,使用 readline 界面。
https://github.com/vysheng/tg || telegram-cli-gitAUR
https://github.com/Nanoseb/ncTelegram || nctelegram-gitAUR
  • tg — Telegram 終端客戶端。
https://github.com/paul-nameless/tg || telegram-tgAUR
  • telegram-send — Telegram-send 不是完整的客戶端,是一款命令行工具,用於通過 Telegram 向帳戶、群組或頻道發送消息和文件。 它提供了一個簡單的界面,可以方便地從其他程序中調用。
https://github.com/rahiel/telegram-send || python-telegram-sendAUR
  • nchat — nchat 是一款基於終端的聊天客戶端,適用於 Linux 和 macOS,支持 Telegram 和 WhatsApp。
https://github.com/d99kris/nchat || nchat-gitAUR
  • telega.el — GNU Emacs Telegram 平台的全功能非官方客戶端。
https://github.com/zevlg/telega.el || 此軟體並不在 AUR
  • TelegramTUI — 基於 Python 的 TUI telegram
https://github.com/vtr0n/TelegramTUI || 此軟體並不在 AUR 中,你可以通過 pipx install telegramtui 安裝

基於網頁的客戶端

[編輯 | 編輯原始碼]

提示和技巧

[編輯 | 編輯原始碼]

在 Telegram 中使用 GTK 對話框

[編輯 | 編輯原始碼]

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

Telegram 桌面中的 KDE 對話框

[編輯 | 編輯原始碼]

如果想使用 KDE 文件對話框來代替 Qt 對話框,請將環境變量 QT_QPA_PLATFORMTHEME 設置為 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 自 3.4.2-2 版本起已遷移至基於 Qt 6 構建。從舊版本升級的用戶可能會發現 Fcitx 輸入法在此應用中停止工作。要恢復功能,請安裝 fcitx-qt6 軟體包或 fcitx-im包組 軟體包組。若使用Fcitx5輸入框架,則應安裝 fcitx5-im包組 軟體包組。

Changing the default file browser

[編輯 | 編輯原始碼]

在未設置 XDG_CURRENT_DESKTOP 環境變量的環境中(如不運行桌面環境,即僅運行窗口管理器時),telegram-desktop 會退回到非常基本的文件瀏覽器。 使用上述變量,用戶可以將默認瀏覽器更改為自己喜歡的、屬於特定桌面環境的瀏覽器。 該變量的有效值可以在這裡找到。 例如,使用 XFCE 項目中的Thunar

XDG_CURRENT_DESKTOP=XFCE telegram-desktop

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

[編輯 | 編輯原始碼]

參見

[編輯 | 編輯原始碼]