EAOI8


BUILDING UTOPIC UNICORN VIRTUALBOX APPLIANCE
--------------------------------------------

    Image or content?:

      -- They look fine to me. They're just eating.
      -- Are they?
      -- OK, no. No, they're not eating.
      -- Something else they're not doing.
      -- Breathing.

    Doctor Who s8e1, 37:15


0. Options for new Virtual Machine
   -------------------------------

  General:  Basic:       Name: Unico
                         Type: Linux
                         Version: Ubuntu (64 bit)
            Advanced:    Shared Clipboard: Bidirectional

  System:   Base Memory: 1536 MB

  Storage:  Unico-8GB.vdi

  Network:  Adapter 1. NAT
            Port Forwarding: Rule 1
            Host IP: 127.0.0.1 Host Port: 22 Guest IP: 10.0.2.15 Guest Port: 22

1. Install Ubuntu Unicorn 14.10 from netboot mini.iso with minimal options
   -----------------------------------------------------------------------

  wget -c http://archive.ubuntu.com/ubuntu/dists/utopic/main
          /installer-amd64/current/images/netboot/mini.iso

2. Installing SSH support
   ----------------------

  $ sudo apt-get install openssh-server

3. Login over SSH into virtual machine
   -----------------------------------

$ history

virtu@unico:~$ history

    1  sudo apt-get install gcc automake make wget mingetty adduser
                            build-essential libtool flex bison gdb git
                            elinks vim mc
    2  sudo apt-get install xserver-xorg xfonts-base xinit xterm openbox
                            obconf feh fbpanel rox-filer
                            gnome-icon-theme firefox leafpad
                            xfonts-terminus
    3  sudo update-grub
    4  exit
    5  cd ~/.config/
    6  mkdir openbox
    7  cd openbox/
    8  vi autostart.sh
    9  cd ~
   10  vi .Xdefaults
   11  mkdir /mnt/sdb1
   12  sudo mkdir /mnt/sdb1
   13  sudo mount /dev/sdb1 /mnt/sdb1
   14  cd /mnt/sdb1/home/virtu/
   15  vi ./.Xdefaults
   16  vi ./.config/openbox/autostart.sh
   17  cp /mnt/sdb1/home/virtu/.config/openbox/fall_foliage-1280x800.jpg /home/virtu/.config/openbox/
   18  vi .config/openbox/autostart.sh

root@unico:~# vi /etc/default/grub

  # If you change this file, run 'update-grub' afterwards to update
  # /boot/grub/grub.cfg.
  # For full documentation of the options in this file, see:
  #   info -f grub -n 'Simple configuration'

  GRUB_DEFAULT=0
  # GRUB_HIDDEN_TIMEOUT=0
  # GRUB_HIDDEN_TIMEOUT_QUIET=true
  GRUB_TIMEOUT=1
  GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
  GRUB_CMDLINE_LINUX_DEFAULT=""
  GRUB_CMDLINE_LINUX=""

  # Uncomment to enable BadRAM filtering, modify to suit your needs
  # This works with Linux (no patch required) and with any kernel that obtains
  # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
  #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

  # Uncomment to disable graphical terminal (grub-pc only)
  GRUB_TERMINAL=console

  # The resolution used on graphical terminal
  # note that you can use only modes which your graphic card supports via VBE
  # you can see them in real GRUB with the command `vbeinfo'
  #GRUB_GFXMODE=640x480

  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
  #GRUB_DISABLE_LINUX_UUID=true

  # Uncomment to disable generation of recovery mode menu entries
  GRUB_DISABLE_RECOVERY="true"

  # Uncomment to get a beep at grub start
  #GRUB_INIT_TUNE="480 440 1"

root@unico:~# update-grub

virtu@unico:~$ sudo vi /etc/sudoers

  #
  # 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.
  #
  Defaults        env_reset
  Defaults        mail_badpass
  Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

  # Host alias specification

  # User alias specification

  # Cmnd alias specification

  # User privilege specification
  root    ALL=(ALL:ALL) ALL

  # 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
  virtu   ALL=(ALL) NOPASSWD:ALL

  # See sudoers(5) for more information on "#include" directives:

  #includedir /etc/sudoers.d

virtu@unico:~$ vi .Xdefaults

  xterm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)
  XTerm*background:     black
  XTerm*foreground:     green
  XTerm*faceName:       terminus
  XTerm*faceSize:       16
  XTerm*geometry:       90x32
  XTerm*rightScrollBar: true
  XTerm*ScrollBar:      true

virtu@unico:~$ vi .config/openbox/autostart.sh

  feh --bg-scale /home/virtu/.config/openbox/fall_foliage-1280x800.jpg &
  xrdb -merge .Xdefaults
  xterm &
  fbpanel &

virtu@unico:~$ vi .config/fbpanel/default

  ...

                item {
                    name = Reboot
                    icon = gnome-session-reboot
                    action = sudo reboot # virtu ALL=(ALL) NOPASSWD:ALL !
                }
                item {
                    name = Shutdown
                    icon = gnome-session-halt
                    action = sudo shutdown -h now
                }
                item {
                    name = logout
                    icon = gnome-session-logout
                    action = /usr/lib/fbpanel/fbpanel/xlogout
                }
            }
        }
    }

  ...

    Plugin {
        type = launchbar
        config {
            button {
                icon = file-manager
                tooltip = File Manager
                action = rox
            }
            button {
                icon = terminal
                tooltip = Terminal
                action = xterm # x-terminal-emulator
            }
            button {
                image = /opt/google/chrome/product_logo_22.png
                tooltip = Web Browser
                action = x-www-browser
            }
            button {
                image = /opt/png/kxus.png
                tooltip = US keyboard
                action = kxus
            }
            button {
                image = /opt/png/kxru.png
                tooltip = RU keyboard
                action = kxru
            }
            button {
                image = /opt/png/kxee.png
                tooltip = EE keyboard
                action = kxee
            }
        }
    }

  ...

    #plugin {
    #    type = volume
    #}

    #plugin {
    #    type = battery
    #}

  ...

------------------------------------------------------------------------

4. Adding user scripts
   -------------------

virtu@unico:~$ ls -l /usr/local/bin
total 52
-rwxr-xr-x 1 root root  68 Oct 24 20:45 estify
-rwxr-xr-x 1 root root 320 Oct 24 20:45 html2text
-rwxr-xr-x 1 root root  18 Oct 24 20:45 kee
-rwxr-xr-x 1 root root  18 Oct 24 20:45 kru
-rwxr-xr-x 1 root root  18 Oct 24 20:45 kus
-rwxr-xr-x 1 root root  14 Oct 24 20:45 kxee
-rwxr-xr-x 1 root root  14 Oct 24 20:45 kxru
-rwxr-xr-x 1 root root  14 Oct 24 20:45 kxus
-rwx------ 1 root root 235 Oct 24 20:45 prepare
-rwxr-xr-x 1 root root  70 Oct 24 20:45 rusify
-rwxr-xr-x 1 root root  68 Oct 24 20:45 usify
-rwxr-xr-x 1 root root  18 Oct 24 20:45 ксша
-rwxr-xr-x 1 root root  14 Oct 24 20:45 кхсша

