Ubuntu 22.04 (Work) Installation setup - jacobmoroni/ubuntu_hacks GitHub Wiki

Initial Setup

sudo apt update

sudo apt install -y

open software & updates -> other drivers to make sure nvidia driver is set up (in this case it was already)

Boot Repair

Sometimes after installing a new partition, the boot options get messed up in the grub. This will install and run boot-repair, just run recommended will work in most cases and repair the grub for the boot so that all of the options show up correctly

sudo apt install software-properties-common; \
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"; \
sudo add-apt-repository -y ppa:yannubuntu/boot-repair; \
sudo apt-get update; \
sudo apt-get install -y boot-repair && boot-repair

Brave

sudo apt install curl xclip

Install Brave browser

curl -fsS https://dl.brave.com/install.sh | sh

  • Sync brave with work profile (you will need to pull the sync code from the other partition first)
  • settings->sync->I have a Sync Code
  • enter the code
  • Set brave as default browser (system settings->default applications)

Helpful apt tools

sudo apt install htop vim vim-gtk curl git ssh git-gui usb-creator-gtk baobab avahi-daemon avahi-utils ipython3 python3-pip gparted

  • the usb-creator-gtk (called startup disk creator) is good for making bootable drives
  • baobab (called disk usage analyzer)
  • the avahi stuff is nice to find hostnames and stuff on a network

Other apt installs that I use all the time

sudo apt install vlc kdenlive inkscape gimp ffmpeg git-lfs shotwell

  • vlc -- Video playback
  • kdenlive -- movie editor
  • Inkstape -- Adobe Illustrator but free
  • Gimp -- Photoshop but free
  • ffmpeg -- video clipping (also ffplay is the smoothest video playback)
  • git-lfs -- handles large git files
  • shotwell -- image cropping

Set up git

git config --global user.email "[email protected]" git config --global user.name "Jacob Olson"

Create SSH keys

ssh-keygen -t rsa -b 4096 -C "[email protected]" this generates a key in the .ssh folder add this key to gitlab and github

Clone this repo now to get config files

UI tools (back bone of my workflow)

sudo apt install tmux terminator guake zsh

Terminator and Guake (Best terminals in the game)

follow instructions on the main wiki terminator and guake

TMUX (really great terminal muxer)

follow wiki instructions

oh my zsh (because you arent alive unless you are doing zshell

  • run the following line to install oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

  • copy the .zshrc file into the home directory

  • then run to change shells to z shell

chsh -s /bin/zsh $USER

  • you will need to log out for this to take effect
  • also don't forget to change the ros sourced stuff from devel/setup.bash to devel/setup.zsh
  • I have some modified changes to the zsh theme that I use to show some extra info. to get that. cd .oh-my-zsh then I do the following:
    • git remote add github [email protected]:jacobmoroni/ohmyzsh.git (Adds my repo as an alternative remote called github)
    • git checkout github/add-stash-info (checks out the latest hash of my branch)
    • git switch -c add-stash-info (creates a new local branch for this)
    • then to push it up, I just do a git push --mirror github this allows me to pull in the latest oh-my-zsh changes when I want. There is probably a better way to do this, but this is how I am doing it so far
  • Apply my settings by copying the .zshrc config from the dotfiles in ubuntu-hacks to the home directory

Zsh by default will error if an empty for loop is found. there are some of the aliases that can do this (bash just fails silently) to match that behavior we need to do setopt no_nomatch this will allow for those cases to fail silently


Vim

cmake is required for for the setupvim script I just apt installed it with sudo apt install cmake well see how that goes

install and setup vim with ./setupvim.sh in repo

Gnome extensions

These are the gnome extensions that I like to use

sudo apt install gnome-tweaks chrome-gnome-shell gnome-shell-extensions

  • then add the gnome extension to chrome here
  • for a lot of the computer monitor stuff, you will need these

sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor

  • youll need a restart after insalling these

  • These are the extensions that I have set up right now

    • TopHat - Computer monitor (Realtime core, memory, storage, network)
      • I edit this one to update more frequently. default is like 1 hz.
      • The file is ~/.local/share/gnome-shell/extensions/[email protected]/lib/config.js
      • edit the following
    var UPDATE_INTERVAL_CPU = 100;
    var UPDATE_INTERVAL_MEM = 1000;
    var UPDATE_INTERVAL_NET = 1000;
    var UPDATE_INTERVAL_DISK = 5000;
    var UPDATE_INTERVAL_PROCLIST = 1000;
    
    • Frippery Move Clock - Moves clock to the right for more room for extensions
    • OpenWeather - Weather forecast and conditions
    • system-monitor-next - Configurable computer status history
    • Sound Input & Output Device Chooser -- Really nice sound configuration from the settings dropdown

Install dronheunter-dev ws

I think I have settled on using a projects directory. I used to do workspaces. But I think I am moving to projects git clone [email protected]:fortem/dronehunter/dronehunter-dev.git git submodule update --init --recursive

  • theoretically this one should just work with running ./scripts/setup.sh so hopefully that works

Intellij products.

I usually have apt installed these, but I am going to go for the intellij toolbox this time (may have more up-to-date updates and I think it manages itself) see other setup guides to do it the other way

PWA Shortcuts. Looks like Brave updated how to install shortcuts for sites. Now the way to do it is

  • go to the site, then in the search bar click this icon

image

  • then click install

image

  • then add it to favorites if you want to keep it on your bar

Install VSCODE

This adds the stable release to apt so it will install and update with apt

sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg

sudo apt install apt-transport-https
sudo apt update
sudo apt install code

Then I set up VSCODE to work pretty well last time and I used settings sync with the github login


PIP and iPython setup

pip install ipython pyqtgraph

for some reason ipython didnt create an endpoint so i created an alias for python -m IPython
then copy ipython_config.py into ~/.ipython/profile_default to automatically import numpy and matplotlib into ipython


AppImage Stuff

This seems to do what I want with appimages

sudo add-apt-repository ppa:appimagelauncher-team/stable
sudo apt update
sudo apt install appimagelauncher

This will default to move all appimages to ~/Applications it will automatically set up desktop stuff for it so the applications menu can find it. It has a wiki that is sort of confusing but probably good to know about. By default, this will prompt and set it up the first time it is run

Disable caps lock

follow instructions for this in Helpful-ubuntu-tips

zshell stuff

  • the ,dh-extract-all will fail without an extra line for zshell. This is because zshell errors when ls returns empty and bash doesnt. to fix this, you just need to add
setopt nonomatch
  • ros2 autocomplete doesnt work in zshell by default adding the following lines to zshell fix it
eval "$(register-python-argcomplete3 ros2)"
eval "$(register-python-argcomplete3 colcon)"