Nxl67002 - Ubuntu

From miki
Revision as of 23:18, 31 May 2010 by Mip (talk | contribs) (→‎Psi)
Jump to navigation Jump to search

Introduction

This is the configuration page for the Ubuntu Lucid Lynx 10.04 LTS (amd64) partition on NXL67002.

Configuration Files

All configuration files can be found here.

Installed Applications

[2010-05-03] Gnome DO (gnome-do)
[2010-05-10] Midnight Commander (mc) [2010-05-31] see reference page. Use vi as standard viewer/editor.
[2010-05-10] Vim (vim)
[2010-05-10] Opera 10.53 beta
[2010-05-10] VirtualBox 3.2.0 (virtualbox-3.2) [2010-05-26] Local settings. Updated to 3.2! — See VirtualBox
[2010-05-10] Samba (smbclient smbfs)
[2010-05-10] KeePassX (keepassx)
[2010-05-11] Privoxy (privoxy)
[2010-05-11] AutoSSH (autossh)
[2010-05-11] apt-file (apt-file)
[2010-05-11] SSH Tunnel script (sshtunnel.pl, libssl-dev) Thierry Walrant's Perl script sshtunnel.pl
[2010-05-11] GNU C/C++ compiler (g++)
[2010-05-26] UltraEdit 1.2.0.7 (uex)
[2010-05-27] MBR (mbr) To create VirtualBox rawdisk
[2010-05-27] Courier IMAP (courier-imap courier-doc courier-imap-ssl) Install instructions and local settings
[2010-05-28] SSH (ssh) Local settings
[2010-05-28] p7zip (p7zip-full p7zip-rar)
[2010-05-28] dlocate (dlocate)
[2010-05-28] Thunderbird (thunderbird)
[2010-05-28] Synergy (synergy) Reference page. Added /usr/bin/synergyc to /etc/suoders
Added quick alias to ~/.bashrc
[2010-05-31] Courier-POP3 (courier-pop courier-pop-ssl)
[2010-05-31] Courier-MTA (courier-mta courier-mta-ssl) so that mails are sent to Courier mailboxes
[2010-05-31] AutoFS (autofs) See local config
[2010-05-31] XSel (xsel)
[2010-05-31] LAMP (apache2 php5 mysql-server mysql-client php5-mysql) See local config
[2010-05-31] PHPMyAdmin (phpmyadmin) Install for apache2 + configure phpmyadmin database + see local config
[2010-06-01] Psi (psi) See local config


Un-installed applications (by uninstall date): none

Automatic Updates

  • [2010-05-03]Kernel — (linux-image-2.6.32-22-generic, replacing original linux-image-2.6.32-21-generic)

Simple Settings

  • GRUB — Added to file /etc/grub.d/40_custom: (Not needed anymore since VirtualBox boots Windows directly, so no risk of booting host again)
    set default="Microsoft Windows XP Professional (on /dev/sda2)"
    
  • CRON - cron script for automatic backup of wikis on Noekeon's (see config files).
  • PROXY - script for automatic setup of network environment (proxy, ssh...) (see config files).

Detailed System Settings

1st install

  • 1st install on [2010-05-03]
  • Distribution: Ubuntu 10.04 LTS amd64
  • Installation method: Net boot install from Internet using GRUB
  • Language: English
  • Location: Europe, Belgium Time
  • Computer name: NXL67002UX
  • Keyboard layout: USA, USA
  • Name: beq06659
  • Login name: beq06659
  • Update: Install security updates automatically
  • Software to install: Ubuntu Desktop
  • Partition: see main page

File System

  • For details, see /etc/fstab.
  • Windows partition:
    • C: → do not mount automatically. Risk of corruption if mounted while VirtualBox is running!
    • D: → mount as /windows/d.
  • File system structure:
/:                                        # /dev/sda7
  lrwxrwxrwx root      root      data -> /mnt/data/
  drwxr-xr-x root      root      net/
  lrwxrwxrwx root      root      sage -> /data/sage-4.2.1/
  drwxr-xr-x root      root      smb/
  drwxr-xr-x root      root      windows/
/data:
  drwxr-xr-x altran    altran    altran/
  drwxr-xr-x beq06659  beq06659  beq06659/
  drwxr-xr-x beq06659  beq06659  sage-4.2.1/
  drwxr-xr-x www-data  root      www/
/home/beq06659:
  lrwxrwxrwx beq06659  beq06659  Maildir -> /data/beq06659/Maildir/
  lrwxrwxrwx beq06659  beq06659  backup -> /data/beq06659/backup/
/mnt:
  drwxr-xr-x root      root      data/    # /windows/d/andlinux/Drives/data.reiserfs.10G.dvi
  drwxr-xr-x root      root      winc/    # /dev/sda2
  drwxr-xr-x root      root      wind/    # /dev/sda5
/net:
  # NFS autofs
/smb:
  drwxr-xr-x root      root      mnemosyne/   # SMB autofs
/var:
  lrwxrwxrwx root      root      www -> /data/www/
/windows:
  lrwxrwxrwx root      root      d -> /mnt/wind/

Network

  • Edited /etc/hosts
  • Proxy configuration - network nxp:
    • sshproxy → connect to NXP proxy with sshtunnel (with NTLM auth. if needed); forward IMAP/SMTP ports; opens a SOCKS5 proxy
    • privoxy → forward to ssh SOCKS5 proxy. provide http proxy server.
    • apt-get, wget, browsers... → through privoxy (env. set in /etc/bash.bashrc, /etc/profile, /etc/environment)
    • ftp → direct connection (no solution...)
  • Proxy configuration - network home:
    • sshproxy → direct connection; forward IMAP/SMTP ports; opens a SOCKS5 proxy (useless).
    • privoxy → direct connection. provide http proxy server.
    • apt-get, wget, browsers... → through privoxy (env. set in /etc/bash.bashrc, /etc/profile, /etc/environment)
    • ftp → direct connection
  • SAMBA/NFS CLIENT - Mount mnemosyne shares as NFS autofs (see [1]) and as SMB autofs
    • Enabled/created the following automounters in /etc/auto.master:
    • /net           /etc/auto.net
      /smb/mnemosyne /etc/auto.smb.mnemosyne
      
    • Created configuration file /etc/auto.smb.mnemosyne
    • Created SMB credential files /etc/auto.smb.mnemosyne.* (see man mount.cifs)
    • Created path for mount points:
    • sudo mkdir /net
      sudo mkdir -p /smb/mnemosyne
      #ls /net/mnemosyne
      #sudo mkdir -p /mnt/mnemosyne
      #for i in /net/mnemosyne/volume1/*; do sudo ln -s $i /mnt/mnemosyne/$(basename $i); done
      

Preferences

  • Appearance
    • Fonts: All font size set to 8, except Title → 9.
  • Keyboard Layout (System-Wide)
    • Layout: Belgium (default) + USA, no separate layout
    • Options: Capslock affects all keys, Alt+CapsLock or Right Ctrl+Right Shift switch layout, right alt chooses 3rd level.
    (because Alt+Shift,Left Ctrl+Left Shift prevents ctrl-alt-shift shortcuts to work, Right Ctrl conflicts with VirtualBox)
  • Keyboard Shortcuts
  • Action Shortcut Remark
    Home Folder Win-E (Mod4-E) Hack Super is mapped to Win keys not needed anymore it seems
    Expo key Shift-Win-E (Shift-Mod4-E)
    Activate the window menu Shift-Alt-Space was conflicting with Gnome DO shortcut
  • Window List Panel (see here)
    • Window List Content → Show windows from all workspace
    • Restoring Minimized Windows → Restore to native workspace

Detailed Application Settings

Courier IMAP

  • Install (reference here):
    • Create directories for web-based administration
    • SSL Certificate: /etc/courier/pop3d.pem, /etc/courier/imapd.pem
    • Postfix configuration: local only
    • System mail name: nxl67002ux.wbi.nxp.com
    • Created /etc/courier/userdb, and kept entries for root, localuser and beq06659
    • Use password from /etc/courier/userdb (method authuserdb).

Gnome DO

  • Autostart, Quiet mode, notification icon, Glass theme
  • Launch key: <alt>+space (! disable first Gnome global shortcut for Activate the window menu)

LAMP

sudo apt-get install apache2 php5 mysql-server mysql-client php5-mysql
# --> Defined password for MySQL root user
sudo vi /etc/apache2/apache2.conf
# --> Added lines at line 32:
#     #MIP CUSTOM
#     ServerName "nxl67002ux"
# Restart apache server to activate php module...
sudo /etc/init.d/apache restart

# Move www root dir to /data disk
sudo mv /var/www /data
sudo ln -s /f /data/www /var/www
  • Apache configuration file is at /etc/apache2/apache2.conf
  • By default, Apache root http directory is /var/www
