@czyczk
2021-01-26T12:20:45.000000Z
字数 5930
阅读 1368
Linux
Manjaro_Linux
本来以为没什么坑的,现在看来要开这篇文了。
yaourt
已被列为不安全,可使用 yay
(yet another yaourt)做替代。
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
搜索 yay -Ss <package-name>
。
安装 yay -S <package-name>
,避免重复安装已装的包用在后面加 --needed
。
删除应用 pacman -Rcsn <package-name>
。
卸载后移除无用依赖:yay -Rsn $(yay -Qdtq)
。
包管理器推荐列表:
https://linux.cn/article-9925-1.html
移除无用依赖:
https://bbs.archlinux.org/viewtopic.php?id=57431
https://docs.snapcraft.io/installing-snap-on-manjaro-linux
主要问题有两个:共享剪贴板不能用、共享文件夹不会自动挂载到 /mnt/hgfs
(但是通过 vmware-hgfsclient
是可以看到的)。
https://wiki.manjaro.org/index.php?title=VMware
https://wiki.archlinux.org/index.php/VMware/Installing_Arch_as_a_guest#Drag_and_drop.2C_copy.2Fpaste
这两篇提到,剪切板依赖于 gtkmm3
但是默认没有装。装上就好了。
yay -S gtkmm3
如果经上面的修复剪贴板可用则 VMware Tools 没问题,而且如果 vmware-hgfsclient
能看到启用的文件夹名称,那就一定是映射方面出错了。
在虚拟机运行下,禁用并重开共享文件夹可破。
还有问题尝试手动映射(未验证):
mount -t vmhgfs .host:/ /mnt/hgfs
编辑 /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
或 /etc/systemd/system/multi-user.target.wants/open-vm-tools.service
。哪个有改哪个。
在 [Unit]
节的最后加上这两行:
Requires=graphical.target
After=graphical.target
下次登录可生效。若要立即生效,可运行:
sudo systemctl daemon-reload
sudo systemctl restart vmtoolsd
(也可能是 sudo systemctl restart open-vm-tools
)
https://wiki.archlinux.org/index.php/HiDPI
这里说得很清楚了,不多赘述。
其他一些软件例如火狐等会读取 GTK 那边的设置,安装一个 dconf-editor
在其中 org/gnome/desktop/interface
下的 text-scaling-factor
来调整。
QT_SCALE_FACTOR
调整字体的 DPI。
QT_SCREEN_SCALE_FACTORS
调整窗口大小。
所以一套完整的运行操作是:
export QT_SCALE_FACTOR=2
export QT_SCREEN_SCALE_FACTORS=1
netease-cloud-music
那么对付开始菜单里的启动项就是编辑这个项目,在 command
中写:
export QT_SCALE_FACTOR=2 && export QT_SCREEN_SCALE_FACTORS=1 && netease-cloud-music %U
https://wiki.archlinux.org/index.php/HiDPI#Qt_5
基本的字体设置参考另一篇关于 Linux Mint 的配置。
由于还是有一些软件默认读取 GTK 中的设置,因此需要用 dconf-editor
在 org/gnome/desktop/interface
中寻找相关项进行调整。
感谢华硕 GL522JX 系列屏幕在没有颜色校正下屎一样的表现,超过四年的时间一直以为在 Linux 下是没救的,结果在给 Windows 用的某驱动/机型附加程序中发现了 ICC 颜色校正文件,那就好办了。
在 KDE 下,安装 colord-kde
后安装那个 ICC 并添加给这个屏幕,重新登录/启动(未验证)后即可。
Intel 核显单独使用 Compositor 里的 tearing prevention 完全没卵用,根据 https://forum.manjaro.org/t/how-to-solve-tearing-problem-in-kde/5267/9 中的描述,需要在 /etc/X11/xorg.conf.d
下的显卡驱动相关文件中(我的是 90-mhwd.conf
)的这段
Section "Device"
Identifier "..."
Driver "intel"
...
Option "AccelMethod" "sna"
...
EndSection
中,添加一行 Option "TearFree" "true"
,重启后解决撕裂,可如丝般柔顺。
注:同时要注意 Compositor 中的 tearing prevention 此时不可以再是 "Full screen repaints",否则画面会时不时卡顿,造成性能问题。
https://blog.martin-graesslin.com/blog/2017/02/editing-files-as-root/
这里开发者解释了以 root 打开 Dolphin 是非常不安全的,完全可能被攻击。
对于 Kate 等也是同理。
如果要编辑 root 拥有的文件,考虑 sudoedit
。
System Settings → Desktop Behaviors → Click behavior
yay -S fcitx-im
一键安装所有的 fcitx 依赖。
fcitx 的安装没什么难度,主要是之后要在 ~/.xprofile
中,
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
然后注销即可。
https://www.jianshu.com/p/1cde4b7ec3c2
非常方便,首先通过 Pacman 或 Yay 安装 powerline
和 powerline-fonts
包,然后依照 https://github.com/romkatv/powerlevel10k#installation 的 Oh My ZSH 部分解决。
https://www.lulinux.com/archives/1319
上文链接中有提到解决方案:安装 gnome-settings-daemon
,并将 /usr/lib/gsd-xsettings
加入自动启动。
手动启动一次 gsd-xsettings
或注销后,立杆见影,但是显著地会有关于 DPI 的副作用:字体 DPI 和鼠标 DPI 以及部分主题会有问题。
主题和光标部分可通过 KDE 中的主题设置来重新设置下(Application Style -> GNOME/GTK Application Style 中,使用 Breath/Breeze),使之与 KDE 主题相配。
字体 DPI 只能安装 dconf-editor
,在 org/gnome/desktop/interface
下的 text-scaling-factor
来调整。光标 DPI 暂时没有好办法,每次重新在 KDE 设置中设置成 resolution dependent。
上面一小节把系统级的 DPI 恢复了,但是 TIM 的 DPI 还是不对。
运行 env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" deepin-wine winecfg
,在里面找到 DPI 设置来调整。
https://www.lulinux.com/archives/3713
https://www.lulinux.com/archives/4642
在 KRunnerLine 中输入 kmenuedit
打开 KDE Menu Editor。
以设 Dolphin 快捷键为例,在 System -> Dolphin 中,点 Advanced。最下方就是设置快捷键。
https://askubuntu.com/questions/633010/starting-dolphin-with-shortcut-metae
Numlock 未锁定下,Shift + NumPad7 (Home) 与 Shift + NumPad1(End) 会被解释为小键盘 7 和 1。
如果要表现得和 Windows 一样,可以在系统设置的 Keyboard -> Layouts -> Advanced 中开启“Configure keyboard options”,找到其中“Miscellaneous compatibility options”分支,选中“Num Lock on: digits; Shift for arrow keys...”一项即可。
setxkbmap -option 'numpad:microsoft'
。终端里输入:
pactl list sinks
或
pacmd list-sinks
可以看到当前所有音频设备的输出规格。
如果要改位深或采样率等,打开 /etc/pulse/daemon.conf
,修改 default-sample-format
、default-sample-rate
、resample-method
等。
然后重启 PulseAudio。
pulseaudio -k
pulseaudio --restart
重新输入命令确认状态。
https://askubuntu.com/questions/868842/pros-cons-of-running-pulseaudio-at-24-bits-to-match-hardware
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Audio_quality
https://medium.com/@gamunu/enable-high-quality-audio-on-linux-6f16f3fe7e1f
现版的 PulseAudio 服务器使用 timer-based audio scheduling 而非传统的 interrupt-driven 方法,可能不适用于正在用的这个设备。解决方法就是还回去。
打开 /etc/pulse/default.pa
,找到
load-module module-udev-detect
这行,改成
load-module module-udev-detect tsched=0
重启 PulseAudio,搞定。
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitches.2C_skips_or_crackling
https://askubuntu.com/questions/1033405/crackling-and-delayed-sound-after-upgrading-to-18-04
2018 年 11 月在 KDE 上的体验建议是:不要用。
https://forum.kde.org/viewtopic.php?f=289&t=151369
使用 VS Code 或者 IntelliJ 系列的 IDE 时可能会遇到 watches 上限的问题。
Archlinux 的操作方式和 Ubuntu 略有不同,主要在于 Ubuntu 要将以下内容写入 /etc/sysctl.conf
而 Arch 系要写入到 /etc/sysctl.d/99-sysctl.conf
(或在更新版本中是 50-max_user_watches.conf
)。
fs.inotify.max_user_watches = 524288
写入完后,Ubuntu 执行
sudo sysctl -p --system
Arch 系执行(具体根据实际文件名作调整)
sudo sysctl -p /etc/sysctl.d/99-sysctl.conf
https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit