Detailed Ubuntu 14.04LTS Trusty Tahr OS Netbook Customisation

From Linuxcentre Wiki

Jump to: navigation, search

Contents

Work In Progress - Incomplete

BIOS settings

(for Dell Mini 10v)

  • In the BIOS, set a Supervisor password and disable 'Password on Boot' (allows reimaging the netbook without needing the BIOS password)

OS Installation

Ubuntu Trusty Tahr seems to work very well on the Dell Mini 10v netbook out-of-the-box however you will need to follow this section to make things work better.

  • Use unetbootin to create a bootable USB stick using the downloaded desktop i386 iso.
  • Install Ubuntu 14.04LTS desktop (using whole disk).
    • Login automatically
    • Username: pupil
    • Host name: netbook

Updates

  • Install all updates (very important if you want to have usable wireless access). You'll need to connect to the internet via an ethernet cable at this stage.
sudo apt-get update
sudo apt-get dist-upgrade

Make the Touchpad Usable

The following tweaks ensures that the left touchpad button doesn't interfere with the touchpad. It does this by disabling a small portion of the bottom and left of the pad. Without this you will be hitting the keyboard with a large hammer after about 10 minutes because every time you push the button, the cursor moves a little or even jumps to somewhere else on the screen causing frequent mis-clicks. (ref)

  • Install gsynaptics
sudo apt-get install gsynaptics
  • To allow your finger to rest on the left touchpad button and still be able to move the pointer with a second finger you will need to apply this patch ref ref:
apt-get build-dep xserver-xorg-input-synaptics
apt-get source xserver-xorg-input-synaptics
cd xserver-xorg-input-synaptics-*
wget -q -O - http://pastebin.com/raw.php?i=ARmkKQEs | patch -p1
dpkg-buildpackage -us -uc -nc
cd ..
dpkg -i xserver-xorg-input-synaptics_1.7.4-0ubuntu1_i386.deb
  • Clean-up
