Manjaro Linux Setup
Install
- partition esp partition
1
2
3
4
5
6
7NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 400M 0 part /boot/efi
...
├─nvme0n1p5 259:5 0 258G 0 part
│ └─luks-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 254:0 0 258G 0 crypt /
...nvme0n1p1
mount on\boot\efi
, while the root system installed on crypted partitionnvme0n1p5
with LUKSv1. Replace block names according to actual situation of your computer.
System modification
Before start, make an upgrade for the whole system.
1 | sudo pacman -Syu |
Repository
- Change server location: China
- Add archlinuxcn Repository at the end of file.
1
2
3
4sudo echo >> /etc/pacman.conf "
[archlinuxcn]
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
" - Enable flatpak and AUR in "Add / Remove Software" setting.
- Install yay tool for more comfortable package
management experience.
1
sudo pacman -S yay
Shell
Install
oh-my-zsh-git
from archlinuxcn repository with the latest code.After installing the package, copy1
yay -S archlinuxcn/oh-my-zsh-git
.zshrc
from system to home directory.Add the following code to the end of1
cp /usr/share/oh-my-zsh/zshrc ~/.zshrc
.zshrc
for original manjaro shell experience.At last, make some small modification, install autojump plugin.1
2
3
4
5
6
7
8
9
10# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt
fimodify the .zshrc file.1
yay -S autojump
then, change shell to zsh.1
plugins=(git autojump)
1
chsh -s /bin/zsh
sudo without password add this line at the end of file
/etc/sudoers.d/10-installer
1
sudo echo %wheel ALL=(ALL:ALL) NOPASSWD: ALL >> /etc/sudoers.d/10-installer
GPU Switch
Use envycontrol to switch intel, nvidia, and hybrid mode.
1 | yay -S envycontrol |
In addition, a kde plasma5 widget can be convenient.
1 | yay -S plasma5-applets-optimus-gpu-switcher |
Fonts
Install several fonts both in Latin and Chinese.
1 | yay -S wqy-microhei-lite wqy-bitmapfont wqy-microhei wqy-zenhei ttf-roboto adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts |
Install ttf-apple-emoji
to replace original
noto-fonts-emoji
1 | yay -S ttf-apple-emoji |
Make system custom font configuration to enable apple color emoji and change preferred Chinese fonts.
1 | sudo touch /etc/fonts/local.conf |
Paste following code into local.conf
.
1 |
|
Command
Install some very useful and common tools.
1 | yay -S zip net-tools base-devel nmap vulscan python-pypandoc |
1 | yay -S cowsay xcowsay sl asciiquarium fortune-mod cmatrix oneko toilet lolcat |
Appearance
Install latte dock
1 | yay -S latte-dock |
Change the desktop layout:
- move panel from bottom to top;
- add widgets into panel: Application Launcher, Global menu, Panel Spacer, Network speed, CatWalk, System tray, Pager, Digital clock, Peek at Desktop.
- add latte dock at bottom of desktop with widgets: Application Dashboard, Latte Tasks, Trashcan, Analog clock.
- add a weather widget right side the desktop.
For widgets configuration, CatWalk idle threshold is 30%, weather location is Tianjin, China. For latte dock, Items absolute size is 56px., zoom on hover is 10%, background size is 14%, and Opacity is 52%.
swapfile
The system has no swap partition after default installation process, for the full suspend and hibernation function experience, we setup swap manually.
Create a swap file matched the physical memory and set proper permissions.
1 | sudo fallocate -l 8G /.swapfile # create a hide swapfile on root / |
Enable and open swap
1 | sudo mkswap /.swapfile |
Insert swap info into fstab
1 | sudo echo "/.swapfile none swap defaults 0 0" >> /etc/fstab |
Reboot and check if the swap on
1 | swapon |
Samba
In Dolphin, the property share tab is unavailable because of samba service broken. Now we fix it.
1 | yay -S samba |
Add following text into smb.conf (in order to prevent bugs, add a blank line at the end of file.)
1 | [global] |
then reboot.
Attention: it seems like there are many bugs in property share tab.
Firewall
A Firewall and Firewall GUI manager is optional for network using.
1 | yay -S firewalld |
SSD trim
Trim is referred to discard unused blocks on the SSD. Trim on encrypted device has specific security risks, but for most users, the benefit of TRIM outweigh those security concerns.
1 | sudo cryptsetup --allow-discards --persistent refresh luks-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
Java environment
In order to run jar application such as minecraft, Java environment is required. we can install OpenJDK environment with JavaFX support.
1 | yay -S aur/java-openjfx # jre and jdk will be installed as dependencies automatically |
Install and config application
git
add lfs support
1 | yay -S git-lfs |
config username and e-mail.
1 | git config --global user.name "My Name" |
Internet Technology
there are many useful packages in repository.
1 | yay -S archlinuxcn/*****-verge-rev-bin watt-toolkit-bin |
fcitx5 and rime
Install fcitx5 bundle including 4 packages:
- fcitx5 2) fcitx5-configtool 3) fcitx5-gtk 4) fcitx5-qt
and other extra packages
1 | yay -S fcitx5-im fcitx5-lua kcm-fcitx5 fcitx5-rime fcitx5-chinese-addons libime manjaro-asian-input-support-fcitx5 rime-symbols |
then reboot to apply modify.
clone clover_flypinyin to local
1 | git clone https://github.com/happylzyy/rime-cloverpinyin.git |
follow the README.md
to build the package.
extract package to /usr/share/rime-data
and replace
exsiting file.
create a config file in ~/.local/share/fcitx5/rime
1 | touch default.custom.yaml |
and write
1 | patch: |
restart the rime engine.
apparmor
install apparmor utils and enable the service.
1 | yay -S apparmor |
Add kernel cmdline as follows. This section is not suitable for grub but for UKI.
1 | mkdir /etc/cmdline.d |
1 | # enable apparmor |
vim
install gvim via yay tool.
1 | yay -S gvim |
clone the vim config to .vim folder. 1
2
3mkdir -p ~/.vim && cd ~/.vim
git clone https://github.com/happylzyy/vim-init.git
cd vim-init && git checkout linux.vimrc' in home directory and add following code
:PluginInstall`
to fix missing plugins via internet.1
echo source ~/.vim/vim-init/init.vim > .vimrc
typora
the last free version of typora is 0.11.18(beta), we can build it by using AUR PKGBUILD.
1 | yay -S aur/typora-free |
albert
1 | yay -S archlinuxcn/albert |
Open System Setting -> Startup and Shutdown->Autostart, add albert in autorun list.
Attention: albert has no wayland support yet.
WPS
Install wps and all dependencies including chinese language support, font packages, and several fix patch, etc.
1 | yay -S wps-office wps-office-all-dicts-win-languages wps-office-mui-zh-cn wps-office-mime-cn wps-office-fonts wps-office-bwrap freetype2-wps ttf-wps-fonts ttf-ms-fonts |
install bug fix libtiff5
1 | yay -S libtiff5 |
GIMP
1 | yay -S gimp |
Make GIMP Look Like Photoshop, follow the PhotoGIMP project.
Node.js
1 | yay -S nodejs npm |
configure local repository
1 | npm config set registry https://registry.npmmirror.com/ |
OneDrive
As some files synced on onedrive, we install onedriver and create some links
1 | yay -S onedrive-abraunegg onedrivegui |
Other app without configuration
1 | yay -S steam stellarium visual-studio-code-bin zenmap wechat-beta-bwrap lx-music-desktop-bin calibre zotero kleopatra |