Elf

From Oh Mad Lab
Jump to navigation Jump to search

Debian Install on an Asus eee 901

Original Partitions

  • First disk (4GB) /dev/sda
cfdisk 2.12r

Disk Drive: /dev/sda
Size: 4034838528 bytes, 4034 MB
Heads: 255   Sectors per Track: 63   Cylinders: 490

Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
sda1                    Primary   Linux ext2       [SYSTEM]         3290.12 
sda2                    Primary   Linux ext3       [USER]            723.83
sda3                    Primary   W95 FAT32 (LBA [BIOS       ]         8.23
sda4                    Primary   EFI (FAT-12/16/32)                   8.23
  • Second disk (16GB) /dev/sdb
Disk Drive: /dev/sdb
Size: 16139354112 bytes, 16.1 GB
Heads: 255   Sectors per Track: 63   Cylinders: 1962

Name        Flags      Part Type  FS Type          [Label]
--------------------------------------------------------------------
sdb1                    Primary   Linux ext3       [HOME]        

Initial Install

dd if=debian-eeepc.img of=/dev/<SD DEVICE>
sync

NOTE: Make sure the SD card is NOT mounted, also make sure you use the device itself and NOT a partition (/dev/sda NOT /dev/sda1).

  • Make sure the BIOS is set to boot from the removable media, which is the default on my 901.
  • Insert the SD card with the Debian install image and power up the eee.
  • You have to use a LAN connection as the WiFi doesn't, currently, work during the installer for the RT2860sta chipset, which is what my 901 uses. Don't worry, we can get it working after the install though.
  • For the partition, I did the following:
    • sda (4 GB):
      • sda1: 4013.95 MB, mounted to /, format, ext2, label:SYSTEM
      • sda2: 8.23 MB, do not use, fat32, Label: BIOS
      • sda3: 8.23 MB, do not use, fat32
    • sdb (16 GB):
      • sdb1: 16.1 GB, mounted to /home/, format, ext2, label:HOME

NOTE: I chose to use ext2 on both the OS and my home directory as this is a SSD (Solid State Drive) and the system is not the fastest in the world. Ext2 will be faster and not require as much writes, etc.

  • Other than the partition and using a LAN, the rest of it is a normal Debian install.
  • Once the base system is installed, login and install the wireless-tools package as such:
su
apt-get install wireless-tools
  • Modify the interfaces file to enable wifi as such:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# The wireless network interface
auto ra0
iface ra0 inet dhcp


SSH / Rsync

  • I installed the following packages:
 apt-get install rsync ssh
  • Configured sshd to deny remote root login
 vim /etc/ssh/sshd_config
  • Find and change "PermitRootLogin yes" to "PermitRootLogin no", as such:
 PermitRootLogin no

VNC / Remote Control

Turned on vino / remote control - This allows for a connect when a session logged in (aka shadowing)

  1. Select Desktop->Preference->Remote Desktop
  2. Check "Allow other users to view your desktop"
  3. Check "Allow other users to control your desktop"
  4. Uncheck "Ask you for confirmation"
  5. Check "Require the user to enter this password:"

Web Cam

  • To get the webcam working install the following:
 apt-get install luvcview mplayer

Optimizations

  • Add noatime to primary partition and set tmp to use tmpfs:
vim /etc/fstab

Change:

/dev/sda1       /               ext2    errors=remount-ro 0       1

To:

/dev/sda1       /               ext2    noatime,errors=remount-ro 0       1

Add:

tmpfs           /tmp            tmpfs   defaults        0       0
  • sdb1 should already have noatime on it, if not then add it.
  • Set /var/run and /var/lock to use tmpfs:
vim /etc/default/rcS

Change:

RAMRUN=no
RAMLOCK=no

To:

RAMRUN=yes
RAMLOCK=yes

Tips and Tricks

To get battery info and state:

 cat /proc/acpi/battery/BAT0/info
 cat /proc/acpi/battery/BAT0/state
 acpi

Useful Packages

I needed the following packages for various reasons:

  • RDP Client and a GUI front end to connect to work:
apt-get install rdesktop tsclient
  • VNC Client for remote connections:
apt-get install xvnc4viewer
  • A pretty command line process viewer:
apt-get install htop
  • Great tool to detect power drains and to measure current power usage:
apt-get install powertop
  • A messenger client to keep in touch with coworkers:
apt-get install amsn
  • A Gnome applet to allow you to see if the CAPS is on or not via a icon in the panel:
apt-get install lock-keys-applet
  • Spell checker for Evolution
apt-get install aspell-en

Adobe Flash

I try to keep a clean system, but I draw the line at lost functionality and, sadly, swf doesn't handle everything. Flash is, unfortunately, required for certain websites I visit. Here's how I installed it:

  • Close all opened browsers before the following steps:
cd /tmp
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar zxvf install_flash_player_10_linux.tar.gz
cp libflashplayer.so /usr/lib/mozilla/plugins/

Open your browser and test with youtube.com and hulu.com.

Gnome Changes

Optimizations for the EEE screen size / layout

  1. Select System->Preferences->Appearance
  2. On the Theme tab, select Clearlooks
  3. On the Background tab, select the solid color background
    1. Change the color to RGB of 75,150,255
  4. On the Fonts tab, change the fonts to:
    1. Application font: Sans 7
    2. Document font: Sans 8
    3. Desktop font: Sans 8
    4. Window title font: Sans Bold 8
    5. Fixed width font: Monospace 7
  5. On the Interface tab, ensure "Show icons in menus" is selected
    1. Change "Toolbar button labels" to "Icons only"

Panel changes:

  1. Select Applications->System Tools->Configuration Editor
  2. Change the following settings:
    1. /apps/panel/toplevels/bottom_panel_screen0/auto_hide = <Checked>
    2. /apps/panel/toplevels/bottom_panel_screen0/auto_hide_size = 0
    3. /apps/panel/toplevels/bottom_panel_screen0/enable_animations = <Unchecked>
    4. /apps/panel/toplevels/bottom_panel_screen0/unhide_delay = 0
    5. /apps/panel/toplevels/top_panel_screen0/auto_hide = <Checked>
    6. /apps/panel/toplevels/top_panel_screen0/auto_hide_size = 0
    7. /apps/panel/toplevels/top_panel_screen0/enable_animations = <Unchecked>
    8. /apps/panel/toplevels/top_panel_screen0/unhide_delay = 0

On Screen Display

The function keys (wifi, dim, vol, etc) don't provide any instant feedback, I like using osd to provide the feedback and apparently someone else likes osd as well since all the scripts are configured to use it. To enable osd do the following:
Install:

apt-get install gnome-osd

Configure:

vim /etc/default/eeepc-acpi-scripts

Change:

ENABLE_OSD='no'

To:

ENABLE_OSD='yes'

Change:

ENABLE_OSD_BRIGHTNESS='no'

To:

ENABLE_OSD_BRIGHTNESS='yes'

Mounting a Remote Network Drive

In order to provide extra space to the eee, I opted to use sshfs to my NAS and remote servers. Here's how I did it:
Install:

apt-get install sshfs

Mount:

mkdir /media/derro
sshfs -o allow_other ohayden@derro: /media/derro/

Unmount:

fusermount -u /media/derro

Macro for OpenOffice.org Calc

I copy / paste a lot of text from my online banking account details into my tracking spreadsheet and I wrote the following macro to help format the text as I like it (without the formatting, colors, and extra tabs).

Sub PasteUnformattedText
	Dim systemClipboard : systemClipboard = createUnoService("com.sun.star.datatransfer.clipboard.SystemClipboard")
	Dim converter : converter = createUnoService("com.sun.star.script.Converter")
	Dim clipboardContents : clipboardContents = systemClipboard.getContents()
	Dim transferDataFlavors : transferDataFlavors = clipboardContents.getTransferDataFlavors()
	Dim flavorIndex% : flavorIndex = -1
	Dim convertedString$
	Dim x%

	' Check for the text/plain flavor
	For x = LBound(transferDataFlavors) To UBound(transferDataFlavors)
		If transferDataFlavors(x).MimeType = "text/plain;charset=utf-16" Then
			flavorIndex = x
			Exit For
	    End If
	Next
	' If we found the flavor we want, then...
	If (flavorIndex >= 0) Then
		Dim lines
		Dim pasteText
		Dim document
		Dim dispatcher
		Dim args(0) as new com.sun.star.beans.PropertyValue
		' Grab the clipboard data
		convertedString = converter.convertToSimpleType(clipboardContents.getTransferData(transferDataFlavors(flavorIndex)), com.sun.star.uno.TypeClass.STRING)
		' Split the clipboard data into an array base on tabs
		lines = Split(convertedString, Chr(9))
		' Convert tabs to spaces
		pasteText = ""
		For x = LBound (lines) to UBound (lines)
			pasteText = pasteText + " " + lines(x)
		Next
		pasteText = Trim(pasteText)
		' Get the current spreadsheet document
		document = ThisComponent.CurrentController.Frame
		' Use the dispatch helper to paste the text to the spreadsheet
		dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
		args(0).Name = "StringName"
		args(0).Value = pasteText
		dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args())
	End If
End Sub

Squeeze

  • To get the NetworkManager to work I needed the following (also remove any reference in /etc/network/interfaces for the wireless card, which should be wlan0):
aptitude install firmware-ralink wireless-tools network-manager-gnome

Resources