apt-get purge x11proto-gl-dev libxdmcp-dev x11proto-render-dev libxext-dev autoconf autopoint x11proto-fixes-dev libmirclientplatform-mesa x11proto-xinerama-dev x11proto-scrnsaver-dev libtool libpixman-1-dev x11proto-present-dev libmirclient7 libmirclient-dev libdrm-dev libxi-dev libmirprotobuf-dev libxfixes-dev libprotobuf-dev x11proto-xf86dri-dev x11proto-dri2-dev libpthread-stubs0-dev x11proto-input-dev libmirprotobuf0 x11proto-xf86bigfont-dev libx11-dev x11proto-video-dev zlib1g-dev quilt mircommon-dev automake x11proto-xext-dev x11proto-dri3-dev xorg-sgml-doctools x11proto-fonts-dev x11proto-randr-dev xserver-xorg-dev xtrans-dev dh-autoreconf libprotobuf-lite8 xutils-dev x11proto-core-dev autotools-dev x11proto-resource-dev libxau-dev mesa-common-dev libxcb1-dev libmtdev-dev libpciaccess-dev libxkbfile-dev x11proto-kb-dev
rm -rf /var/cacahe/apt/archive/*.deb
  • Add the following options in /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf under the below shown section:
Section "InputClass"
        Identifier "Dell Inspiron embedded buttons quirks"
        MatchTag "inspiron_1011|inspiron_1012"
        MatchDevicePath "/dev/input/event*"
        Driver "synaptics"
        Option "AreaBottomEdge" "4000"
        Option "TapAndDragGesture" "0"
        Option "EmulateMidButtonTime" "500"
        # Disable tap-select
        Option "TapButton1" "0"
EndSection
  • Reboot

Reduce SSD wear

Optional for models with solid-state disks

  • Add the 'noatime' option to /etc/fstab for the / filesystem ref

Disable ipv6

  • This speeds up some network operations since we're still in the internet dark-age of ipv4.
  • Add these lines to the end of /etc/sysctl.conf:
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Web Proxy

  • In System->Preferences->Network Proxy, set the http proxy to 'proxy' port '8081' and 'apply system-wide'.

Log retention

  • Improved log rotation, change this line in /etc/logrotate.conf :
rotate 0
size 1M

NTP Client

  • Allow laptop to use dhcp ntp servers list (not working so hard code the server):
  • Edit /etc/default/ntpdate and change as follows:
NTPSERVERS="server.network"

Add Packages

  • Install google chrome PPA
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
  • Install these Media packages:
sudo apt-get install google-chrome-stable
  • Remove unity desktop
sudo apt-get purge unity* libpyzy-1.0-0 libqtwebkit4 libqt5webkit5 brasero-common brltty bluez bluez-alsa bluez-cups apport apport-gtk apport-symptoms apparmor duplicity dvd+rw-tools empathy-common eog evolution-data-server evolution-data-server-common example-content folks-common friends friends-dispatcher gcc gcc-4.8 gdb gnome-bluetooth gnome-contacts growisofs hplip hplip-data mobile-broadband-provider-info modemmanager network-manager-pptp-gnome network-manager-pptp pptp-linux pulseaudio-module-bluetooth remmina-common rhythmbox rhythmbox-plugins rhythmbox-mozilla rhythmbox-plugin-magnatune rhythmbox-plugin-zeitgeist rhythmbox-data sane-utils seahorse simple-scan syslinux syslinux-common syslinux-legacy telepathy-salut telepathy-mission-control-5 telepathy-logger telepathy-idle telepathy-haze telepathy-gabble thunderbird thunderbird-locale-en thunderbird-locale-en-us toshset transmission-common transmission-gtk vino wodim xterm 
  • Remove some other large packages
sudo apt-get purge liboxideqtcore libqtqml5 g++-4.8 ubuntu-docs gcompris gcompris-data gcompris-sound-en firefox firefox-locale-en totem-mozilla libstdc++-4.8-dev
  • Install gnome-session-flashback + cairodock
sudo add-apt-repository ppa:cairo-dock-team/ppa
sudo apt-get update
sudo apt-get install cairo-dock cairo-dock-plug-ins
sudo apt-get install gnome-session-flashback
#sudo apt-get install compizconfig-settings-manager
sudo apt-get install indicator-applet-appmenu
sudo apt-get install gnome-tweak-tool
sudo apt-get install eog
sudo apt-get purge brasero growisofs wodim  dvd+rw-tools evolution-data-server
  • Re-add wireless firmware
sudo apt-get install firmware-b43-installer firmware-b43legacy-installer wireless-crda wireless-regdb
  • Need to install these
sudo apt-get install atomix audacity blinken celestia-common-nonfree celestia-gnome dia einstein frozen-bubble gamine gbrainy gimp gimp-data-extras gnome-games gpaint freemind idle-python2.7 idle-python3.4 inkscape kanagram kbruch khangman klavaro ktouch ktuberling kturtle laby labyrinth libreoffice-base littlewizard lybniz mathwar pairs pencil pingus scribus scratch scribus scribus-template ttf-mscorefonts-installer tuxmath tuxpaint tuxtype tuxtype-data vym extremetuxracer
  • Excluded Large pkgs: ri-li stellarium gcompris
  • Excluded Problem pkgs: childsplay

Tuxpaint

  • Create /etc/tuxpaint/tuxpaint.conf as follows:
fullscreen=yes
windowsize=1024x600
altprint=always
papersize=a4
saveover=new
startblank=yes
nolockfile=yes

Scratch

  • Edit /home/pupil/.scratch.ini and add:
ProxyServer=proxy
ProxyPort=8081
Home=/home/*

Scratch 2 Offline Editor

  • Download these:
http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin
http://cdn.scratch.mit.edu/scratchr2/static/sa/Scratch-431a.air
  • Run this to install Adobe Air
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
chmod 755 ./AdobeAIRInstaller.bin
sudo ./AdobeAIRInstaller.bin
  • Run this to install the Scratch application:
Adobe\ AIR\ Application\ Installer $PWD/Scratch-431a.air
  • Start the application and agree to the licenses

Google Earth

  • Install package builder:
apt-get install googleearth-package
  • Build pkg
make-googleearth-package --force
  • install resulting pkg (version may differ):
sudo dpkg -i googleearth_*.deb
  • clean up
googleearth_*.deb GoogleEarthLinux.bin

Login Specific settings

These changes are all changed/stored per user:

Keyboard Tweaks

  • Make the 'Windows' key do F11 zooming in applications that support it
  • Create a file called $HOME/.Xmodmap as follows:
keycode 133 = F11
  • When you next login you should add the modmap as requested.

Desktop Customisation

  • Use normal scrollbars:
gsettings set com.canonical.desktop.interface scrollbar-mode normal
  • Disable locking of screen and hibernate modes, open gconf-editor
    • browse to apps->gnome-power-manager->general, uncheck can_hibernate option
    • browse to apps->gnome-power-manager->lock, uncheck all buttons
    • browse to desktop->gnome->lockdown, check disable_lock_screen and, disable_user_switching
  • In Nautilus add bookmarks for folders such as: MyFiles, Downloads, Pictures, Scratch Projects, Videos, MyFiles Backups
  • Move window controls from right to left

OpenOffice

  • Disable auto-correction features:
    • Open openoffice writer
    • go into 'Tools->AutoCorrect Options'
    • uncheck Autoinclude in 'Exceptions' tab
    • In the 'Options' tab disabled the following features: 'Correct Two Initial Capitals', 'Capitalize first letter of every sentence'
    • In the 'Word Completion' tab, unchecked 'Enable Word Completion'.

General

  • Setup login screen to auto-login 'pupil' and auto-login at boot.
  • Add common ssh root public key(s) for remote root admin if required
  • Disable package update checking (this should be done in a controlled manner and not on an ad-hoc basis).

Printing

  • Add this before 'exit 0' in /etc/rc.local to clean up stale print jobs
# remove old print jobs
rm -f /var/spool/cups/[cd]*

Set the Build Version

  • Set the netbook build version so that the custom scripts and pupil home dir are obtained from the correct server dirs:
sudo -s
echo '3' > /etc/build_version

Copy over Custom Scripts

  • Copy the custom-scripts into place from the server:
sudo mkdir -p /opt/custom-scripts/
sudo rsync -av server::custom-scripts3/ /opt/custom-scripts/

Auto-mount of network share

  • Link to NetworkManager scripts dir so that it runs upon network interface up/down events:
sudo ln -s /opt/custom-scripts/NetworkManager_actions /etc/NetworkManager/dispatcher.d/99-NetworkManager_actions

User Management

  • All users would auto-login as user 'pupil'.
  • No account management required.
  • Create the following directories on the server share:
Class1,Class2,Class3,Class4, or Year1, Year2, Year3 and so on
  • In each of these directories create named directories for the pupils in each class.

Scripted Symlinks

  • The script '/opt/custom-scripts/link_user' will be run whenever the network gets connected
  • Create a desktop Launcher called 'Change User' pointing to this script.
  • The /opt/custom-scripts/cifs-gvfs-mount script mounts a share in Nautilus for a specified user using gvfs-mount.

Printer

  • Add and configure networked printer (photocopier)
  • Need to determine model, IP address and driver if required.

Home Directory Synchronisation

  • A custom service runs that, upon network connectivity, runs a start-up script that performs the following:
    • Gets the common /opt/custom-scripts from the server if available (via rsync)
    • Runs the script which could contain: commands to install or update certain packages, other sysadmin type tasks (todo)
    • Syncs server master copy of pupil home dir /opt/pupilhome/ with the local /opt/pupilhome/
  • Add a command that syncs the /opt/pupilhome/ dir with /home/pupil/ upon boot-up as follows in /etc/rc.local (before 'exit 0'):
test -f /opt/custom-scripts/.home-sync-xfer-lock \
|| rsync -av --progress --one-file-system --delete /opt/pupilhome/ /home/pupil/ \
--exclude=Desktop/Emergency\ MyFiles/** --exclude=.gvfs
# remove 'Emergency MyFiles' older than 30 days
find /home/pupil/Desktop/Emergency\ MyFiles/ -ctime +30 -type d -exec rmdir {} \;
find /home/pupil/Desktop/Emergency\ MyFiles/ -ctime +30 -type f -exec rm {} \;

Update Master Pupil Home Directory

  • Copy the current /home/pupil to the server after logging out:
  • Logout of pupil account
  • On a text terminal (Fn-ALT-F1) login as pupil and run this:
rsync -avx --delete /home/pupil/ /opt/pupilhome/
rsync -avx --delete /home/pupil/ root@server:/opt/pupilhome/

To-Do

  • In safe mode before imaging, Remove the entries in /etc/udevd/rules.d/70-persistent-net.rules for eth0 and eth1 (prevents laptops trying to use eth2/3 instead after imaging)
  • Clear the apt cache to save disk space: sudo rm -f /var/cache/apt/archives/*
  • In /etc/NetworkManager/system-connections/ :
    • Remove the mac-address= and seen-bssids= lines from contained files
    • Ensure there are no <SSID>-<UUID> files or *~ files
    • Ensure all remaining files are owner/group=root and perms=0600
  • 'Phone-home' for security: Add an autossh service to a trusted internet server IP so that if any laptop is stolen we have the IP address and service tag (from dmidecode) if booted.

Future Improvements

  • Smart-tech notebook drivers/software (need serial/activation key first from school)
  • Install iTalc master

Known Issues

  • ntp-servers in dhcp server list not used by dhcpclient

Cairo-dock session causing keyboard lock-ups

  • Solution is to revert to gnome session:
  • To force a user's default session to be different:
perl -p -i  -e 's/^(XSession|Session)=.*$/$1=cairo-dock/g' /var/cache/lightdm/dmrc/pupil.dmrc /home/pupil/.dmrc /opt/pupilhome/.dmrc /var/lib/AccountsService/users/pupil
  • Customise desktop
  • Sync to master home
  • Install mate desktop
sudo apt-get purge ....
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install --install-no-recommends --install-no-suggests ubuntu-mate-core ubuntu-mate-desktop
sudo apt-get purge bluez-cups brasero brasero-cdrkit brasero-common brltty \
 brltty-x11 deja-dup deja-dup-backend-cloudfiles deja-dup-backend-gvfs \
 deja-dup-backend-s3 duplicity dvd+rw-tools firefox growisofs hexchat \
 hexchat-common librhythmbox-core8 modemmanager network-manager-pptp \
 network-manager-pptp-gnome mobile-broadband-provider-info modemmanager \
 onboard onboard-data pidgin pidgin-data ntp pptp-linux rhythmbox \
 rhythmbox-data rhythmbox-plugin-cdrecorder rhythmbox-plugins simple-scan \
 thunderbird transmission-common transmission-gtk vlc vlc-data vlc-nox \
 vlc-plugin-pulse usb-creator-gtk wodim xzoom syslinux syslinux-common \
 syslinux-legacy pidgin-libnotify pidgin-otr
  • Remove cairo dock
apt-get purge cairo-dock cairo-dock-core cairo-dock-data cairo-dock-plug-ins:i386 cairo-dock-plug-ins-data cairo-dock-plug-ins-dbus-interface-python cairo-dock-plug-ins-integration:i386  docbook-to-man gnome-common autopoint gstreamer0.10-gconf gtk-doc-tools intltool libbasicusageenvironment0 libbluray1 libcddb2 libcrystalhd3 libdvbpsi8 libebml4 libgnome-media-profiles-3.0-0 libgnutls28 libgroupsock1 libhogweed2 libiso9660-8 liblivemedia23 libmatroska6 libopts25 libotr5 libpostproc52 libproxy-tools libresid-builder0c2a libsexy2 libsidplay2 libssh2-1 libtar0 libupnp6 libusageenvironment1 libva-x11-1 libvcdinfo0 libxcb-composite0 libxcb-xv0 python-boto python-cloudfiles python-pysqlite2
  • Remove some other stuff
sudo apt-get purge blueman bluez bluez-alsa:i386 gir1.2-gnomebluetooth-1.0 gnome-bluetooth indicator-bluetooth
apt-get purge edu.media.mit.scratch2editor
apt-get purge adobeair
apt-get purge mate-backgrounds
apt-get purge gnome-terminal gnome-terminal-data
Personal tools