Archlinux优化

1 问题处理

1.1 Dolphin文件管理访问win分区无法写

关闭win10系统的快速启动功能,默认开启后会设置分区保护。

1.2 Archlinux修复GRUB引导

使用archlinux U盘工具,修复GRUB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 查看分区情况 
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
├─nvme0n1p2 259:2 0 128M 0 part
├─nvme0n1p3 259:3 0 97.7G 0 part
├─nvme0n1p4 259:4 0 687M 0 part
├─nvme0n1p5 259:5 0 187.1G 0 part /run/media/zhaohuan/EFF4FD736019A612
├─nvme0n1p6 259:6 0 115.9G 0 part /home
└─nvme0n1p7 259:7 0 75.1G 0 part /

# 挂载分区到原有位置
mount /dev/nvme0n1p7 /mnt
mount /dev/nvme0n1p6 /mnt/home
mount /dev/nvme0n1p1 /mnt/boot/efi
# 挂载下列分区,否则识别不到块设备,造成grub-install失败
mount --rbind /dev /mnt/dev
mount --rbind /proc /mnt/proc
mount --rbind /sys /mnt/sys
# 以/mnt为根目录
chroot /mnt
grub-install /boot
grub-mkconfig -o /boot/grub/grub.cfg

1.3 解决wine系应用无法输入中文

如:微信、wps、Tim等

解决办法:在应用启动文件内加上如下代码

1
2
3
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"

参考:https://blog.csdn.net/qq_40893238/article/details/105341832

1.4 KDE添加右键新建模板

参考:https://blog.csdn.net/pswzyu/article/details/84022715

/usr/share/templates目录新建 .desktop文件。

示例1 wps-word.desktop,文件内容如下:

1
2
3
4
5
6
7
[Desktop Entry]
Encoding=UTF-8
Name=WPS文档
Comment[zh_CN]=WPS文档
Type=Link
URL=/home/zhaohuan/模板/WPS文档.docx
Icon=wps-office2019-wpsmain

URL指向模板文件的位置,模板文件自己创建。Icon去应用属性里面查名称。

示例2 shell.desktop文件内容如下:

1
2
3
4
5
6
7
[Desktop Entry]
Encoding=UTF-8
Name=新建脚本
Comment[zh_CN]=新建脚本
Type=Link
URL=.source/script.sh
Icon=konsole

效果

image-20221027215304064

1.5 Arch切换内核

参考文档

1
2
3
4
5
6
7
8
# 安装新内核
sudo pacman -S linux-lts linux-lts-headers
# 修改grub文件
sudo vim /etc/default/grub
# 重新生成GRUB配置文件
sudo grub-mkconfig -o /boot/grub/grub.cfg
# 重启
reboot

image-20221104223026216

2 软件

2.1 KDE connect

手机和PC连接工具。

PC端

1
sudo pacman -S kdeconnect

手机端

1
# 安装kde-connect,通过F-droid商店的版本支持短信功能

2.2 pamac商店(manjaro默认商店)

1
sudo pacman -S pamac

2.3 微信

UOS版本功能少,不能截图,不能复制截图到输入框

1
2
3
4
5
# 安装微信uos版本,功能简单,BUG少
yay -S wechat-uos
# 安装scrot,提供微信截图功能
yay -S scrot
# 修改wechet-uos.desktop文件,修改StartWMClass=weixin

image-20221025135841878

com.qq.weixin.deepin版本,能截图,版本适中,非最新,最稳定(推荐)

1
yay -S com.qq.weixin.deepin

2.4 钉钉

1
yay -S dingtalk-bin

2.5 wps

1
yay -S wps-office-cn wps-office-mui-zh-cn

2.6 迅雷

1
yay -S xunlei-bin

2.7 Edge

1
yay -S microsoft-edge-stable-bin

2.8 向日葵

1
yay -S sunloginclient

2.9 Visual code

1
yay -S visual-studio-code-bin

2.10 xmind

1
yay -S xmind

2.11 信使

1
yay -S iptux

2.12 apper

1
2
# KDE application管理工具
sudo pacman -S apper

2.13 Ark

1
2
3
# 可视化压缩工具
sudo pacman -S ark
# 同步安装各种压缩工具

2.14 fcitx5

1
sudo pacman -S fcitx5 fcitx5-pinyin-zhwiki fcitx5-chinese-addons

参考:https://blog.csdn.net/HideOnLie/article/details/107615277

2.15 火焰截图

1
sudo pacman -S flameshot

2.16 Psensor

1
2
# 温度监控
sudo pacman -S psensor

2.17 remmina

1
2
3
sudo pacman -S  
# vnc rdp扩展
sudo pacman -S libvncserver freerdp

2.18 simplescreenrecorder

1
2
# 录屏工具
pacman -S simplescreenrecorder

2.19 yakuake

1
2
# 下拉终端
pacman -S yakuake

2.20 axel

1
2
# 多线程下载工具
pacman -S axel

2.21 bat

1
2
# 比cat好用
pacman -S bat

2.22 debtap

1
2
# deb包安装工具
pacman -S debtap

2.23 downrade

1
2
3
4
# 历史版本软件安装
pacman -S downgrade
# 示例
sudo downgrade linux

2.24 openvpn

1
sudo pacman -S openvpn networkmanager-openvpn

2.25 FileZilla

1
pacman -S filezilla

2.26 redis manager

1
pacman -S resp-app

2.27 drawio

1
2
# 画拓扑图工具
pacman -S drawio

2.28 VMware Workstation

1
pacman -S vmware-workstation

2.29 typora

下载历史免费版本deb包,使用debtap安装。

2.30 foxit reader

1
2
# 福晰阅读器
pacman -S foxitreader

2.31 网易云音乐

1
yay -S netease-cloud-music

调整缩放

1
vim /usr/share/applications/netease-cloud-music.desktop

image-20221028225637416

2.32 navicat

https://github.com/lzscxb/navicat-keygen

备注:这个地址下载的包都是编译好的及修改好的包,可以直接使用激活。

2.33 mycli

1
2
# myql连接客户端,和mysql用法一样,自带命令补全
pacman -S mycli

2.34 zsh

1
2
# 必装
pacman -S zsh

oh-my-sh

必装插件:

1
2
3
4
# zsh-syntax-highlighting  语法高亮,错误语法显示红色
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestions 自动补全
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

3 省电优化

1
2
3
4
5
6
7
8
9
10
11
12
yay -S tlp tlpui
# tlp电源管理配置文件 /etc/tlp.conf
---
# 控制电池充电阀值
# 参考https://linrunner.de/tlp/settings/bc-vendors.html#supported-hardware
# 1 - 电池充电至60%
# 0 - 电池充电至100%,电池节省模式关闭
START_CHARGE_THRESH_BAT0=0 # dummy value
STOP_CHARGE_THRESH_BAT0=0
---
# 其他优化使用tlpui可视化调整
# tlp配置参考:https://linrunner.de/tlp/settings/processor.html

image-20221025141903557

image-20221025141934699

4 系统优化

4.1 关闭系统关机告警音

1
2
# 修改/etc/modprobe.d/nobeep.conf
blacklist pcspkr

https://wiki.archlinux.org/title/Kernel_module_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

image-20221025152849070

-------------本文结束感谢您的阅读-------------
坚持原创技术分享,您的支持将鼓励我继续创作!