Skip to content

Instantly share code, notes, and snippets.

@sandys
Last active December 21, 2017 00:25
Show Gist options
  • Save sandys/6030823 to your computer and use it in GitHub Desktop.
Save sandys/6030823 to your computer and use it in GitHub Desktop.
super lean and fast Ubuntu 12.04 install. It doesnt hang and with firefox open, it consumes 500 mb of RAM ! - Now works with Ubuntu 14.04/Trusty Tahr!
#Brightness increase/decrease problem on inspirons
#check `ls /sys/class/backlight/` - it should show `dell_backlight` and `intel_backlight`
sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf
`Section "Device"
Identifier "card0"
Driver "intel"
Option "Backlight" "intel_backlight"
BusID "PCI:0:2:0"
EndSection`
# in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_backlight=vendor”
# run `sudo update-grub`
#reboot
docker#run this in bash. somehow the wildcards dont work on zsh
#for nemo file manager instead of nautilus
sudo add-apt-repository ppa:noobslab/mint
#for latest git.
sudo apt-add-repository ppa:git-core/ppa
#for gnome-shell... cos unity will suck up all your memory
#plus https://extensions.gnome.org/ !!!
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell synaptic lm-sensors cpufrequtils openssh-server ppa-purge vim-gnome git nemo vlc libstdc++6:i386 ia32-libs aptitude
sudo apt-get remove zeitgeist* zeitgeist-core zeitgeist-datahub python-zeitgeist rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database ubuntuone* whoopsie ubuntuone-client* python-ubuntuone-storage* ubuntuone-installer* menu apt-xapian-index oneconf deja-dup indicator-messages telepathy-indicator software-center totem rhythmbox menu rhythmbox-plugin-zeitgeist liboverlay-scrollbar* nautilus update-manager
sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/geany 10
#for java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
# ~~ DEPRECATED download -pf kernel and install it (64-bit linked below)
# http://repos.natalenko.name/debian/pf/linux-image-3.8.2-pf_1_amd64.deb
# http://repos.natalenko.name/debian/pf/linux-headers-3.8.2-pf_1_amd64.deb~~
#install 3.12 kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-trusty/
sudo apt-get autoremove
sudo apt-get autoclean
#Aptitude is a better apt-get
#make aptitude aware of all installed packages
sudo aptitude keep-all
#at the end to remove all orphaned startup entries, icons, etc.
aptitude -F %p search '~c' | xargs sudo dpkg -P
#for bittorrent
sudo apt-get install transmission
#for Virtualbox
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update
sudo apt-get install dkms
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/virtualbox-4.3_4.3.0-89960~Ubuntu~precise_amd64.deb
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
sudo dpkg -i virtualbox-4.3_4.3.0-89960\~Ubuntu\~precise_amd64.deb
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
#enable USB passthrough and 2.0 AHCI
#for docker
#you need to use docker version 0.7 onwards because it will complain about missing AUFS on all kernels above 3.5 otherwise
http://test.docker.io | sudo sh
#copy the sudoers file below to /etc/sudoers
#performance tweaks
#~~DEPRECATED because of http://lwn.net/Articles/545244/ - sudo apt-get install zram-config~~
# ~~ DEPRECATED ALSO - add "zcache" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zcache" ~~
#enable zswap https://www.kernel.org/doc/Documentation/vm/zswap.txt http://www.phoronix.com/scan.php?page=news_item&px=MTQwODI
# make sure you are running kernel >3.11 and add "zswap.enabled=1" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#verify swap by "dmesg | grep zswap". you should see "zswap: loading zswap"
# to check zswap performance - check /sys/kernel/debug/frontswap/succ_stores, if succ_stores is
#0 it means that the memory pressure is still not heavy and none pages need be swapped out.
# or do "sudo grep . -Ir /sys/kernel/debug/zswap/"
#add noatime to all filesystems
#UUID=735916a6-35e3-4e9f-b2b4-cff955e0c10f /home ext4 defaults,noatime
#verify it installed by cat /proc/swaps - you should see /dev/zram{#} entries with a non-zero priority. hard disks should be set
# with negative priority
sudo sensors-detect
#make sure coretemp is added to /etc/modules (happens automatically)
#wifi fixes for 11n wifi
echo "options iwlwifi 11n_disable=1 swcrypto=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
# to test immediately try "sudo modprobe -rv iwldvm && sudo modprobe -v iwldvm" and then "iwconfig"
#change
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
#hosts: files dns
#to rebuild final grub config
sudo update-grub
#reboot
#remount filesystems sudo mount -o remount /dev/sda4
#run this in bash. somehow the wildcards dont work on zsh
#for gnome-shell... cos unity will suck up all your memory
#plus https://extensions.gnome.org/ !!!
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell synaptic lm-sensors cpufrequtils openssh-server ppa-purge vim-gnome git nemo vlc aptitude geany transmission inxi linux-tools-common libqt4-opengl linux-tools-generic cpufrequtils acpi
#check your system through `inxi -F` rather than uname
#for Oracle java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
#for python dev
sudo apt-get install python-dev
# use this for Ruby http://www.lambdacurry.com/damn-fast-production-ready-ruby-setup/
#Aptitude is a better apt-get
#make aptitude aware of all installed packages
sudo aptitude keep-all
sudo aptitude remove ~nzeitgeist zeitgeist-core zeitgeist-datahub python-zeitgeist rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database ~nubuntuone whoopsie ~nubuntuone-client ~npython-ubuntuone-storage ~nubuntuone-installer menu apt-xapian-index oneconf deja-dup indicator-messages telepathy-indicator software-center totem rhythmbox menu rhythmbox-plugin-zeitgeist ~nliboverlay-scrollbar nautilus update-manager
sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/geany 10
#at the end to remove all orphaned startup entries, icons, etc.
aptitude -F %p search '~c' | xargs sudo dpkg -P
#aptitude equivalent of apt-get autoremove... completely non-obvious
sudo aptitude -oAptitude::Delete-Unused=1 install
#for Virtualbox
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update
sudo apt-get install dkms
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/virtualbox-4.3_4.3.0-89960~Ubuntu~precise_amd64.deb
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
sudo dpkg -i virtualbox-4.3_4.3.0-89960\~Ubuntu\~precise_amd64.deb
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
#enable USB passthrough and 2.0 AHCI
#add yourself to vboxusers group, else you wont have USB passthrough
sudo adduser user vboxusers
#copy the sudoers file below to /etc/sudoers
#performance tweaks
#~~DEPRECATED because of http://lwn.net/Articles/545244/ - sudo apt-get install zram-config~~
#~~DEPRECATEDverify it installed by cat /proc/swaps - you should see /dev/zram{#} entries with a non-zero priority. hard disks should be set
#~~DEPRECATED with negative priority
# ~~ DEPRECATED ALSO - add "zcache" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zcache" ~~
#enable zswap https://www.kernel.org/doc/Documentation/vm/zswap.txt http://www.phoronix.com/scan.php?page=news_item&px=MTQwODI
# make sure you are running kernel >3.11 and add "zswap.enabled=1" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#verify swap by "dmesg | grep zswap". you should see "zswap: loading zswap"
# to check zswap performance - check /sys/kernel/debug/frontswap/succ_stores, if succ_stores is
#0 it means that the memory pressure is still not heavy and none pages need be swapped out.
# or do "sudo grep . -Ir /sys/kernel/debug/zswap/"
#add noatime to all filesystems
#UUID=735916a6-35e3-4e9f-b2b4-cff955e0c10f /home ext4 defaults,noatime
sudo sensors-detect
#make sure coretemp is added to /etc/modules (happens automatically)
#wifi fixes for 11n wifi
echo "options iwlwifi 11n_disable=1 swcrypto=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
# to test immediately try "sudo modprobe -rv iwldvm && sudo modprobe -v iwldvm" and then "iwconfig"
#change in /etc/nsswitch.conf
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
#hosts: files dns
#update your kernel to 3.14
wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-image-3.14.1-031401-generic_3.14.1-031401.201404141220_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401-generic_3.14.1-031401.201404141220_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401_3.14.1-031401.201404141220_all.deb
sudo dpkg -i linux-headers-3.14.1-*.deb linux-image-3.14.1-*.deb
#to rebuild final grub config
sudo update-grub
#reboot
#remount filesystems sudo mount -o remount /dev/sda4
sudo cpupower frequency-set -g powersave
acpi -V | grep capacity
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet
xdg-mime default transmission-gtk.desktop application/x-bittorrent
#for docker
### DEPRECATED - sudo aptitude install docker.io
wget -qO- https://get.docker.io/gpg | sudo apt-key add -
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo aptitude update
sudo aptitude install lxc-docker
sudo gpasswd -a ${USERNAME} docker
# for HEVC video on vlc
sudo apt-add-repository ppa:strukturag/libde265 && sudo aptitude update && sudo aptitude install vlc-plugin-libde265
#For skype working in ubuntu 14.04 64-bit with audio input working
sudo aptitude install pavucontrol libpulse0:i386
#install skype
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Cmnd_Alias WHEELER = /usr/bin/lsof, /bin/nice, /bin/ps, /usr/bin/top, /usr/local/bin/nano, /usr/bin/ss, /usr/bin/locate, /usr/bin/find, /usr›
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/ps
Cmnd_Alias EDITS = /usr/bin/vim, /usr/bin/nano, /usr/bin/cat, /usr/bin/vi
Defaults env_reset,pwfeedback
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults visiblepw, path_info, insults, lecture=always
Defaults loglinelen = 0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth
Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"
Defaults passprompt="Sudo invoked by [%u] on [%H] - Cmd run as %U - Password for user %p:"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
ALL ALL = (ALL) ALL, NOPASSWD: WHEELER, NOPASSWD: PROCESSES, NOPASSWD: EDITS
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
vm.swappiness=10
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
# http://nodebox.metaforix.net/articles/debian-on-lenovo-thinkpad-t420
#create new file /usr/share/X11/xorg.conf.d/99-my.conf
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
Option "LeftEdge" "1751"
Option "RightEdge" "5191"
Option "TopEdge" "1624"
Option "BottomEdge" "4282"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "222"
Option "MaxDoubleTapTime" "180"
Option "SingleTapTimeout" "180"
Option "ClickTime" "100"
Option "EmulateMidButtonTime" "75"
Option "EmulateTwoFingerMinZ" "282"
Option "EmulateTwoFingerMinW" "7"
Option "VertScrollDelta" "-101"
Option "HorizScrollDelta" "-101"
Option "VertEdgeScroll" "0"
Option "HorizEdgeScroll" "0"
Option "CornerCoasting" "0"
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"
Option "MinSpeed" "1"
Option "MaxSpeed" "1.75"
Option "AccelFactor" "0.0395883"
Option "TouchpadOff" "2"
Option "LockedDrags" "0"
Option "LockedDragTimeout" "5000"
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
Option "LTCornerButton" "0"
Option "LBCornerButton" "0"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "0"
Option "ClickFinger1" "1"
Option "ClickFinger2" "1"
Option "ClickFinger3" "0"
Option "CircularScrolling" "0"
Option "CircScrollDelta" "0.1"
Option "CircScrollTrigger" "0"
Option "CircularPad" "0"
Option "PalmDetect" "0"
Option "PalmMinWidth" "10"
Option "PalmMinZ" "200"
Option "CoastingSpeed" "20"
Option "CoastingFriction" "50"
Option "PressureMotionMinZ" "30"
Option "PressureMotionMaxZ" "160"
Option "PressureMotionMinFactor" "1"
Option "PressureMotionMaxFactor" "1"
Option "ResolutionDetect" "1"
Option "GrabEventDevice" "1"
Option "TapAndDragGesture" "1"
Option "AreaLeftEdge" "0"
Option "AreaRightEdge" "0"
Option "AreaTopEdge" "0"
Option "AreaBottomEdge" "0"
Option "HorizHysteresis" "25"
Option "VertHysteresis" "25"
Option "ClickPad" "0"
EndSection
#go into bios and enable virtualization - otherwise virtualbox will not work
# fn+space for thinklight. fn+f7 does NOT work
gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'hibernate'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action suspend
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action suspend
gsettings set org.gnome.settings-daemon.plugins.power percentage-critical 5
gsettings set org.gnome.settings-daemon.plugins.power percentage-action 5
gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false
sudo dpkg --add-architecture i386
sudo aptitude update
sudo aptitude install libjpeg62:i386 libxinerama1:i386 libxrandr2:i386 libxtst6:i386
#always download the 32-bit version from http://www.teamviewer.com/en/download/linux.aspx
sudo dpkg -i teamviewer_10.0.36281_i386.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment