Skip to content

Instantly share code, notes, and snippets.

@dylan-k
Created November 9, 2021 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylan-k/66e3634725d57a01278daed610fb2020 to your computer and use it in GitHub Desktop.
Save dylan-k/66e3634725d57a01278daed610fb2020 to your computer and use it in GitHub Desktop.
Very Minimal Barebones Ubuntu 20.04 with i3 Window Manager

INSTALLING A BAREBONES UBUNTU

This is an configuration for an old laptop. The goal here is to make a "writing machine" so I can go from "zero to writing" in as few seconds as possible. It's a learning-as-I go project. Suggestions welcome.

Requirements:

  • fastest possible startup
  • auto login
  • install no more than required

I'll install the writing apps I need after this setup is complete.

Install Ubuntu Server

I installed ubuntu 20.04.3 live server amd64 on a 2011 Macbook Air model A1370 (2GB RAM)

During the install process, be sure to connect to wifi.

Install Xorg Base For Graphical Environment And Essential Utilities

  • sudo apt install -y xorg --no-install-recommends --no-install-suggests
  • sudo apt install -y ubuntu-drivers-common mesa-utils mesa-utils-extra gnupg numlockx xautolock scrot unzip wpasupplicant feh pavucontrol curl wget xclip rxvt-unicode

Install Window Manaager, File Explorer, Statusbar, Launcher

  • sudo add-apt-repository -y ppa:regolith-linux/stable
  • sudo apt install -y i3-gaps i3status dmenu rofi xfe

Configure Auto-Login At Startup

The following command creates a drop-in file (if neccessary) and open it an editor.

  • sudo systemctl edit getty@tty1.service

Add the following, replacing myusername with your user name:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM
Type=idle

This will:

  • Create the folder /etc/systemd/system/getty@tty1.service.d if necessary
  • Create the file /etc/systemd/system/getty@tty1.service.d/override.conf if necessary
  • automatically login the user named yourusername. Put the desired username there.

Now enable the service:

  • systemctl enable getty@tty1.service

Configure Startx To Run During Startup

To automatically startx edit the ~/.bash_profile file in your users /home directory and add this to the bottom.

#Startx Automatically
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
startx
fi

Ok, that will automatically run startx, when your user logs in.

Configure I3 To Launch During Startup

From the previous step, startx will run after login. Now to set i3 window manager to run after startx. Edit ~/.xinitrc to:

export TERMINAL = "rxvt-unicode"  
alias open="xdg-open"  
i3

Conclusion

This should get a minimal desktop running.

sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment