Arch Linux 安裝應用

安装输入法

1. 安装输入法Fcitx5(推薦)

sudo pacman -S fcitx5-im #基础包组
sudo pacman -S fcitx5-material-color #主题
sudo pacman -S fcitx5-rime #rime输入法引擎

设置环境变量 编辑文件 sudo vim /etc/environment 加入以下内容
此配置在KDE Plasma 5.27有变化,祥见

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
SDL_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
MOZ_ENABLE_WAYLAND=1

配置輸入法列表:~/.local/share/fcitx5/rime/default.custom.yaml

patch:
  switcher/hotkeys:
    - "Control+grave"  # 僅保留 Ctrl+` 喚醒輸入方案選單
    # - "F4"           # 註釋掉或刪除此行以禁用F4
  menu/page_size: 5           # 設置候選字數量
  schema_list:
    - schema: luna_pinyin   # 輸入法
  switches:
    - name: simplification
      reset: 0  # 默認繁體字

配置皮肤文件:%APPDATE%\Roaming\Rime\weasel.custom.yaml
注意:此文件在windows下有效,Arch Linux下在Input Method->Configure addons 里设置

# weasel.custom.yaml
patch:
  "style/horizontal": false     # 候選橫排
  "style/font_face": "Source Han Mono SC"  # 字體名稱,從記事本等處的系統字體對話框裏能看到
  "style/font_point": 14     # 字號,只認數字的,不認「五號」、「小五」這樣的
  "style/color_scheme": plasma

~~配置皮肤文件,位置: /.config/fcitx5/conf/classicui.conf~

# 以下廢棄
# 横向候选列表
Vertical Candidate List=True

# 禁止字体随着DPI缩放,避免界面太大
PerScreenDPI=False

# 字体和大小,可以用 fc-list 命令来查看使用
Font="Source Han Mono SC 10"

# 默认蓝色主题
Theme=plasma

chrome 浏览器配置:~/.config/chromium-flags.conf
edge 浏览器配置 :~/.config/microsoft-edge-stable-flags.conf

--ozone-platform=wayland
--enable-wayland-ime
--enable-features=VaapiVideoDecodeLinuxGL

进入系统设置里,添加输入法,搜索rime,添加即可。
可以在“配置附加组件”,找到“经典用户界面”配置属性

注销linux用户,再登录即可使用

Fcitx5
配置Fcitx5输入法

2. 安装输入法 ibus-rime

  1. 安装ibus软件包
$ sudo pacman -S ibus
  1. 查看所有可用的输入法
$ sudo pacman -Ss ^ibus-*
  1. 选择一个可用的输入法引擎并安装
$ sudo pacman -S ibus-rime
  1. 运行ibus
$ ibus-setup
  1. 在弹出框中的input method中加入rime

  2. 在$HOME/.bashrc中加入下面内容

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
  1. 若开启不自动启动ibus,需要创建文件$HOME/.xprofile,添加以下内容
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -x -d

注意

1. rime候选字号太小,没办法调rime的,只能调ibus的

找到~/.config/gtk-3.0/gtk.css文件,加入下面一段内容即可

@import 'colors.css';

# 加入下面内容
#IBusCandidate *
{
    font: IPAPGothic 20;
}

运行windows应用

$ sudo pacman -Syu //同步本地源
$ sudo pacman -S wine winetricks wine-mono wine_gecko //安装

$ wine path/to/application.exe //运行

$ winecfg //配置

若运行exe出问题时,去WineHQ网站的AppDB中查找此应用,看HowTo/Notes记录,安装需要的组件或字体

Install Wine on Manjaro
5 Tools to Help You Run Windows Programs in Linux

electron-xxx 配置后无法上网

安装:下载 electron-xxx-x.x.x.pacman 文件,用命令:pacman -U xx.pacman 安装

原因:只需要在SwichyOmega中设置一个SOCKS5(127.0.0.1:1080),其他HTTP等使用此SOCKS5代理即可,不要设置HTTP等

参考:https://bbs.archlinuxcn.org/viewtopic.php?id=5291 (9楼的回答)

信号配置

Windows

创建xx.bat

    @echo off
    set HTTP_PROXY=http://<proxy>:<port>/
    set HTTPS_PROXY=http://<proxy>:<port>/
    start xx\xx.exe
Linux

/usr/share/applications/xx-desktop.desktop

