-
-
Save saurabheights/7685094ed2daf00406068b76f03982be to your computer and use it in GitHub Desktop.
# Disable need to provide password for sudo. use only if you can lock system when afk. | |
# Add below line to the end of file, where replace $USER with your system username. | |
sudo visudo | |
$USER ALL=(ALL) NOPASSWD: ALL | |
# Install fzf for better reverse search | |
sudo apt install fzf | |
cat /usr/share/doc/fzf/README.Debian # For how to integrate with your shell | |
echo "source /usr/share/doc/fzf/examples/completion.bash" » ~/.bashrc | |
#Install Telegram - Better than whatsapp | |
sudo snap install telegram-desktop | |
# Press Space after selecting any file to get quick peek, like mac | |
# Install kdocker, used to minimize any app to Tray bar | |
# Install pdfshuffler, a simple tool to combine pdfs, remove slides, etc. | |
# Install tmux - better for creating terminalless-ssh session. Only for servers. | |
# Add open with option in context menu using nemo | |
# Install sshpass for nopassword sync | |
# Install sox to play sound on ubuntu | |
# Set up Xclip to cut copy from pipe(bash) | |
sudo apt-get -y install sox vlc sshpass gnome-sushi kdocker pdfshuffler nemo xclip ntfs-3g && sudo apt upgrade -y tmux | |
# Configure script variables | |
export GIT_USERNAME=saurabheights | |
export [email protected] | |
# Set locale for git | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
sudo locale-gen en_US.UTF-8 | |
sudo dpkg-reconfigure locales | |
# Disable opening nautilus on connecting mobile for charging | |
sudo gsettings set org.gnome.desktop.media-handling automount-open false | |
# Set up Spotify | |
snap install spotify | |
# Set up Sublime | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt-get update | |
sudo apt-get install -y sublime-text | |
# Install clipboard manager | |
sudo add-apt-repository ppa:afelinczak/ppa | |
sudo apt-get update | |
sudo apt-get install -y clipit # Use copyq | |
# Install youtube-dl - ofcourse to download youtube videos | |
sudo apt-get remove -y youtube-dl | |
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl | |
sudo chmod a+x /usr/local/bin/youtube-dl | |
# Install Zotero - Research Papers - Reference management software | |
sudo apt-add-repository ppa:smathot/cogscinl | |
sudo apt-get update | |
sudo apt-get install -y zotero-standalone | |
sudo chown sk:sk /opt/zotero/ # To allow updates from gui itself. Use https://app.koofr.net/dav/Koofr for webdav | |
# Install Git and Git Gui | |
sudo apt-get install -y git git-gui | |
git config --global core.editor "subl -n -w" | |
git config --global user.email ${GIT_EMAIL_ID} | |
git config --global user.name ${GIT_USERNAME} | |
# Always output gitdiff to stdout. Allows you to find intermediate changes you did if you forget to commit. | |
git config --global core.pager cat | |
# Disable git gui warning to compress the loose objects | |
git config --global gui.gcwarning false | |
# Install Powertop - Makes Battery last longer - Needs more work. | |
sudo apt install -y powertop | |
echo "@Saurabh - Wait for powertop to calibrate itself. Will take 15-30 minutes." | |
sudo powertop -c | |
sudo apt install -y gnome-tweak-tool # For nightly and other things | |
# Integrate git completion script and git prompt script | |
# The below untested line should be enough | |
#sudo apt-get install git-core bash-completion | |
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -O ~/.git-completion.bash | |
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -O ~/.git-prompt.sh | |
echo "source ~/.git-completion.bash" >> ~/.bashrc | |
# ToDo-Git prompt needs more work. Last 3 directory of folder path, current git branch name, and if anything has changed. | |
echo "source ~/.git-prompt.sh" >> ~/.bashrc | |
# Install to monitor GPU usage as graph | |
echo "deb https://apt.izzysoft.de/ubuntu generic universe" | sudo tee -a /etc/apt/sources.list | |
wget http://apt.izzysoft.de/izzysoft.asc | |
sudo apt-key add izzysoft.asc | |
sudo apt-get update && sudo apt-get install -y monitorix | |
sudo subl /etc/monitorix/monitorix.conf | |
# Edit graph_enable for nvidia, search '<graph_enable>' | |
sudo service monitorix restart | |
# Set number of workspaces - 2 rows x 4 columns | |
dconf write /org/compiz/profiles/unity/plugins/core/vsize 2 | |
dconf write /org/compiz/profiles/unity/plugins/core/hsize 4 | |
# Install below gnome extension to limit alt+tab using windows | |
# https://extensions.gnome.org/extension/3148/alt-tab-for-dual-monitor/ | |
gsettings set org.gnome.shell.app-switcher current-workspace-only true | |
# Use dark theme for nautilus | |
gsettings set org.gnome.desktop.interface color-scheme prefer-dark | |
# See available themes by deleting Yaru-dark and pressing tab | |
# gsettings set org.gnome.desktop.interface gtk-theme Yaru-dark | |
################## | |
## RANDOM STUFF ## | |
################## | |
# Install to convert pynb to pdf and all latex packages | |
sudo apt-get install -y texlive texlive-latex-extra pandoc texlive-xetex texlive-full | |
# Install Gummi for realtime view of latex | |
sudo apt install -y gummi | |
sudo apt install okular | |
# Update to nvidia-418 or above | |
sudo ubuntu-drivers autoinstall | |
sudo reboot | |
# Firefox play mp4 | |
# Tabbed PDF Viewer with Restore session that works unlike Foxit | |
# Decent light weight image cropper. | |
# Install sticky notes for ubuntu | |
# Upgrade vim/vi - must. | |
sudo apt install -y htop tree cmake-qt-gui ubuntu-restricted-extras qpdfview gthumb xpad | |
sudo apt upgrade -y vim | |
# Install openjdk1.7 | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get update | |
sudo apt-get install -y openjdk-7-jdk | |
# Remove title bar from firefox and use tree-style plugin | |
echo "UNTESTED CODE-CREATING CUSTOM CSS FILE FOR FIREFOX" | |
mkdir ~/.mozilla/firefox/*.default/chrome/ | |
cd ~/.mozilla/firefox/*.default/chrome/ | |
echo '@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");' >> ~/.mozilla/firefox/*.default/chrome/userChrome.css | |
echo '#TabsToolbar { visibility: collapse !important;}' >> ~/.mozilla/firefox/*.default/chrome/userChrome.css | |
echo "RESTART FIREFOX TO SEE IF TITLEBAR IS REMOVED" | |
#Install SpotifyRise and AlarmClock - Make alarms that play song from spotify | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 | |
sudo apt-get update | |
sudo apt-get install -y alarm-clock-applet wmctrl xautomation | |
sudo apt-get -f install | |
wget -O spotify-rise https://raw.githubusercontent.com/gcushen/spotify-rise/master/spotify-rise | |
sudo install spotify-rise /usr/local/bin/spotify-rise | |
sudo apt install alarm-clock-applet | |
sudo apt-get install -y xautomation | |
spotify-rise ${SPOTIFY_PLAYLIST_URI} | |
echo 'Create an ALARM WITH THIS SPOTIFY URI:- spotify-rise spotify:user:1164323909:playlist:6L5fWP3stIdYISaca0ZyAs' |
Nvidia and CUDA:
- Go to Software and Updates -> Drivers -> Install Nvidia drivers.
- Go to https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal and download cuda-9.0.deb file for nvidia driver version 184.111.
- Run
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
- In
~/.bashrc
, add
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
If Bluetooth doesn't start try this:-
- sudo apt-get install linux-generic-hwe-16.04-edge xserver-xorg-input-libinput-hwe-16.04
or - Change #AutoEnable=false to AutoEnable=true in the /etc/bluetooth/main.conf . https://vilimpoc.org/blog/2016/04/30/ubuntu-16-04-bluetooth-speakers/
Image Utilities
sudo apt install libimage-exiftool-perl
sudo apt install gdal-bin
For hibernate, Get UUID of swap partition from disks utility:-
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<UUID of swap disk>"
sudo update-grub
sudo systemctl hibernate
Add Hibernate Button using:-
sudo apt-get install chrome-gnome-shell
Install hibernate Status button from https://extensions.gnome.org/extension/755/hibernate-status-button/
https://askubuntu.com/questions/568035/multiple-monitor-mirrored-as-default
set mirroring for external monitor as default
gui.fontui=-family "Liberation Sans" -size 14 -weight normal -slant roman -underline 0 -overstrike 0
gui.fontdiff=-family "Liberation Mono" -size 12 -weight normal -slant roman -underline 0 -overstrike 0
gui.tabsize=4
gui.gcwarning=false
gui.usettk=0
Set above for git gui to have better fonts
This automated script installs must needed things for me. Any inputs are welcome.