Parallels and Linux Notes

The these are some general notes about running Linux (Ubuntu and Debian) under Parallels on MacOS X.


Parallels Tools for Ubuntu 20.10 on Parallels 15

Although Ubuntu 20.10 installs without any issues under Parallels 15, due to procfs and mmap changes in the Linux kernel v5.6 (and newer), the Parallels Tools for Linux that are included in Parallels 15 will not install. See, e.g.: The following steps (based on Post Nos. 5 and 9 in the second Parallels forums thread above and the mmap changes above) appear to make it possible to install Parallels Tools on Ubuntu 20.10 running under Parallels 15:
  1. Enable downloads from source code repositories:

    https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories

  2. Install the packages needed to rebuild the Parallels Tools Linux kernel modules and install them:

    $ sudo apt-get install gcc make dkms libelf-dev bison flex linux-source

    See also: https://kb.parallels.com/en/113394, https://wiki.ubuntu.com/Kernel/SourceCode.

  3. Mount the Parallels Tools CD image in the Parallels instances running Ubuntu 20.10 (Parallels Action Menu, Install Parallels Tools).
  4. Make a working directory to patch Parallels Tools. For example:

    $ mkdir -p ~/Documents/pt_mod

  5. Make working directories for patching the Parallels Tools:

    $ mkdir -p ~/Documents/pt
    $ mkdir -p ~/Documents/pt_mod

  6. Copy the Parallels Tools to the working directory:

    $ cd ~/Documents/pt $ cp -r /media/cdrom0/* .

  7. Extract the Parallels Tools Linux kernel modules, save them, and fix the file ownership of the extracted kernel modules:

    $ cd ~/Documents/pt_mod
    $ tar -xvzf ../pt/kmods/prl_mod.tar.gz .
    $ chown -R "$USER" .
    $ mv ../pt/kmods/prl_mod.tar.gz ../pt/kmods/prl_mod-orig.tar.gz

  8. Copy this patch to the directory where the Parallels Tools Linux kernel modules were extracted apply it:

    $ cd ~/Documents/pt_mod
    $ patch -p0 < ../pt_mod/prl_kmods_u20-10.patch

  9. Test the patch to make sure it is working (there should be no build errors) and the clean the directory:

    $ cd ~/Documents/pt_mod
    $ make -f Makefile.kmods
    $ make -f Makefile.kmods clean

  10. Update the Linux kernel config:

    $ cd /usr/src/linux-headers-5.8.0-44-generic
    $ sudo make oldconfig

  11. Replace the original Parallels Linux kernel modules with the patched version:

    $ cd ~/Documents/pt_mod
    $ tar -zcvf ../pt/kmods/prl_mod.tar.gz .

  12. Build the patched Parallels Linux kernel modules:

    $ cd ~/Documents/pt/kmods
    $ make -f Makefile.kmods

  13. Install the Parallels Tools (you have have to reboot twice before everything works properly):

    $ cd ~/Documents/pt/
    $ sudo ./install


Disable Snaps on Ubuntu 20.10

  1. After a fresh Ubuntu 20.10 install, remove the installed snaps in the following order:

    $ sudo snap remove --purge snap-store
    $ sudo snap remove --purge gtk-common-themes
    $ sudo snap remove --purge gnome-3-34-1804
    $ sudo snap remove --purge core18
    $ sudo snap remove --purge snapd

  2. Verify that no snaps are installed:

    $ snap list

  3. Unmount /var/snap

    $ sudo umount /var/snap

  4. Remove snap:

    $ sudo apt autoremove --purge snapd gnome-software-plugin-snap

  5. Mark snap as being held so that installing other packages doesn't re-enable it:

    $ sudo apt-mark hold snapd

  6. Remove snap directories:

    $ sudo rm -rf /var/cache/snapd/ /var/snap /var/lib/snap
    $ rm -rf ~/snap


System Updates

  1. Get the most recent updates:

    $ sudo apt-get update

  2. Install the updates:

    $ sudo apt-get upgrade

From: https://www.3cx.com/blog/voip-howto/os-security-updates-debian/

Enable the firewall

$ sudo ufw enable

On Debian 10, you may need to install ufw:

$ sudo apt install ufw

See: https://www.techrepublic.com/article/how-to-secure-your-ubuntu-18-04-desktop-installation-in-one-easy-step/; https://www.linuxcapable.com/how-to-install-ufw-firewall-on-debian-linux/

(Optional) Install a GUI firewall:

$ sudo apt install gufw


Enable Gnome Tweaks and Gnome Shell Extensions (if using Gnome)

$ sudo apt install gnome-tweaks gnome-shell-extension-prefs

From: https://www.omgubuntu.co.uk/2020/10/things-to-do-after-installing-ubuntu-20-10-groovy-gorilla

Disable the desktop picture

$ gsettings set org.gnome.desktop.background picture-uri ""

From: https://www.fcpace.com/node/55

Disable Avahi

$ sudo systemctl disable --now avahi-daemon.socket avahi-daemon.service

From: https://unix.stackexchange.com/questions/255197/how-to-disable-avahi-daemon-without-uninstalling-it

Disable CUPS

$ sudo systemctl disable --now cups.service cups.socket cups.path

From: https://unix.stackexchange.com/questions/480082/how-to-disable-cups-service-on-reboot-with-systemd

Remove Extra Apps

  1. Remove Nano:

    $ sudo apt-get remove --purge nano

  2. Remove LibreOffice:

    $ sudo apt-get remove --purge libreoffice*

  3. Remove parole:

    $ sudo apt-get remove --purge parole

  4. Remove exfalso:

    $ sudo apt-get remove --purge exfalso

  5. Remove all unused apps:

    $ sudo apt-get -s autoremove

  6. Clean up:

    $ sudo apt-get clean && sudo apt-get autoremove

From:

CDs/ISOs


Getting the Debian Version/Release

From: https://linuxconfig.org/check-what-debian-version-you-are-running-on-your-linux-system


Install screen

$ sudo apt install screen


Install libbsd

$ sudo apt install libbsd-dev

From: https://stackoverflow.com/questions/19671152


Install dnscrypt

From: https://linuxconfig.org/how-to-encrypt-your-dns-with-dnscrypt-on-ubuntu-and-debian


Home / Notes