virtu@unico:~$ for i in /usr/local/bin/*; do ls $i; cat $i; done
/usr/local/bin/estify
#!/bin/bash

sudo update-locale LANG=et_EE.UTF-8 LANGUAGE=et_EE:et

/usr/local/bin/html2text
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'html2text==2014.7.3','console_scripts','html2text'
__requires__ = 'html2text==2014.7.3'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('html2text==2014.7.3', 'console_scripts', 'html2text')()
    )
/usr/local/bin/kee
sudo loadkeys ee

/usr/local/bin/kru
sudo loadkeys ru

/usr/local/bin/kus
sudo loadkeys us

/usr/local/bin/kxee
setxkbmap ee

/usr/local/bin/kxru
setxkbmap ru

/usr/local/bin/kxus
setxkbmap us

/usr/local/bin/prepare
cat: /usr/local/bin/prepare: Permission denied
/usr/local/bin/rusify
#!/bin/bash

sudo update-locale LANG=ru_RU.UTF-8 LANGUAGE="ru_RU:ru"

/usr/local/bin/usify
#!/bin/bash

sudo update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en

/usr/local/bin/ксша
sudo loadkeys us

/usr/local/bin/кхсша
setxkbmap us

------------------------------------------------------------------------

5. Adding drawing support
   ----------------------

virtu@unico:~$ sudo apt-get install xpaint netpbm imagemagick

------------------------------------------------------------------------

6. Adding user icons (from Trusty on sdb)
   --------------------------------------

virtu@unico:~$ sudo mkdir /mnt/sdb1
virtu@unico:~$ sudo mount /dev/sdb1 /mnt/sdb1
virtu@unico:~$ sudo mkdir /opt/png
virtu@unico:~$ sudo cp /mnt/sdb1/opt/png/* /opt/png/
virtu@unico:~$ ls -l /opt/png
total 16
-rw-r--r-- 1 root root 230 Oct 24 20:43 kxee.png
-rw-r--r-- 1 root root 164 Oct 24 20:43 kxru.png
-rw-r--r-- 1 root root 243 Oct 24 20:43 kxus.png
-rw-r--r-- 1 root root 267 Oct 24 20:43 w.png

------------------------------------------------------------------------

7. Installing Google Chrome
   ------------------------

go to https://www.google.com/intl/en-US/chrome/browser/

virtu@unico:~$ cd Downloads/
virtu@unico:~/Downloads$ sudo apt-get install gconf-service libgconf-2-4 libnspr4 libnss3 libpango1.0-0 libxss1 libappindicator1 libindicator7 gconf2-common gconf-service-backend libnss3-nssdb libpangox-1.0-0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
  indicator-application
The following NEW packages will be installed:
  gconf-service gconf-service-backend gconf2-common libappindicator1 libgconf-2-4 libindicator7 libnspr4 libnss3
  libnss3-nssdb libpango1.0-0 libpangox-1.0-0 libxss1
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.

virtu@unico:~/Downloads$ sudo dpkg -i google-chrome-stable_current_amd64.deb

------------------------------------------------------------------------

8. Cleaning up
   -----------

virtu@unico:~$ sudo apt-get clean
virtu@unico:~$ dd if=/dev/zero of=biig
virtu@unico:~$ rm -f biig

Host level 7-zip with ultra compression to SFX file:

  Unico-8GB-EAO.exe
  md5sum Unico-8GB-EAO.exe > Unico-8GB-EAO.exe.md5sum

------------------------------------------------------------------------

EB2

1. Patch

  Replace x-terminal-emulator with xterm
  in ~/.config/fbpanel/default
  in /etc/xdg/openbox/menu.xml

2. Cyrillic fonts in xterm.

  sudo locale-gen ru_RU.UTF-8
  sudo apt-get install language-pack-ru
  sudo dpkg-reconfigure locales
  sudo update-locale LANG=ru_RU.UTF-8 LANGUAGE="ru_RU:ru"


Learn math

  sudo -s
  cd /opt
  wget -c http://smath.info/file/yNr4Q  \
          /SMathStudioDesktop.0_97_5346.Mono.tar.gz
  tar xf SMathStudioDesktop.0_97_5346.Mono.tar.gz
  echo #!/bin/bash > /usr/local/bin/smath
  echo mono SMathStudio_Desktop.exe >> /usr/local/bin/smath
  chmod +x /usr/local/bin/smath
  sudo apt-get install mono-complete
  smath

------------------------------------------------------------------------

EBN

   apt-get update
   apt-get upgrade
   apt-get install xpaint netpbm imagemagick
   apt-get install gconf-service libgconf-2-4 libnspr4 libnss3 \
                   libpango1.0-0 libxss1 libappindicator1 \
                   libindicator7 gconf2-common gconf-service-backend \
                   libnss3-nssdb libpangox-1.0.0

   apt-get install systemd-sysv
   reboot
   sudo -s
   systemctl status ssh.service
   cat /proc/1/comm

   apt-get install aptfile
   apt-file update
   apt-get install gedit gksu dbus-x11 gnome-icon-theme-symbolic \
                   gir1.2-gtksource-3.0

------------------------------------------------------------------------

EC1

  apt-get update
  apt-get upgrade
  apt-get install valac libX11-dev

  ./VBoxLinuxGuestAdditions.run

  sudo apt-get install gedit gedit-valencia-plugin

  apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \
                  libsdl-mixer1.2-dev libsdl-net1.2-dev \
                  libsdl-ttf2.0-dev monodevelop

  apt-get install gimp

------------------------------------------------------------------------

F12

  apt-get install libcairo2-dev
