来自 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 群组和频道

参见