# Create database that will store local copies of noekeon.org crypto and mikiwiki wiki, and todolist
mysql --user=root -p mysql
mysql> CREATE DATABASE cryptokiwi;
mysql> GRANT ALL PRIVILEGES ON cryptokiwi.* TO kiwi@localhost IDENTIFIED BY '********';
mysql> CREATE DATABASE mikiwiki;
mysql> GRANT ALL PRIVILEGES ON mikiwiki.* TO miki@localhost IDENTIFIED BY '********';
mysql> CREATE DATABASE mikido;
mysql> GRANT ALL PRIVILEGES ON mikido.* TO miki@localhost IDENTIFIED BY '********';
mysql> quit

Nautilus

  • Default view: List View
  • Display, date format: YYYY-MM-DD hh:mm:ss
  • List View: zoom 33%

Psi

(recovered from previous settings on Gryphon at ~/.psi)

  • Gnome: Added Psi as startup program (Psi, /usr/bin/psi, Communicate over the jabber network).
  • OptionsEventsEnable popup notifications (all notifications)
  • Modify Account... → Changed resource to work-ux
  • Modify Account...Automatically reconnect if disconnected.

SSH

  • Installed SSH-Tunnel
  • Files recovered from other installation (ssh-tunnel v2.26 + patch):
/usr/local/bin
-rwxr-xr-x 1 root root ssh-agent-refresh_andlinux.sh
-rwxr-xr-x 1 root root ssh-agent-refresh.sh
-rwxr-xr-x 1 root root ssh.pl
-rwxr-xr-x 1 root root ssh-tunnel.pl
  • User beq06659 - configuration file in directory ~/.ssh:
    • id_rsa || id_rsa.pub || authorized_keys || config* || proxy.conf* || clbanner.txt

Terminal

  • Set default window size (system-wide) to 150x43
  • Disabled menu shortcut key (F10) (conflicts with midnight commander)
  • Set scrollback to 5120 lines

VirtualBox

  • Installed with apt, version 3.2.0
  • Create user vbox (disabled, uid 7000, group vboxusers + groups cdrom, audio, video, plugdev). This user will store VirtualBox settings and disks.
  • Create vmdk to boot windows partition /dev/sda2. Update the MBR code to remove GRUB. Repeat this every time the partitions change:
sudo dd if=/dev/sda of=opensource.mbr bs=512 count=1
sudo apt-get install mbr                                 # For command "install-mbr"
sudo install-mbr -i n -p D -t 0 opensource.mbr
sudo VBoxManage internalcommands createrawvmdk -filename nxl67002-sda2-mbr.vmdk -rawdisk /dev/sda -partitions 2 -relative -mbr opensource.mbr
  • Give RW access to user vbox on /dev/sda2. For this create a new udev rule in file /etc/udev/rules.d/99-custom.rules:
# Rules to change the ownership of /dev/sda2 to user "vbox" (vbox will boot /dev/sda2 in VirtualBox + follow least privilege principle)
# reference: http://www.reactivated.net/writing_udev_rules.html#ownership
KERNEL=="sda2", SUBSYSTEM=="block", OWNER="vbox"
  • Allow user beq06659 to launch VirtualBox through user vbox. Add to /etc/sudoers:
beq06659	ALL=NOPASSWD: /bin/su vbox -c VirtualBox
  • Helper function to add to e.g. ~/.bashrc :
function winbox() {
	#First allow user vbox to connect to X11
	xhost +SI:localuser:vbox
	sudo su vbox -c VirtualBox&
}
  • Host-only network vboxnet0
    • IPv4 address/mask 192.168.11.150/255.255.255.0 (same as AndLinux)
    • DHCP Server address/mask 192.168.11.1/255.255.255.0, Lower/Upper address bound 192.168.11.2/192.168.11.99
  • Virtual machine NXL67002
    • Base Memory 1536 MB, 2 cpus, VT-x/AMD-V enabled, Nested Paging enabled
    • Video memory 48 MB, 2 monitors, 3D accel enabled, 2D accel enabled
    • Audio host driver PulseAudio, controller ICH AC97
    • Network PCnet-FAST III, bridged, eth0
    • Network PCnet-FAST III, Host-only adapter, vboxnet0
    • Machine folder: permanent, full access, /windows/d as d
    • Default layount: seamless mode, extended desktop (windows taskbar on external monitor, gnome taskbar on primary monitor, workspace switcher panel on top bar)

To Do

Nothing so far...