UbuntuSetup: Difference between revisions

From DrewWiki
Jump to navigation Jump to search
(turn into a script to run)
(added notes in script, removed sections describing manual entry of what they do)
Line 2: Line 2:
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
#!/bin/bash
#!/bin/bash
# passwordless sudo for my local box
sudo sh -c 'echo "drew ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
# set github
# set github
git config --global user.name "Drew Holt"
git config --global user.name "Drew Holt"
git config --global user.email "[email protected]"
git config --global user.email "[email protected]"


# add me to sudoers
# set natural scrolling, GUI under 'Settings > Mouse'
sudo sh -c 'echo "drew ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
gsettings set org.gnome.desktop.peripherals.mouse natural-scroll true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false
 
# switch windows, not applications. GUI under 'Settings > Keyboard'
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward  "['<Alt><Shift>Tab']"


# remove clutter
# remove clutter
cd $HOME; rmdir Documents/ Music/ Public/ Templates/ Videos/; rm examples.desktop
cd $HOME; rmdir Documents/ Music/ Public/ Templates/ Videos/; rm examples.desktop
# local installers already gathered
sudo mkdir /mnt/hdd
sudo mount /dev/vg_hdd/lv_hdd /mnt/hdd
cd /mnt/hdd/iso_installers/ubuntu-installers
sudo apt-get install -y ./atom-amd64.deb ./google-chrome-stable_current_amd64.deb ./insync_1.4.4.37065-artful_amd64.deb ./slack-desktop-3.1.0-amd64.deb ./vagrant_2.0.3_x86_64.deb ./virtualbox-5.2_5.2.8-121009_Ubuntu_zesty_amd64.deb ./skypeforlinux-64.deb ./keybase_amd64.deb


## disable popularity-contest
## disable popularity-contest
Line 27: Line 32:
   $(lsb_release -cs) \
   $(lsb_release -cs) \
   stable"
   stable"
# oracle 8 add java repo
# oracle 8 add java repo
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:webupd8team/java
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections


# update all repos, upgrade
# update all repos, upgrade
Line 38: Line 46:
sudo etckeeper init
sudo etckeeper init


# Oracle Java 8 License
# install local installers already gathered
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
sudo mkdir /mnt/hdd
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo mount /dev/vg_hdd/lv_hdd /mnt/hdd
cd /mnt/hdd/iso_installers/ubuntu-installers
sudo apt-get install -y ./atom-amd64.deb ./google-chrome-stable_current_amd64.deb ./insync_1.4.4.37065-artful_amd64.deb ./slack-desktop-3.1.0-amd64.deb ./vagrant_2.0.3_x86_64.deb ./virtualbox-5.2_5.2.8-121009_Ubuntu_zesty_amd64.deb ./skypeforlinux-64.deb ./keybase_amd64.deb ./chefdk_2.4.17-1_amd64.deb


# install all the software
# install all the software
Line 78: Line 88:
# docker
# docker
sudo usermod -a -G docker drew
sudo usermod -a -G docker drew
# configure lm_sensors
sudo sensors-detect --auto
</syntaxhighlight>
</syntaxhighlight>


