Ubuntu 20.04 installation - jacobmoroni/ubuntu_hacks GitHub Wiki
This is the way I set up my ubuntu 18.04 Install last time I did it. In this order
Do this before installing ubuntu. Or at least before anything else
- disable secure boot in BIOS
- also in bios it may be necessary to disable hybrid graphics. I currently have hybrid graphics disabled too, but I think with nvidia-prime you can leave this on and actually switch between the nvidia gpu and the integrated intel gpu(much better battery life)
Do this befor you start trying to figure anything else out becasue a lot of things wont be set up right yet
sudo apt update
sudo apt upgrade
sudo reboot now
-
you can do this from command line by adding a repo and then apt installing the drivers from there.
-
But it is a little more fool-proof to just go to Software & Updates then click additional-drivers and select the newest nvidia one then wait for it to finish then reboot again.
-
you can verify it is working by going to settings->details and the nvidia GPU should be listed instead of the integrated one. also running
nvidia-smi
will show gpu usage (this will only work after it is set up) -
nvidia-settings
opens a display menu to customize settings
using NVIDIA's installation guide walks you through this pretty well. But I will include some helpful tips that I used
- this was helpful when trying to install cuda stuff (it broke apt and this recovered it)
sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
- also if you get to making the sample cuda stuff and you get an error that says something about "missing nvscibuf.h" there is actually a missing file or something in cuda 10.2 so on the nvidia forum they said they are researching, but for now to just use
make -k
(to keep going after the error and build the other stuff)
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
sudo apt install htop vim vim-gtk curl git ssh git-gui usb-creator-gtk baobab avahi-daemon avahi-utils freeglut3-dev
- 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 hosntames and stuff on a network
- freeglut3-dev is what enables the visuals in the anansi_ros tests with GLUT
- this will create a public ssh key at
~/.ssh/id_rsa.pub
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- add the ssh keys at gitlab/github click on profile then settings then ssh-keys then add ssh key and copy it into there
This is good to do next because it will install a lot of other dependencies that you will need
- clone dronehunter-dev
- submodule update:
git submodule update --init --recursive
- run
dronehunter-dev/anansi_ros/src/anansi_updater/scripts/update_dependencies_deep.sh
This will install ROS and python and pip install a lot of python packages as well
I like to use a few gnome extensions.
NOTE: These will only work on gnome
sudo apt install gnome-tweaks chrome-gnome-shell gnome-shell-extensions
-
then add the gnome extension to chrome here
-
if you want to use GnomeStatsPro or system-monitor extensions you need to run this too
sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor
- I Installed openweather, gnomestatspro, system-monitor, gTile, muti monitors add-on, sound input & output device chooser
I use some programs that use config files that I have set up in my ubuntu_hacks repo
sudo apt install zsh terminator guake tmux -y
- install and setup vim with
./setupvim.sh
in repo
- 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
- follow README instructions to set up terminator
copy guake.desktop into autostart with
cp /usr/share/applications/guake.desktop ~/.config/autostart/
clone necessary repos they can be found here.
-
Dont forget to follow the readmes in the repos to set up correctly
-
for java to work right in ubuntu 18.04
sudo apt install openjdk-8-jdk openjdk-8-jre
- add these lines to you .bashrc or .zshrc
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
This is the resource for developer environment instructions
this adds slack to the apt repos and adds it to start on boot
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-4.0.2-amd64.deb
sudo apt install ./slack-desktop-*.deb
cp /usr/share/applications/slack.desktop ~/.config/autostart
This guy set up a ppa to get the latest so they just install and update with apt
To use, call this to add the repos
curl -s https://s3.eu-central-1.amazonaws.com/jetbrains-ppa/0xA6E8698A.pub.asc | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] http://jetbrains-ppa.s3-website.eu-central-1.amazonaws.com any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null
sudo apt update
- then install them
sudo apt install clion intellij-idea-ultimate pycharm-community
then for intellij and pycharm when you set them up add the link to run from command line.
To get the clion.desktop to build with ROS enabled. add this to the ~/.profile
NOTE: This isnt working all the way for me, maybe a zshell thing?
source /opt/ros/noetic/setup.bash
source ~/workspaces/anansi_ros/devel/setup.bash --extend
I think I have settled on these settings to get it to play nice with ros (This still requires opening from command line):
settings -> Build, Execution, Depolyment -> CMAKE
Generator: Unix Makefiles
CMake options: -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DWITH_VISUAL=All -DCATKIN_DEVEL_PREFIX:PATH=/home/jacobolson/workspaces/dronehunter-dev/anansi_ros/devel
Build directory: ../build
To get clion to use same clang tidy that we do: go to settings->Languages & Frameworks->Clang-Tidy and check box for Use external Clang-Tidy instead of the built in one then select the .clang-tidy file in anansi-ros
To make the desktop icon source ROS correctly edit the EXEC line of the correct clion.desktop file (mine is in /usr/share/applications/clion.desktop
) to say Exec=bash(or zsh) -i -c "/path/to/clion/bin/clion.sh" %f
This adds the stable release to apt so it will install and update with apt
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code
pip install ipython pyqtgraph --user
also use the install script in the dronehunter_analysis_tools
repo for those to all work
Sohpos (AntiVirus): follow instructions in Employee Technical Guide (search sophos)
VPN (NetExtender): search netextender in Employee Technical Guide and follow instructions