Make sure to think about data backup before you proceed with the below guide.
Tested on HP Elitebook 840 G6 in April 2024.
There are various options for creating a bootable USB drive.
| # ~/.R/Makevars | |
| PKG_LIBS = -fopenmp -lgomp | |
| PKG_CFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native | |
| #-- Compiler and Linker Flags | |
| # -march (or -mcpu) builds exclusively for an architecture | |
| # -mtune optimizes for an architecture, but builds for whole processor family | |
| CPPFLAGS=-D_FORTIFY_SOURCE=2 | |
| CFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native | |
| CXXFLAGS=-O3 -pipe -fstack-protector-strong -fopenmp -march=native |
My work requires us to have full-disk encryption, so these are the steps I use.
The basic idea is to create a LUKS-encrypted partition which is used as an LVM Physical Volume.
The GRUB boot partition isn't encrypted, but everything else is.
These steps tested and working on 22.04 (jammy) and 20.04 (focal).
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is tigervnc-standalone-server.
For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.
So let's go. First, we need a working WSL2 installation.
| # --------- | |
| # .Renviron | |
| # --------- | |
| PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig |
| bigcorPar <- function(x, nblocks = 10, verbose = TRUE, ncore="all", ...){ | |
| library(ff, quietly = TRUE) | |
| require(doMC) | |
| if(ncore=="all"){ | |
| ncore = multicore:::detectCores() | |
| registerDoMC(cores = ncore) | |
| } else{ | |
| registerDoMC(cores = ncore) | |
| } |
| # Connect to PostgreSQL in HostOS from GuestOS using [Parallels](https://gist.github.com/justingarrick/11180527) | |
| We need to set "which interfaces should PostgreSQL accept connections on" in [postgresql.conf](https://dba.stackexchange.com/questions/48372/can-listen-addresses-really-be-set-to-a-list) | |
| To show the location of the file : | |
| ```psql | |
| SHOW config_file ; | |
| ``` | |
| Where we need to uncomment `listen_addresses` and change it from localhost to '*'. |
| wget \ | |
| --recursive \ # Download the whole site. | |
| #--no-clobber \ # Don't overwrite existing files. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --html-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. | |
| --domains yoursite.com \ # Do not follow links outside this domain. | |
| --no-parent \ # Don't follow links outside the directory you pass in. | |
| yoursite.com/whatever/path # The URL to download |