[关闭]
@czyczk 2022-04-03T14:24:06.000000Z 字数 11057 阅读 520

Things to Do after Installing Linux Mint

Linux_Mint Linux



Open SSH

/etc/ssh/sshd_config

  1. Port 2222
  2. ListenAddress 127.0.0.1
  3. PasswordAuthentication yes

sudo service ssh --full-restart or sudo service ssh start

Create a shortcut for the mapped host directories

  1. ln -s {target} {name}

Adjust interface size

DPI settings

Better with the help of dconf-editor.
Navigate to org.cinnamon.desktop.interface.text-scaling-factor. The text scaling setting always overrides the Xft.dpi setting. In the same position, cursor scaling can also be adjusted.
(Remember to apply this setting for both current user and root user. Direct run for current user and root for root user. Changes take effect immediately for current user.)

Taskbar size

Right click on the taskbar -> Panel settings

Firefox size

about:config -> layout.css.devPixelsPerPx (to values like 1.2)

For KDE

Fonts

Install fonts

font-manager
(Note: This will install fonts in the user's folder, but not system-wide. To install fonts system-wide, copy fonts directly in any folder under /usr/share/fonts.)
After installation, if you'd like to apply them system-wide, follow the instructions below:

  1. Move the fonts from ~/.fonts/Library to /usr/share/fonts/truetype/custom or any other directory within share.
  2. Some of the affected fonts may appear as random characters. Run sudo fc-cache -fv to rebuild cache and restart the affected applications.

Apply the fonts for the system in cinnamon-settings (for both current user and the root user) or skip this step and perform "font fallback settings" in the next section to apply the settings more system-wide.

Font fallback

In this section helps to customize the preferred (default) fonts for "serif", "sans-serif" and "monospace". After the operations, the generic font families will refer to the fonts specified.

Edit file fonts.conf located in /etc/fonts. Add the following contents after the match sections.

  1. <fontconfig>
  2. <match>
  3. ...
  4. </match>
  5. <!-- ↓↓↓ -->
  6. <alias>
  7. <family>serif</family>
  8. <prefer>
  9. <family>Times New Roman</family>
  10. <family>Noto Serif CJK SC</family>
  11. </prefer>
  12. </alias>
  13. <alias>
  14. <family>sans-serif</family>
  15. <prefer>
  16. <family>SF UI Display</family>
  17. <family>Microsoft YaHei UI</family>
  18. </prefer>
  19. </alias>
  20. <alias>
  21. <family>monospace</family>
  22. <prefer>
  23. <family>Sarasa Mono SC</family>
  24. </prefer>
  25. </alias>
  26. <!-- ↑↑↑ -->
  27. </fontconfig>

(For futher customizations for system-specific fonts that I do not like, append also the following lines.)

  1. <alias>
  2. <family>Helvetica</family>
  3. <prefer>
  4. <family>Neue Haas Unica W1G</family>
  5. </prefer>
  6. </alias>
  7. <alias>
  8. <family>Helvetica Neue</family>
  9. <prefer>
  10. <family>Neue Haas Unica W1G</family>
  11. </prefer>
  12. </alias>
  13. <alias>
  14. <family>Arial</family>
  15. <prefer>
  16. <family>Neue Haas Unica W1G</family>
  17. </prefer>
  18. </alias>
  19. <match target="pattern">
  20. <test qual="any" name="family">
  21. <string>SF UI Display</string>
  22. </test>
  23. <edit name="family" mode="append" binding="strong">
  24. <string>PingFang SC</string>
  25. </edit>
  26. </match>

Extra work for Firefox

If the UI font of Firefox doesn't respect the system font settings, try the following solution.

  1. /* Global UI font */
  2. * {
  3. font-family: Microsoft YaHei UI !important;
  4. }

Input Methods

Fix fcitx

After installing fcitx, right clicks on it can fail to display the whole menu on Linux Mint 18.3 Cinnamon.
Try sudo apt remove --auto-remove fcitx-ui-qimpanel to solve the problem (a log out is required).

Cloud Prediction

Right click on fcitx -> Configure -> Addons -> Search for "Cloud" -> Configure -> Prediction source -> Baidu

Eliminate Beeps

https://unix.stackexchange.com/questions/452978/how-to-completely-turn-off-system-beep-sounds-forever-for-good-for-real

Install Clash

  1. No easy way to install clash. Download the Premium version of the binary from https://github.com/Dreamacro/clash/releases/tag/premium and put it in the system as /opt/clash/clash.
  2. Download a Clash config file and put it as /etc/clash/config.yaml. Make sure to set the mixed-port as the port we want.
  3. Create a service file.

Service File with systemctl Available

If systemctl is available, the service file can be simple. Put it as /etc/systemd/system/clash.service.

  1. [Unit]
  2. Description=Clash Daemon
  3. [Service]
  4. ExecStart=/opt/clash/clash -d /etc/clash/
  5. Restart=on-failure
  6. [Install]
  7. WantedBy=multi-user.target

Service File with systemctl Unavailable

If systemctl is not available, we have to write a full script and put it as /etc/init.d/clash.

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: clash
  4. # Required-Start: $local_fs $network
  5. # Required-Stop: $local_fs
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: clash daemon
  9. # Description: Manage Clash service
  10. ### END INIT INFO
  11. set -e
  12. # /etc/init.d/clash: Start and stop the Clash daemon
  13. DAEMON=/opt/clash/clash
  14. CONFIG_DIR=/etc/clash/
  15. PID_FILE=/var/run/clash.pid
  16. test -x $DAEMON || exit 0
  17. . /lib/lsb/init-functions
  18. start_clash()
  19. {
  20. # Return
  21. # 0 if daemon has been started
  22. # 1 if daemon could not be started
  23. start-stop-daemon --start --quiet \
  24. --make-pidfile --pidfile $PID_FILE --exec $DAEMON \
  25. --background -- \
  26. -d $CONFIG_DIR \
  27. || return 1
  28. }
  29. case "$1" in
  30. start)
  31. log_daemon_msg "Starting Clash daemon" "clash"
  32. #start_daemon -p $PID_FILE $DAEMON -d $CONFIG_DIR
  33. start_clash
  34. log_end_msg $?
  35. ;;
  36. stop)
  37. log_daemon_msg "Stopping Clash daemon" "clash"
  38. killproc -p $PID_FILE $DAEMON
  39. RETVAL=$?
  40. [ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE
  41. log_end_msg $RETVAL
  42. ;;
  43. restart)
  44. log_daemon_msg "Restarting Clash daemon" "clash"
  45. $0 stop
  46. $0 start
  47. ;;
  48. reload|force-reload)
  49. # No need to reload
  50. log_daemon_msg "Reloading Clash daemon" "clash"
  51. log_end_msg 0
  52. ;;
  53. status)
  54. status_of_proc -p $PID_FILE "$DAEMON" clash
  55. exit $? # notreached due to set -e
  56. ;;
  57. *)
  58. log_action_msg "Usage: /etc/init.d/clash {start|stop|reload|force-reload|restart|status}"
  59. exit 2
  60. esac
  61. exit 0

