Lubuntu Post Installation

Every time I install a fresh copy of Lubuntu on one of my devices I have to think a long time what apps to install after the default install and what changes I normally do to config files etc. Since I'm sharing a very common problem to a whole lot of others (I'm getting older every day :-) I decided to write some kind of recipe to cook my own installation to save tons of time next time (what at poem, ain't it?! :-).

/etc/apt/apt.conf
/etc/apt/apt.conf.d/30proxy on newer systems (Ubuntu 16.04 and above)
Acquire::http { Proxy "http://proxy.mynet.local:1234/"; };

~/.bashrc
if [ "`id -u`" = "0" ]
then PS1='\n[\[\033[31m\]\u\[\033[00m\] @ \[\033[01;33m\]\h\[\033[00m\]] `pwd` (\t) \[\033[31m\]#\[\033[00m\] '
else PS1='\n[\[\033[32m\]\u\[\033[00m\] @ \[\033[01;33m\]\h\[\033[00m\]] `pwd` (\t) \[\033[32m\]$\[\033[00m\] '
fi
alias dir='ls -halF'

/etc/profile
export HTTP_PROXY="http://proxy.mynet.local:1234/"
export FTP_PROXY="$HTTP_PROXY"
export HTTPS_PROXY="$HTTP_PROXY"
export http_proxy="$HTTP_PROXY"
export ftp_proxy="$HTTP_PROXY"
export https_proxy="$HTTP_PROXY"

/etc/default/grub
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=10
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_CMDLINE_LINUX_DEFAULT="nosplash"
GRUB_GFXMODE=1152x864
GRUB_GFXPAYLOAD_LINUX=keep

/etc/grub.d/05_debian_theme
set_default_theme(){
[...]
echo "${1}set menu_color_normal=yellow/blue"
echo "${1}set menu_color_highlight=white/green"

/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254
broadcast 192.168.0.255
dns-nameserver 192.168.0.254
dns-search domain.test test lan home

/etc/init/tty1.conf
exec /sbin/getty --noclear -8 38400 tty1

/etc/init/tty12.conf
exec exec /usr/bin/htop > /dev/tty12 < /dev/tty12

Mandatory Packages:
sudo apt-get install gpm mc krusader krename kdiff3 unace unrar unzip arj gtkterm cutecom minicom krdc lsscsi openssh-server lhasa icedtea-7-plugin fbset htop

Additional Packages:
sudo apt-get install libreoffice libreoffice-pdfimport audacity vlc k3b dvdstyler wireshark dia krita eagle krfb lm-sensors xfce4-sensors-plugin wine lubuntu-restricted-extras cryptsetup vmfs-tools testdisk project-x pavucontrol skype

Server Packages:
sudo apt-get install atftpd apache2 nfs-kernel-server

Optional Packages:

"Mixxx" is an open-source DJ-ing software. Forget about spending your hard earned money in Traktor, BPM-Studio etc., Mixxx is all you need!

sudo -E add-apt-repository ppa:mixxx/mixxx
sudo -E add-apt-repository ppa:mixxx/mixxxbetas
sudo apt-get update
sudo apt-get install mixxx

"XEN" is an open source virtualization software (in fact a hypervisor), it is not as easy and plug-and-play as VirtualBox for example, but definitely worth giving a try.

sudo apt-get install xen-hypervisor-amd64 xen-tools virt-manager ssh-askpass

"Camera Monitor" is a nice tool if you own a web cam and you want to know it's status (especially for the ones built-in in netbooks/notebooks, they often have no power indicator!). Download the up-to-date package at Launchpad and then run

sudo apt-get install python-pyinotify
sudo dpkg -i cameramonitor-xyz.deb

or add the PPA and install from there.

"SAMBA4" is a possible replacement for Windows AD-DCs. Setting it up as DC is rather simple, just delete the standard smb.conf and run:

sudo samba-tool domain provision --use-ntvfs --realm=mydom.test --domain=MYDOM --server-role=dc --dns-backend=SAMBA_INTERNAL --adminpass="xxxxx"

Add these lines to /etc/samba/smb.conf to provide DNS services also to your clients:

dns forwarder = 8.8.8.8
# dns recursive queries = yes # not working, remove it

and run this command on your linux box:

net rpc rights grant 'SAMDOM\Domain Admins' SeDiskOperatorPrivilege -U'SAMDOM\administrator' -I dc1.samdom.example.com

To check the status, use:

net rpc rights list accounts -U'SAMDOM\administrator' -I dc1.samdom.example.com

Don't forget to add "winbind" to the passwd and group entries in /etc/nsswitch.conf !

"MySQL" database for ownCloud:

mysql -uroot -p

mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
mysql> CREATE DATABASE IF NOT EXISTS owncloud;
mysql> GRANT ALL PRIVILEGES ON owncloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';

Wipe your hard disk with dd

dd if=/dev/zero of=/dev/sdX bs=1M &
while [ -e /proc/xxxxx ] ; do kill -USR1 xxxxx ; sleep 10 ; done