Why did I choose Linux mint 21.1 “Vera“? Mint installation optimization and tuning guide (resolution DPI, theme beautification)

Preface: Why Mint

The author is an old Linux user. As a back-end developer, I have tried many different distributions.

  • It started with the Arch system like Manjaro, but it was too unstable for development; many conflicts had to be resolved for each rolling update. Not suitable for productivity (I am too good at controlling it)
  • Fed up with Arch, I switched to Ubuntu again. This time the experience was much better. However, after I changed to a new machine, Ubuntu’s hardware adaptation at the time (my AMD Ryzen processor) was not suitable and I had to install it. Bluetooth also requires configuring wifi drivers, etc., and the compatibility is relatively poor.
  • Then the author fell into the arms of the domestic Deepin. You can read the author's previous article: Deepin System Optimization and Tuning Guide (touchpad, wifi, power consumption optimization, zsh). It should be said that the adaptation of deepin is quite good. However, although DDE is cool, the resources occupied by the desktop environment are too high. Every time I open the development tool Family Bucket, the good guy looks at the memory and basically eats up all of it. Moreover, DDE's desktop is slightly less customizable and not as stable as other distributions.

In the end, I chose the Mint operating system, which takes into account hardware compatibility and system stability; it is suitable for long-term use as a production tool.

The differences between various Mint distribution versions

Open the download interface of the official website: https://www.linuxmint.com/download.php

There will be three different environment options. The author's core requirement is a stable production tool, so I comprehensively compared various versions and chose Xfce. As its introduction:

Light, simple, efficient
Xfce Edition
Xfce is a lightweight desktop environment. It doesn’t support as many features as Cinnamon or MATE, but it’s extremely stable and very light on resource usage.

Light, simple and efficient!

And the appearance is not bad either! Look directly at the picture:

Insert image description here

Insert image description here

The most intuitive feeling Mint gives me is that it is fast, smooth and stable. Very suitable for productivity!

Post-installation optimization guide:

1 The most troublesome high resolution (DPI)

If you have a high-resolution screen (the author’s screen is 2880*1800), some software will have resolution mismatches. The following introduces the resolution adjustment of commonly used software:

1.1 deepin-wine resolution adaptation

First find a way to install deepin-wine wechat

Then execute the following command to adjust the resolution of wechat:

WINEPREFIX=~/.deepinwine/Deepin-WeChat deepin-wine6-stable winecfg

If the system does not recognize the command: deepin-wine6-stable, then download and install the deepin-wine6-stable again. Just use Baidu yourself. There is a suggested link below to download:
https://zhuanlan.zhihu.com/p/428273631

Just download the tar package directly

1.2 IDEA Community Edition resolution adaptation

Double-click shift and find the file idea64.vmoptions:

Insert image description here

Then add the following configuration to this file:


-Xmx1730m
-Dsun.java2d.uiScale.enabled=true
-Dide.ui.scale=2.0
-Dsun.java2d.uiScale=1.99
-Didea.is.internal=true

Then configure as follows:

Insert image description here

font is set to 30

Finally configure the font. You're done! !

1.3 VS Code space indent size configuration

As shown in the figure below, add the following line:

'Droid Sans Mono', 'monospace', monospace

Insert image description here

2 Theme beautification

2.1 Theme addition and download

Open the following website, there are tons of topics:

https://www.xfce-look.org/browse/

Depending on your desktop environment, choose different theme pages. The author is XFce. Make the following selections:

Insert image description here

Then the commonly used icons and themes are selected as follows:

Insert image description here
There are many themes and icons that can be downloaded and installed. Generally speaking, you can directly clone its GitHub project,

Generally, there is an install.sh in it
(if not, go to the corresponding github to find the installation tutorial, such as the installation of nordic, directly extract the root directory to the ~/.themes folder and the installation will be successful)

Directly execute the command ./install.sh to perform the installation.

Then open System Settings -> Theme to see the installed theme! ! !

2.2 Recommended dock beautification tools (plank)

Just download and install it directly from the app store, a Mac-like application management tool

An abnormal display appears at the bottom of plank (after running the program, there is a black line on the screen) -

solution:

Search the system settings for the compositor and turn off the dock shadow:

Insert image description here

2.3 Grub beautification

Recommend a theme:

https://github.com/vinceliuice/Graphite-gtk-theme/tree/main/other/grub2

Just follow its tutorial to install it.

Rendering:

Insert image description here

3 Input method configuration

First of all, Linux Mint is pre-installed with Fcitx5, which is equipped with a default input method, which is not easy to use.

Sogou does not support Fcitx5. You need to uninstall the preinstalled Fcitx5 and reinstall Fcitx. To uninstall and reinstall, just use the apt-get command and search by yourself.

