Linux Mint

Installation & Configuration

  • Linux desktop distribution
    • Elegant and easy to use
    • Based on Ubuntu and Debian
  • Desktop environment
    • Cinnamon, forked from GNOME Shell
    • Mate, continuation of GNOME 2

Install media preparation

Download latest Linux Mint image from:https://www.linuxmint.com/download.php

Recent Linux Mint uses an hybrid ISO image. This allows to boot a raw copy to USB disk.

# isohybrid linuxmint*.iso # Not required: Linux Mint ISO is already hybrid.
sudo dd if=linuxmint*.iso of=/dev/sdx oflag=direct bs=1048576

The USB key can be used on the target PC to install and configure Linux Mint.

Ref: https://community.linuxmint.com/tutorial/view/744

Basic configuration
Tool installation
# Must have tools
sudo apt-get install geany meld

# If plot is required,
sudo apt-get install gnuplot-x11

# For disk management,
sudo apt-get install gparted

# Virtualbox only: enable shared drive access:
sudo usermod -a -G vboxsf user
User management
sudo useradd -g hwlab -m -s "/bin/bash" bertrand
sudo usermod -a -G adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare
Sudo No Password
echo "user ALL = NOPASSWD: ALL" | sudo tee /etc/sudoers.d/user
Remote desktop

Linux mint includes Vino VNC server. It is enabled via:
> Menu > Preferences > Desktop Sharing

Note: In the case where client can connect due to security issues, you may try:

sudo gsettings set org.gnome.Vino require-encryption false

XRDP allows remote RDP connection from Windows:

sudo apt install xrdp xorgxrdp -y
echo env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS cinnamon-session>~/.xsession

# adjust config in /etc/xrdp/xrdp.ini, copy self signed certificate
sudo rm cert.pem key.pem
sudo cp /etc/ssl/certs/ssl-cert-snakeoil.pem cert.pem
sudo cp /etc/ssl/private/ssl-cert-snakeoil.key key.pem
sudo chmod g-r key.pem
sudo chown xrdp:xrdp *.pem
convert -size 128x128 -type truecolor bertrand-logo-white.svg bertrand-logo-128.bmp
Sound disabling
# Disable Shell bell
echo "set bell-style visible" | sudo tee -a /etc/inputrc

# Disable vim bell
echo "set visualbell" > ~/.vimrc
Update

