Ubuntu 15.10 setup
|
Throw Ubuntu on a USB stick following ubuntu instructions.
Reboot, select to boot the thumb in BIOS, install, checking the [download as you go] and [install 3rd party stuff] boxes.
Things to install ASAP:
- (everything, then see more detailed notes, below)
sudo apt-get install i3 i3lock i3status suckless-tools dunst openssh-server cifs-utils smbclient synergy arandr ubuntu-restricted-extras exfat-fuse exfat-utils hfsprogs acpi gparted chromium-browser p7zip-full k4dirstat screen rxvt-unicode grdesktop openvpn bridge-utils nautilus-compare smartmontools git gimp network-manager-gnome
- if ubuntu forced grub as the boot manager, download the refind zip file, unpack, and (re)run ./install.sh.
- install i3
- EITHER install i3 and i3 meta package through ubuntu: sudo software-center # then install i3 and i3 meta package
- OR do it yourself: sudo apt-get install i3 i3lock i3status suckless-tools dunst
- in .i3/config, set up nm-applet to run on login: exec --no-startup-id nm-applet
- in .i3/config, set up synergy to run on login: exec --no-startup-id synergy
- gsettings set org.gnome.desktop.background show-desktop-icons false # this disables the gnome desktop from opening when you run nautilus
- then logout from unity and log back in to i3
- sudo apt-get install urxvt # for a terminal that we can control (float, set geometry) with i3
- nvidia drivers
- open unity-control-panel AS ROOT: sudo unity-control-panel
- select Sofware and Updates
- select Additional Drivers tab, click nvidia (and Intel mobo, etc as needed) proprietary driver, Apply
- set up ssh
sudo apt-get install openssh-server # default is ok but see /etc/ssh/sshd_config for details
cd ~m/.ssh
scp m@bitpost.com:/home/m/.ssh/authorized_keys .
scp m@bitpost.com:/home/m/.ssh/id_rsa_3072_nopswd .
ln -s id_rsa_3072_nopswd id_rsa
- as root, create /root/samba_credentials (copy it from another machine)
- set up scripts repo
git clone ssh://bitpost.com/home/m/development/scripts
cd && ln -s development/scripts scripts
mkdir scripts/ubuntu/[new machine]
- set up config repo (remember we need files in git and symlinks to them from the system, YES THIS SUCKS, GIT!)
verify_ubuntu_config_symlinks # we need to turn ALL THESE into SYMLINKS
mkdir development && cd development
git clone ssh://bitpost.com/home/m/development/config
cd config
# DO ALL THE FOLLOWING AT ONCE or your system will be fubar
cp -r -p [wallee or whatever]/ubuntu [new machine]/ # be careful, this will need pruning/updating NOW
cd && ln -s /home/m/development/config/[new machine]/ubuntu config
cd && ln -s development/config/[new machine]/ubuntu/home/m/.bashrc .bashrc
subl .bashrc # update PATH to include custom scripts folder in path
cd .i3 && mv config config.backup && ln -s /home/m/development/config/common/home/m/.i3/config config # and press Mod+Shift+C to reload
cd .gconf/apps/gnome-terminal/profiles/Default && mv %gconf.xml %gconf.xml.backup && ln -s /home/m/development/config/common/home/m/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml %gconf.xml
# fix up fstab as/if needed
su -
cd /etc
mv fstab /home/m/config/etc/fstab
ln -s fstab /home/m/config/etc/fstab
diff /etc/hosts /home/m/config/etc/hosts (most important: make sure correct hostname is being used)
mv hosts /home/m/config/etc/hosts
ln -s hosts /home/m/config/etc/hosts
verify_ubuntu_config_symlinks # ALL THESE should now be SYMLINKS
- sudo apt-get install cifs-utils smbclient # and create /root/samba_credentials and all the samba /etc/fstab entries
- sudo apt-get install synergy # and configure it
- sudo apt-get install arandr # run to turn a monitor back on if it gets turned off during power cycling
- sudo apt-get install ubuntu-restricted-extras # for mp3s in firefox, etc.
- sudo apt-get install exfat-fuse exfat-utils # for access to modern exfat thumb drives (>4gb files)
- sudo apt-get install hfsprogs # if you want to access osx volumes
- sudo apt-get install acpi # for power management, so we can check battery level on laptop!
- sudo apt-get install gparted chromium-browser p7zip-full k4dirstat screen # more good tools
- sudo apt-get install nautilus-compare # then run nautilus-compare-preferences and pick kdiff3 for all
- sudo apt-get install smartmontools # use to test drive health with [smartctl] - DO IT OFTEN
- set up networking (see above)
- MAKE SURE to turn off stupid errors=mount in /etc/fstab if Ubuntu set it there
# MDM UBUNTU STOP F'IN AROUND WITH remount-ro
# UUID=6d51557a-1aaf-4594-8c28-f51a8730f63f / ext4 errors=remount-ro 0 1
UUID=6d51557a-1aaf-4594-8c28-f51a8730f63f / ext4 errors=continue 0 1
- # download steam .deb file, [sudo software-center ~m/Downloads/.....deb]
- # set up firefox sync, make sure adblock is installed, etc.
- from a running terminal, set scrollback buffer to unlimited: Edit -> Profile Preferences -> Scrolling
AWS | OpenVPN | RemoteDesktop
- sudo apt-get install grdesktop openvpn bridge-utils
- get a set of OpenVPN certificate files
OpenVPN Desc
|
OpenVPN files
|
Config file
|
(e.g.) m.gec.poweranalytics.io.conf
|
User Certificate
|
client.crt
|
CA Certificate
|
ca.crt
|
Private Key
|
client.key
|
- start a terminal as root, and start a VPN session:
root@wallee:/home/m/development/power_analytics/docs/private/vpn/m.gec.poweranalytics.io-openvpn# openvpn --config m.gec.poweranalytics.io.conf
- This is available but more work, never bothered...
- sudo unity-control-center
- Click +, VPN, OpenVPN, Create... etc.
Development setup
- # install android studio manually from zips into development folder
- install eclipse
- use the eclipse installer to install into development/eclipse folder (be careful not to install to eclipse/eclipse, if so just move and fix eclipse.ini)
- put ~m/development/eclipse/eclipse.ini into config
- run eclipse and create ~m/development/eclipse-workspace and select as default
- use shared eclipse settings, to avoid problems like this.
- see Development reference for Eclipse installation specifics
- install boost, see Development reference
- (everything)
sudo apt-get install emacs build-essential automake libtool libssl-dev libbz2-dev python-dev curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline kdiff3 sqlite3 sqlitebrowser
- (or individually...)
- sudo apt-get install emacs
- sudo apt-get install build-essential automake libtool # for automake - build-essential may be there already
- sudo apt-get install libssl-dev # to get autotools "-lssl" to work
- sudo apt-get install libbz2-dev python-dev # used by boost
- sudo apt-get install curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline # for php with curl (for etrade PHP SDK etc)
- sudo apt-get install kdiff3 # will pull in a shit-ton of kde deps, i guess that's good
- sudo apt-get install sqlite3 sqlitebrowser
- install sublime editor (see below)
- install Node.js (see below) then you can install npm packages rad-scripts and mah-haus
- install Java (see below), then you can add to the Java stack as needed: play, sbt, activator...
- run setup_for_dev.node.js to pull down all active dev repos (in progress)
- hipchat hipshat
sudo su
echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add -
apt-get update
apt-get install hipchat
|
Ubuntu set up networking
|
Install NetworkManager, as the wpagui UI sucks
- sudo apt-get install network-manager-gnome
- YOU MUST remove interfaces from /etc/network/interfaces so wpa gives them up to nm-applet
- add nm-applet to startup if needed - i don't think it is needed as it seems to start up automatically now - try rebooting first
|
Ubuntu install Sublime
|
Sublime editor seems way better than anything else out there on linux:
- sudo add-apt-repository ppa:webupd8team/sublime-text-3
- sudo apt-get update
- sudo apt-get install sublime-text-installer
- git config --global core.editor "subl -n -w" # to use sublime with -n(ew window) and -w(ait for exit)
|
Ubuntu install Node.js
|
Install Node.js using the "Node.js Version Manager" nvm details
- find the latest nvm version
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
- source ~/.profile
- nvm ls-remote
- nvm install ##### # (latest version, eg 5.8.0)
- MDM I don't need this do I? I'm not running express... npm install -g express # to set the package manager to use a globally shared location
- nvm alias default stable
- (update .bashrc to configure node on even non-interactive shells - see another for example)
- also: nvm use 4.2.1; node -v; nvm ls; nvm alias default 0.11.13; nvm use default
- also: You can create an .nvmrc file containing version number in the project root directory and it will default to that version
|
Ubuntu install Java
|
Install Oracle JDK 8 (9 is scheduled for release in 2016)
su -
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
update-alternatives --config java # make note of path
update-alternatives --config javac # make note of path
sudo subl /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" # actually, use the path from above, of course
|
Ubuntu and shitty Seiki
|
AMD
Radeon driver sucks, won't go over 1080p; and Dune (AMD chipset) overscans so you can't see the edge.
The only fix I found was to use xrandr. It kinda sucks though bc it's a resize solution that blurs all pixels. Cest la vie.
xrandr --output HDMI-0 --set underscan on
xrandr --output HDMI-0 --set "underscan hborder" 40 --set "underscan vborder" 22
Let's try the binary ATI driver.
lspci -vvnn | grep VGA
[...] Advanced Micro Devices, Inc. [AMD/ATI] RS780 [Radeon HD 3200] [1002:9610]
|
nvidia
For 4k video on an nvdia chipset (like wimpy), first get Ubuntu to use nvidia's driver:
- Go to System Settings-> Software & Updates
- Select the Additional Drivers tab
- Select the tested, proprietary NVIDIA binary driver
- REBOOT - the nvidia driver works at the kernel level so you won't be able to just restart X. fools
- WHY does ubuntu make you do all this?
Next, here is the "magic super-secret" Seiki 4K goo that should go in xorg.conf (if needed).
It's from: http://ubuntuforums.org/showthread.php?t=2164924
See /etc/X11/xorg.conf for the full details:
# MDM added based on http://ubuntuforums.org/showthread.php?t=2164924
# Modeline "3840x2160" 307.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
# MDM 2015/02/12 A more recent one from: http://ubuntuforums.org/showthread.php?t=2164924&page=3&s=b53cb9ea1b751f4b9f2fe1aadfb6f43f
Modeline "3840x2160" 296.70 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
Modeline "1920x1080" 297 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
To get a full output of what the hell X is doing:
scite /var/log/Xorg.0.log &
# Or create one if needed
X -logverbose 6 :2 # this crashed my machine but did produce a log first
scite /var/log/Xorg.2.log &
|
Ubuntu repo management
|
To see what repos Ubuntu is currently using:
cat /etc/apt/sources.list
|
Set up a new Pi in 10 minutes
|
The BEST thing to do is to copy the MicroSD from Carambola (marked with a black 'O'):
- open a terminal so we can watch the MicroSD /dev/sd{#} assignments
sudo tail -f /var/log/syslog
- take the carambola MicroSD card out of the Pi and put it into an Anker hub (gets less hot than the small MicroSD sleeves - and it WILL get hot!)
- put another new MicroSD card into another Anker hub
- open another terminal
dcfldd bs=4M if=/dev/sd{Letter of carambola} of=/dev/sd{Letter of new card}
- They will get HOT... I don't know how to make sure they don't get TOO hot yet... cross your fingers I guess...
- Drop the new card into the new Pi, boot, change /etc/hostname and reboot
|
Set up raspbian on a new Pi
|
Here are all (most?) of the steps to get a raspbian OS going on the Pi (very similar to unbuntu-on-PC).
- Get a Raspbian image from here
- Create a boot MicroSD following this
- Use gnome-disks to expand the root partition to 16GB, and create a nice ExFat share on the rest if there is more space
- Boot it up and fix the locale with
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales # USE THE SPACE TO SELECT US and unselect GB (fucked up keyboard)
sudo dpkg-reconfigure keyboard-configuration # pick US or your keyboard is fubar
# now you have to reboot - this is a disaster pi, fix it
- Default user is pi/raspberry, better change that...
sudo adduser m
sudo passwd pi
sudo su - # and use [passwd] to set a known root password
- One-shot install of everything, then see more detailed notes, below...
sudo apt-get install kdm i3 i3lock i3status suckless-tools dunst openssh-server cifs-utils smbclient synergy arandr exfat-fuse exfat-utils hfsprogs gparted p7zip-full k4dirstat screen rxvt-unicode grdesktop openvpn bridge-utils kdiff3 nautilus-compare smartmontools automake libtool npm git network-manager-gnome iceweasel
- You may need to reconfig to use KDM so you can pick i3 (although if you log out that might work too - To logout, press Mod+shift+e (like exit) ):
sudo dpkg-reconfigure kdm
- One-shot dev install goes pretty well too:
sudo apt-get install scite sciteproj emacs build-essential automake libtool libssl-dev libbz2-dev python-dev curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline sqlite3 sqlitebrowser oracle-java8-jdk
- Install node with Node Version Manager (nvm) exactly the same way as in ubuntu (see above).
- Pull down and set up config, scripts like in Ubuntu.
- Pull down thedigitalage/rad-scripts, run [npm install]
- cd scripts/node/mah-hause, run [npm install], run [sy create] to create all dev repos.
There is no chromium-browser - use iceweasel (firefox on ARM) or epiphany-browser (which was enhanced specifically for pi).
My editors (Eclipse, sublime) are not really available, use scite instead.
Java [apt-get install oracle-java8-jdk] is available in the default raspbian apt repo.
|
OpenELEC multi-boot install
|
The easiest way is to add a new drive just for OpenElec and install OpenElec to it with the installer. But if you want to SHARE ONE DRIVE with other boots, DO NOT DO THAT :-) Do this instead:
- On an existing refind-booted system, set up two new ext4 partitions
- one about 2GB in size, labeled [SYSTEM], and marked as bootable
- the other with 10GB or more, labeled [STORAGE]
- prep the drives (no journal, ssd trim)
- download openelec and mount; there are a couple ways:
- get the img and install to a thumb
- get the img and mount (see below)
- Set up OE drives to mount in other OSes to /openelec-system and /openelec-storage
/dev/disk/by-label/SYSTEM /openelec-system ext4 noatime 0 0
/dev/disk/by-label/STORAGE /openelec-storage ext4 noatime 0 0
- copy target/KERNEL and target/SYSTEM to SYSTEM
cp OpenELEC_img/target/KERNEL /openelec-system/
cp OpenELEC_img/target/SYSTEM /openelec-system/
- set up UEFI boot
- subl /boot/efi/EFI/refind/refind.conf (and add this block)
# MDM Trying this, from: http://openelec.tv/forum/64-installation/70783-how-to-efi-booting-openelec-on-new-pc-s-nuc-s
# Only I had to change BOOT to SYSTEM. and quiet to debugging.
menuentry OpenELEC {
icon EFI/refind/icons/os_openelec.png
volume SYSTEM
ostype Linux
loader KERNEL
# options "boot=LABEL=SYSTEM disk=LABEL=STORAGE debugging"
options "boot=LABEL=SYSTEM disk=LABEL=STORAGE quiet"
}
- I THINK you need one or more of these too, not sure!
cp target/boot/bootx64.efi /openelec-system/BOOT
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
|
OpenELEC boot from thumb
|
NOTE: I have the image already on a white stick with red lettering... anyway...
- Get the latest dev version (stable didn't work for me although this may change)
- dd it onto a thumb
- reboot and select to boot to the thumb in BIOS
- when the boot: line comes up, type "live" to get run a live Kodi rather than run the crufty old installer
|
Windows 10 new setup
|
C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User
|
|