Then switch the engine to Fcitx in the input method settings:

Insert image description here

Then follow the official Sogou tutorial below to install Sogou Pinyin:

https://shurufa.sogou.com/linux/guide

3.2 Input method configuration

If the above input method configuration does not take effect, it is most likely due to a version problem. It just doesn't support a certain version of Sogou Pinyin.

Solution: Install a specific Sogou Pinyin input method version:
sogoupinyin_4.0.0.1605_amd64.deb

Although it will show that the installation failed (missing software package), you will find that the installation was successful after restarting the system. I don't know what's going on. If someone sees it, he can explain it.

4 Touchpad gesture configuration (touchegg)

The software touchegg can make your Linux touchpad touch experience comparable to that of MacOS. After using this software, you will never want to use a mouse again. It is highly recommended.

https://github.com/JoseExposito/touchegg

The documentation is quite clear. The general steps are to install first. To install, you need to find the Ubuntu and Debian systems:

Insert image description here

The document lets you download the deb package. Here we choose the amd64 deb package:

Insert image description here
Execute command: sudo apt install ./touchegg_2.0.13_amd64.debinstall the deb package

Then start the touchegg service:systemctl start touchegg.service

Finally, download the visual interface from the Mint official software store: touche

You can visually configure touche gestures! As shown below:

Insert image description here

5 Clipboard and Snipping Tools

Install gpaste and set shortcut keys

gpaste is a very useful historical clipboard function.

The startup command of gpasteui is:
/usr/libexec/gpaste/gpaste-ui

Then you can set the shortcut keys:

Insert image description here

The final effect is: press super+v to bring up the system clipboard!

Screenshot tool (flameshot)

Just download and install it directly from the official Mint software manager

The following focuses on how to configure one-click shortcut keys:

Go to Mint main settings -> Keyboard and add shortcut key commands as shown below:

Insert image description here

The following command is a direct screenshot of flameshot:

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/flameshot org.flameshot.Flameshot gui

How to view the startup command of a file:

Default shortcut key: super+r to jump out of the application finder:

Insert image description here

6 Shell script implements SSH to automatically enter password to log in to the server

Reference article:

https://blog.csdn.net/weixin_40930677/article/details/103077919

The author's configuration:
Insert image description here

Insert image description here

7. Easy-to-use terminal: zsh

  • Install zsh and themes

This is the domestic link. The foreign link has been down. This is the script for installing zsh in China.

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh && chmod 777 install.sh && ./install.sh

https://www.cnblogs.com/nangec/p/12788868.html
Insert image description here
Insert image description here

  • See the previous article for how to install the zsh plug-in, but you must first open the comments before you can copy the previous article without thinking (the path cannot be changed):

Insert image description here

  • Manually clone and install oh-my-zsh (if your automatic download of oh-my-zsh fails)
    https://www.jianshu.com/p/9df4bc46429a

  • Set a random zsh theme:
    vim ~/.zshrc, and then set it to random

    Insert image description here

Configure zsh alias (alias)

Global configuration alias:

vim ~/.bashrc
If you use zsh, you also need to modify the zsh configuration file. Just let zsh inherit bashrc:
vim ~/.zshrc
Then let zsh inherit the configuration file of ~/.bashrc (add the following line to the zsh configuration file):
source ~/.bash_profile

To make the changes take effect:
source ~/.bashrc
source ~/.zshrc

Finally log out or restart to take effect.

8 Power management

The power consumption problem of Linux will never be better than that of Win. We can only make it consume as little power as possible through local optimization.

installtlp

sudo apt install tlp tlp-rdw

start up:sudo tlp start
systemctl start tlp.service

Check the tlp service status:systemctl status tlp.service

TLP can also be configured in more detail, you can Baidu here. I just used the default configuration here.

Finally, add a line of alias: alias powersave="sudo tlp start && systemctl start tlp.service", and enter powersave every time the power is disconnected to save power.

Tested battery life

After the above settings, my Yoga14s (AMD Ryzen) can last for 5.5h under light office conditions (browser + markdown writing + WeChat chat)

Under the same office conditions as Windows, it can last 6H. Linux can do this, which is already a great progress.

If it is code development, it is estimated that the battery life will be shortened a lot.

9 scrcpy: Mirror Android phone to Linux computer

Install:

sudo apt install scrcpy

Usage: Reference article:

https://blog.csdn.net/zhf_sy/article/details/126221983

postscript

That’s about it. If I fiddle with other configurations later, I will update this article one after another. Welcome to collect.

Guess you like

Origin blog.csdn.net/weixin_44757863/article/details/129188336