= Local Installers and config needed =
* Chrome [https://www.google.com/chrome/]
* Chrome [https://www.google.com/chrome/]


Line 93: Line 108:


* Vagrant [https://www.vagrantup.com/]
* Vagrant [https://www.vagrantup.com/]
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
vagrant plugin install vagrant-berkshelf; vagrant plugin install berkshelf
vagrant plugin install vagrant-berkshelf; vagrant plugin install berkshelf
Line 112: Line 126:
* Skype [https://www.skype.com/en/get-skype/skype-for-linux/]
* Skype [https://www.skype.com/en/get-skype/skype-for-linux/]


= Next =
= When needed =
* Terraform [https://www.terraform.io/]
* Terraform [https://www.terraform.io/]
* Gitter
* Gitter
Line 144: Line 158:
==  Set gnome-screenshot default save directory ==
==  Set gnome-screenshot default save directory ==
?
?
== Gnome3 Fix alt+tab to move across windows and not just grouped apps ==
Application Launcher > Settings > Keyboard
* Under Navgiation, Set Switch Windows to alt+tab and replace. Yes to confirm override of "Switch Applications"


== Gnome Tweak Tool ==
== Gnome Tweak Tool ==

Revision as of 01:24, 29 March 2018

Install Main Apps

#!/bin/bash

# passwordless sudo for my local box
sudo sh -c 'echo "drew ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'

# set github
git config --global user.name "Drew Holt"
git config --global user.email "[email protected]"

# set natural scrolling, GUI under 'Settings > Mouse'
gsettings set org.gnome.desktop.peripherals.mouse natural-scroll true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false

# switch windows, not applications. GUI under 'Settings > Keyboard'
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward  "['<Alt><Shift>Tab']"

# remove clutter
cd $HOME; rmdir Documents/ Music/ Public/ Templates/ Videos/; rm examples.desktop

## disable popularity-contest
#sudo dpkg-reconfigure popularity-contest # disable

# docker add repo
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

# oracle 8 add java repo
sudo add-apt-repository -y ppa:webupd8team/java
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections

# update all repos, upgrade
sudo apt-get update
sudo apt-get -y dist-upgrade

# install etckeeper and initialize it
sudo apt-get install -y etckeeper
sudo etckeeper init

# install local installers already gathered
sudo mkdir /mnt/hdd
sudo mount /dev/vg_hdd/lv_hdd /mnt/hdd
cd /mnt/hdd/iso_installers/ubuntu-installers
sudo apt-get install -y ./atom-amd64.deb ./google-chrome-stable_current_amd64.deb ./insync_1.4.4.37065-artful_amd64.deb ./slack-desktop-3.1.0-amd64.deb ./vagrant_2.0.3_x86_64.deb ./virtualbox-5.2_5.2.8-121009_Ubuntu_zesty_amd64.deb ./skypeforlinux-64.deb ./keybase_amd64.deb ./chefdk_2.4.17-1_amd64.deb

# install all the software
DEBIAN_FRONTEND=noninteractive `#no prompting` \
sudo apt-get install -y \
keepass2 synergy gnome-tweak-tool chrome-gnome-shell `#tools` \
vim vim-scripts vim-runtime vim-doc curl xd \
lm-sensors p7zip-full exfat-utils exfat-fuse encfs libimage-exiftool-perl `#systools` \
ubuntu-restricted-extras gimp audacity vlc vlc-plugin-fluidsynth ffmpeg atomicparsley `#media` \
openjdk-8-jdk icedtea-8-plugin `#java` \
openssh-server fail2ban `#daemon` \
openvpn network-manager-openconnect-gnome network-manager-openvpn-gnome `#network-client` \
rdesktop freerdp2-x11 xtightvncviewer sshpass qbittorrent wireshark nmap nikto chkrootkit wavemon namebench apache2-utils mailutils `#netutils` \
virtualenv python2.7-examples python-pip `#python` \
build-essential `#build-tools` \
sqlitebrowser yamllint highlight gawk `#dev-tools` \
lynis pandoc apt-transport-https `#misc` \
xchat pidgin `#chatapps` \
docker-ce `#docker` \
oracle-java8-installer `#oraclejava8` \
ansible `#automation`

# Set good vim
sudo update-alternatives --set editor /usr/bin/vim.basic

# install youtube-dl
pip install youtube-dl

# set env and aliases
cat <<EOF >> $HOME/.bashrc
export PATH="$HOME/.local/bin:$PATH"
alias xclip='xclip -selection clipboard'
alias rdesktop='rdesktop -g 1280x720 -r clipboard:CLIPBOARD -r disk:share=/home/drew'
alias get_ip='_get_ip() { VBoxManage guestproperty get "$1" "/VirtualBox/GuestInfo/Net/1/V4/IP";}; _get_ip'
EOF

# docker
sudo usermod -a -G docker drew

# configure lm_sensors
sudo sensors-detect --auto

Local Installers and config needed

apm install atom-beautify linter-flake8 linter-pep8 autocomplete-python django-templates script-runner teletype
echo y | sudo VBoxManage extpack install "Oracle_VM_VirtualBox_Extension_Pack-5.2.8.vbox-extpack"
vagrant plugin install vagrant-berkshelf; vagrant plugin install berkshelf
run_keybase
insync start ### do some magic here so we don't have to resync 200GB of google drive

When needed

drew@drew-8570w:~$ snap list
Name                  Version                  Rev   Developer      Notes
core                  16-2.29.4.2              3604  canonical      core
drive                 current                  22    fireeye        -
juju                  2.3.1                    3106  canonical      classic
kubectl               1.9.0                    266   canonical      classic

Configure misc

Dash to Dock

https://extensions.gnome.org/extension/307/dash-to-dock/

Set gnome-screenshot default save directory

?

Gnome Tweak Tool

TopIcons-plus - for Insync, Slack, Skype icons
Extension update notifier
Freon
Status area horizontal spacing
$ ~/.local/share/gnome-shell/extensions
sudo apt-get install chrome-gnome-shell
* restart GNOME Shell (Alt+F2, r, Enter) and enable the extension through gnome-tweak-tool.

Maybe Snaps

drew@drew-8570w:~$ snap list
picard                1.4.2                    2     pachulo        -
spotify               1.0.70.399.g5ffabd56-26  5     spotify        -
sqlitebrowser-casept  3.9.1                    2     casept         -
vault                 v0.9.0                   236   snapcrafters   -
vscode                1.19.1-1513676564        22    flexiondotorg  classic