Install DeadBeef

  1. sudo add-apt-repository ppa:starws-box/deadbeef-player
  2. sudo apt update
  3. sudo apt install deadbeef

Switch to GTK3 in the preferences if the text is blurry in Wayland.

Install Java

Install MySQL

Install Nginx

Install Shadowsocks

Install Shadowsocks with GUI

  1. sudo add-apt-repository ppa:hzwhuang/ss-qt5
  2. sudo apt-get update
  3. sudo apt-get install shadowsocks-qt5

Apply the browser with the add-on "SwitchyOmega" to enable it with auto-switch.
- Reference:
https://www.sundabao.com/ubuntu%E4%BD%BF%E7%94%A8shadowsocks/

Install ShadowsocksR

GUI Version

Prefer the AppImage.
https://github.com/shadowsocksrr/electron-ssr/

GUI Not Available

Step 1:

  1. wget https://github.com/shadowsocksrr/shadowsocksr/archive/manyuser.zip

or

  1. wget https://s3.tok.ap.cloud-object-storage.appdomain.cloud/xzdl/manyuser.zip

Step 2:
Extract it and place the contents in an appropriate location.

  1. unzip manyuser.zip
  2. sudo mv shadowsocksr-manyuser /opt/shadowsocksr

Step 3:
Create a user configuration.

  1. sudo mkdir -p /etc/shadowsocksr
  2. sudo vim /etc/shadowsocksr/user-config.json

Step 4:
Fill in the configuration fields. Dominant fields are available as:
server, server_ipv6, server_port, password, method, protocol, protocol_param, obfs and obfs_param.

Step 5:
Start by running

  1. sudo python /opt/shadowsocksr/shadowsocks/local.py -c /etc/shadowsocksr/user-config.json -d start

And check the status by

  1. sudo tail /var/log/shadowsocksr.log

If it's working properly, the next step can be done optionally to make it more convenient for later use.

Step 6 (optional):
Add the lines

  1. alias start_ssr="sudo python /opt/shadowsocksr/shadowsocks/local.py -c /etc/shadowsocksr/shadowsocks.json -d start"
  2. alias check_ssr="sudo tail /var/log/shadowsocksr.log"

to ~/.bashrc or ~/.zshrc.

Install V2Ray

Core: v2ray
Client: qv2ray
SSR Plugin: qv2ray-plugin-ssr-git
Trojan Plugin: qv2ray-plugin-trojan

Install QQ/TIM/Wechat

Gnome / GTK Based

Download https://deepin-wine.i-m.dev/setup.sh and sudo run it to add some repos.
Take TIM for example:

  1. sudo apt update
  2. sudo apt install deepin.com.qq.office

Refer to the page below for the package names of the other apps.
https://github.com/zq1997/deepin-wine

KDE

Approach 1:
Follow the instructions in the following page. Note the information related to KDE.
https://github.com/wszqkzqk/deepin-wine-ubuntu

Approach 2:
Follow the steps in the Gnome section and manually install gnome-settings-daemon.
Then make it auto start when logging in:

  1. Create a file named gsd-xsettings.sh in $HOME/.config/autostart-scripts.
  2. Copy in the following text.
  1. #!/bin/bash
  2. /usr/lib/gnome-settings-daemon/gsd-xsettings

Log out and log back in and TIM should be able to started correctly.

Sync Time between Windows and Linux

Windows gets time from server and writes the zoned time into BIOS. It displays BIOS time directly.
Linux gets time from server and writes the UTC time directly into BIOS. It displays converted zoned time from BIOS.

To make Linux (Ubuntu 16.04) behave the same as Windows,

  1. timedatectl set-local-rtc 1 --adjust-system-clock
  2. timedatectl /* To check if the system uses local time */

There's also a way to make Windows behave like Linux, but with auto sync disabled on Windows.

Themes

What if Cinnamon Freezes

Ctrl + Alt + F4 to start a TTY.
export DISPLAY=:0; cinnamon &

https://askubuntu.com/questions/143838/how-do-i-restart-cinnamon-from-the-tty/198935#198935

Scripts and Tutorials by Others

https://github.com/erikdubois/Ultimate-Linux-Mint-18.1-Cinnamon

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注