[Desktop Entry]
Type=Application
Name=xx
Comment=xx - Private Messenger
Comment[de]=xx- Sicherer Messenger
Icon=xx-desktop
Exec=/opt/xxl/xx-desktop.sh
Terminal=false
Categories=Network;InstantMessaging;
StartupWMClass=xx
MimeType=x-scheme-handler/sgnl;
Keywords=sgnl;chat;im;messaging;messenger;sms;security;privat;
X-GNOME-UsesNotifications=true

/opt/Signal/signal-desktop.sh

#!/bin/sh
 
export http_proxy=http://<proxy>:<port>
export https_proxy=http://<proxy>:<port>
xx-desktop

注意:manjaro不要在favorites的图标打开,要在子图标组(Internet)中的图标打开才有效

参考

安装TIM,QQ和We*Chat的显示分辨率

安装

# yay -S deepin-wine-we*chat #已不好用,改用weixin.spark
# yay -S com.qq.weixin.spark #弃用
yay -S wechat-universal-bwrap 
#yay -S linuxqq # 弃用,用bwrap版
yay -S linuxqq-nt-bwrap 
yay -S deepin-wine-tim 
  • 用下面命令调出对话框,在Graphics标签页下将Screen resolution的值改成125dpi,当用的deepin-wine6时,改deepin-wine5为deepin-wine6-stable
  • tim要设置为xp,we*chat高于windows7
env WINEPREFIX="~/.deepinwine/Deepin-WeChat" /usr/bin/deepin-wine5 winecfg

env WINEPREFIX="~/.deepinwine/Deepin-TIM" /usr/bin/deepin-wine5 winecfg

env WINEPREFIX="~/.deepinwine/Spark-WeChat" wine winecfg 

spark weixin 中文显示方块问题
下载微软雅黑字体,将字体文件微软雅黑粗体.ttf(Microsoft-Yahei-Bold.ttf),微软雅黑.ttf(Microsoft-Yahei.ttf)复制到~/.deepinwine/Spark-weixin/drive_c/windows/Fonts目录,重新打开

spark weixin分辨率
~/.deepinwine/Spark-weixin/scale.txt内可用的缩放选项为: 1.0,1.25,1.5,1.75,2.0 在4k分辨率下2.0依然很小,可以修改 /opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh 文件中以下部分,修改为需要的dpi,我把2.0修改为240,体验很好。

安装qBittorrent

安装加强版qbittorrent-enhanced-git

yay -S qbittorrent-enhanced-git

安裝PeerBanHelper

自动封禁不受欢迎、吸血和异常的 BT 客户端,并支持自定义规则。

  1. 安裝:
yay -S peerbanhelper
# 启动并设置开机自启
sudo systemctl enable --now peerbanhelper

# 查看运行状态:
sudo systemctl status peerbanhelper

# 若要停止并取消开机自启:
# sudo systemctl disable --now peerbanhelper
  1. 啓用qbittorrent的 WebUI,參見peerbanhelper文檔

  2. 在 PeerBanHelper 中添加 qBittorrent 下载器
    打開 http://localhost:9898/dashboard
    進入peerbanhelper面板,
    按照步驟設置,配置時打開qBittorrent,
    詳細配置參見peerbanhelper文檔

  3. 连接 BTN(更好的黑名單封禁效果)
    連接 Sparkle 的BTN 服务器,參見文檔

配置黑名单(推薦使用PeerBanHelper)

关于peer_blacklist.txt等文件的存放位置

Windows: %LocalAppData%\qBittorrent
Linux: $HOME/.local/share/qBittorrent

启动qBittorrent EE后,可在日志(菜单栏中:视图 -> 日志 -> 显示)中看到如下内容

<时间戳> - 'peer_whitelist.txt' doesn't exist. The corresponding filter is disabled.
<时间戳> - 'peer_blacklist.txt' contains 2 valid rules.~~

搜索需要的Jackett(不推薦)

yay -S jackett-bin # 安装jackett
sudo systemctl enable --now jackett #启动服务,加入开机启动

打开 http://127.0.0.1:9117 ,进入jackett配置,复制API Key,写入jackett.json文件

cd ~/.local/share/qBittorrent/nova3/engines
vim jackett.json # 写入api key

{
    "api_key": "xxxx",
    "tracker_first": false,
    "url": "http://127.0.0.1:9117"
}

完成,可以进入http://127.0.0.1:9117增加搜索引擎

使用qBittorrent+Jackett打造一站式资源搜索+下载神器
请问如何启用Peer 白名单/黑名单

posted @ 2026-05-26 20:55  jokerpoker  阅读(13)  评论(0)    收藏  举报