-
Notifications
You must be signed in to change notification settings - Fork 8
Setting up the environment on Linux distributions other than Ubuntu 20.04
Filip Parag edited this page Nov 27, 2021
·
1 revision
If you are already running a Linux-based system with kernel 5.4
or newer, and X11 display server, by following this guide, you can set up an isolated Ubuntu 20.04 workspace for this project.
- Create an empty partiton on your disk with at least 20GiB of space (eg.
/dev/sda3
) - Install Ubuntu 20.04 to the empty partition
- Create an empty directory (eg.
~/ubuntu
) - Install Ubuntu 20.04 system files using
debootstrap
:
- Create a script file (eg
~/ubuntu.sh
) with the following content:
#!/bin/sh
# Remove this line if using second option in previous step (without dual boot)
mount "$1" /mnt
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -t devpts none /mnt/dev/pts
mount -o bind /sys /mnt/sys
mount --bind /etc/resolv.conf /mnt/etc/resolv.conf
mount -o bind /tmp /mnt/tmp
mount --bind "/home/$2" "/mnt/home/$2/Documents"
cp -p "/home/$2/.Xauthority" "/mnt/home/$2"
chmod 1777 /mnt/dev/shm
# Check the value of your DISPLAY variable using command: echo "$DISPLAY"
export DISPLAY=":0.0"
chroot /mnt /usr/bin/env su "$2"
- Make the script executable
chmod +x ~/ubuntu.sh
- To enter the workspace, run this only once after every reboot:
sudo ~/ubuntu.sh ~/ubuntu
- For every terminal window after that, run this instead:
DISPLAY=":0.0" sudo chroot ~/ubuntu /usr/bin/env su "$USER"