To keep system up to date:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt autoremove --purge
sudo apt clean
dpkg --list | grep linux-image
dpkg --list | grep linux-headers
sudo apt remove --purge linux-headers-x.x.x
du -ks /lib/modules/*
Synergy / Barrier

Synergy is a tool that allows to share keyboard / mouse across multiple hosts

Barrier is a fork that stays open source

Install Synergy from sources (linux)

Barrier binary image are not provided for Ubuntu, pre-built image also have libraries dependancies that may cause problems.

sudo apt install qtcreator qtbase5-dev qttools5-dev cmake make g++ xorg-dev libssl-dev libx11-dev libsodium-dev libgl1-mesa-glx libegl1-mesa libcurl4-openssl-dev libavahi-compat-libdnssd-dev qtdeclarative5-dev libqt5svg5-dev libsystemd-dev libgtk2.0-dev libnotify-dev 

git clone --depth 1 --branch 1.14.2.36-stable https://github.com/symless/synergy-core.git 
cd synergy-core/ext
git clone --depth 1 https://chromium.googlesource.com/external/github.com/google/googletest

# Patch annoying popups
# Removes all calls to raiseActivationDialog() in synergy-core/src/gui/src/MainWindow.cpp
cd ..
wget https://bertrand.tognoli.fr/howto/linux/linux-mint-synergy.patch -qO - | patch -p1

mkdir build
cd build
cmake ..
make
sudo make install
/usr/share/applications/synergy.desktop
[Desktop Entry]
Name=Synergy
Exec=/usr/local/bin/synergy
Comment=Keyboard and mouse sharing solution
Terminal=false
Icon=/usr/local/share/icons/hicolor/scalable/apps/synergy.svg
Type=Application
Categories=Utility;
Install Barrier
sudo apt update && sudo apt upgrade
sudo apt install git cmake make xorg-dev g++ libcurl4-openssl-dev \
                 libavahi-compat-libdnssd-dev libssl-dev libx11-dev \
                 libqt4-dev qtbase5-dev
git clone --depth=1 https://github.com/debauchee/barrier
cd barrier
./clean_build.sh
cd build
sudo make install
sudo geany /usr/share/applications/barrier.desktop
[Desktop Entry]
Encoding=UTF-8
Exec=/usr/local/bin/barrier
Icon=/usr/local/share/icons/hicolor/scalable/apps/barrier.svg
Type=Application
Terminal=false
Comment=Keyboard and mouse sharing tool.
Name=Barrier
GenericName=barrier
StartupNotify=false
Categories=Utility
Optional
Network interfaces numbering

To rename network interface eth or wlan:

sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

sudo update-grub
sudo reboot
Systemd automount (and umount timeout)

Useful for external filesystem (ex: USB disk, Network FS) that may not always be avaialble or that do not require to be always mounted (eg backups)

/etc/fstab
/dev/sdb2 /media/usb ntfs rw,noauto,x-systemd.automount,x-systemd.device-timeout=1,x-systemd.idle-timeout=1min 0 0
Broadcom Wireless driver in 4.15 kernel
wget http://archive.ubuntu.com/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu1~1.3_amd64.deb
sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu1~1.3_amd64.deb
#add to /usr/src/bcmwl-6.30.223.271+bdcom/dkms.conf
PATCH[13]="0028-add-support-for-Linux-5.6.patch"

wget https://launchpadlibrarian.net/475070194/broadcom-wl-dkms-arch-patch
sudo mv broadcom-wl-dkms-arch-patch /usr/src/bcmwl-6.30.223.271+bdcom/patches/0028-add-support-for-Linux-5.6.patch
sudo dkms install bcmwl/6.30.223.271+bdcom -k 5.8.0-31-generic
Update warning cleanup

To remove that error:

update-initramfs: Generating /boot/initrd.img-*
W: Possible missing firmware /lib/firmware/i915/*.bin for module i915

do:

lst='skl_guc_49.0.1.bin bxt_guc_49.0.1.bin kbl_guc_49.0.1.bin
        glk_guc_49.0.1.bin cml_guc_49.0.1.bin icl_guc_49.0.1.bin
        ehl_guc_49.0.1.bin tgl_huc_7.5.0.bin tgl_guc_49.0.1.bin
        dg1_dmc_ver2_02.bin'
url='https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915'
mkdir -p ~/tmp/i915
cd ~/tmp/i915
for i in $lst ; do wget $url/$i; done
sudo chown root:root *
sudo mv * /lib/firmware/i915/
rm ~/tmp/i915
Mac Mini automatic reboot

Mac Mini requires power button to be pushed after power failure. To allow the system to power up automatically:

lspci | grep LPC
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
sudo setpci -s 0:1f.0 0xa4.b=0
HP Thunderbolt dock

To enable Thunderbolt dock:

boltctl
 ● HP Thunderbolt 3Dock
   ├─ type:          peripheral
   ├─ name:          HP Thunderbolt 3Dock
   ├─ vendor:        HP Inc.
   ├─ uuid:          e0010000-0091-8718-22f9-e396b311f31d
   ├─ status:        connected
   │  ├─ domain:     domain0
   │  └─ authflags:  none
   ├─ connected:     Thu 12 Mar 2020 05:38:29 PM UTC
   └─ stored:        no
sudo boltctl enroll --policy auto e0010000-0091-8718-22f9-e396b311f31d
Record movie from screen

To record the screen as a .webm movie:

Same for windows (mp4):

By Bertrand Tognoli
2022-01-11