Purple Hearts atwork di Alberto Turelli - soluzioni software & web
Main Menu
Home
News
Contact Us
Search
My Articles
Ubuntu 7.10 Gutsy Gibbon on a Macbook
Ubuntu 6.10 Edgy Eft on an Asus Z92J notebook
Debian Etch on an Asus Z92J notebook
Newsflash
atwork di Alberto Turelli - soluzioni software & web.

  • Certificazioni GNU/Linux LPIC-1 e LPIC-2
  • Certificazioni MySQL 5.0 Developer e DBA

  • Consulenza relativa a GNU/Linux (Debian in particolare) e al software libero
  • Migrazione di server, workstation e reti da Windows a GNU/Linux
  • Installazione, configurazione e manutenzione dei seguenti servizi su piattaforma GNU/Linux:
    • Server web (Apache, Tomcat)
    • Server database (MySQL)
    • Server email (Postfix, Qmail, Courier) con filtri antispam (Spamassassin) e antivirus (ClamAV)
  • Configurazione ed amministrazione di reti GNU/Linux e di reti miste (Windows, GNU/Linux, BSD, Unix, Mac OS X)
  • Progettazione e realizzazione di database e applicativi web-based (HTML/CSS/Javascript, PHP, JSP e MySQL)
  • Sviluppo software in Java
  • Installazione, configurazione e manutenzione portali con Joomla! e Mambo
  • Corsi GNU/Linux: introduzione, amministrazione del sistema, server, desktop, sicurezza
  • Corsi per certificazioni: GNU/Linux (LPIC-1 e LPIC-2) e MySQL (Core, Professional, 5.0 Developer e 5.0 DBA)

my personal homepage

my personal blog

via Trebeschi, 69 - Castegnato (BS) - Italia
tel. +39 328 6110095
Partita IVA 03595310172
email info CHIOCCIOLA atworkonline PUNTO it
private email alberto DOT turelli AT atworkonline DOT it (GPG key)
 
Ubuntu 7.10 Gutsy Gibbon on a Macbook PDF Print E-mail
Written by bibe   
Tuesday, 23 October 2007
I use a MacBook for work (system/network administration and web/database development) and for fun (music, movies and sometimes games). Here is how I made almost everything work using Ubuntu 7.10 "Gutsy Gibbon".

Ubuntu 7.10 "Gutsy Gibbon" on a MacBook (check here for other installations)

Changelog (you can always find an up-to-date version here)

* October 23, 2007
  • Removed multixterm paragraph and related packages, superseded by ClusterSSH
* October 20, 2007
  • First official release of this document

Usage

I use this notebook for work (system/network administration and web/database development) and for fun (music, movies and sometimes games).

Partitions

After shrinking the partition holding the preinstalled Mac OS X to 30 GB, I installed Linux using only / and /home partitions. Many howtos assert that, while using rEFIt, one can't use more than four partitions: this isn't totally true, although fdisk ignores the logical partition(s), and cfdisk marks that space as unusable. The partition table is set as follows:
$ sudo fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System               Size  Mount point
/dev/sda1               1          26      204819+  ee  EFI GPT              200MB
/dev/sda2   *          26        3942    31457280   af  Unknown               30GB
/dev/sda3            3942        4707     6144531+  83  Linux                  6GB /
/dev/sda4            4707        4962     2047852   82  Linux swap / Solaris   2GB swap
(/dev/sda5                                                                    78GB /home)

Installation

The installation is very straightforward: it's as simple as booting from the "desktop" CD (I only pressed F3 before booting to select the Italian keyboard) and double-clicking on the "Install" icon on the desktop.
After answering a few questions, the live system gets copied to the hard disk, some unneeded packages are uninstalled and you are told to reboot.
I use netenv (more on this later) to manage different network profiles: since it has some issues with the new NetworkManager application, I disable the former before rebooting, using the following commands from a terminal.
$ echo "auto eth0" |sudo tee -a /target/etc/network/interfaces
$ echo "iface eth0 inet dhcp" |sudo tee -a /target/etc/network/interfaces
$ echo exit |sudo tee /target/etc/default/NetworkManager
$ echo exit |sudo tee /target/etc/default/NetworkManagerDispatcher

First boot

After booting from hard disk, take a look at the output of dmesg: everything should be fine.
Ubuntu 7.10 symlinks /bin/sh to /bin/dash (instead of /bin/bash, as usual up to 6.06). This leads to errors in scripts provided by "universe" or "multiverse" packages: to get rid of these errors, simply restore the "default" shell with
$ sudo ln -nsf bash /bin/sh
Then, upgrade the system to the current available versions of the installed programs and clean the apt cache:
$ sudo aptitude update
$ sudo aptitude safe-upgrade
$ sudo aptitude autoclean

Postinstall tweaks

Always take a look at the Ubuntu Wiki: the MacBook page shows how to make all hardware working properly.

Second generation MacBooks (Core 2 Duo) have a newer version of the Atheros Wifi chipset, so you have to install the latest madwifi drivers. Please note that the current madwifi drivers depend on a proprietary binary, the Atheros HAL, and therefore will taint your kernel.
$ sudo aptitude install build-essential
$ wget http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz
$ tar zxf madwifi-trunk-current.tar.gz
$ cd madwifi<tab>
$ make
$ sudo make install
To automatically load the applesmc kernel module, you have to add it to /etc/modules:
$ echo applesmc |sudo tee -a /etc/modules
Once loaded this module, set a minimum fan speed which may help your MacBook run cooler, adding the following line just before the "exit 0" statement at the end of /etc/init.d/acpid:
echo 3000 >/sys/devices/platform/applesmc.768/fan1_min
Substitute your speed of choice (in RPM) for 3000 if you wish.

Turn the right Apple key into Alt Gr key using the right Win key as third level chooser from System -> Preferences -> Keyboard -> Keyboard Layout Options -> Third level choosers.

To get the most out of the trackpad, use this InputDevice section in /etc/X11/xorg.conf:
Section "InputDevice"
        Identifier "Fully Functional Synaptics Touchpad"
        Driver "synaptics"
        Option "SendCoreEvents" "true"
        Option "Device" "/dev/psaux"
        Option "Protocol" "auto-dev"
        Option "LeftEdge" "150"
        Option "RightEdge" "1070"
        Option "TopEdge" "100"
        Option "BottomEdge" "310"
        Option "FingerLow" "25"
        Option "FingerHigh" "30"
        Option "MaxTapTime" "180"
        Option "MaxTapMove" "220"
        Option "MaxDoubleTapTime" "180"
        Option "HorizEdgeScroll" "0"
        Option "VertEdgeScroll" "0"
        Option "TapButton1" "0"
        Option "TapButton2" "0"
        Option "TapButton3" "0"
        Option "LockedDrags" "off"
        Option "VertScrollDelta" "20"
        Option "HorizScrollDelta" "50"
        Option "VertTwoFingerScroll" "1"
        Option "HorizTwoFingerScroll" "1"
        Option "MinSpeed" "1.10"
        Option "MaxSpeed" "1.30"
        Option "AccelFactor" "0.08"
        Option "Emulate3Buttons" "true"
        Option "SHMConfig" "on"
        # corner buttons
        Option "RTCornerButton" "0"
        Option "RBCornerButton" "2"
        Option "LTCornerButton" "0"
        Option "LBCornerButton" "3"
EndSection
Be sure to add a ServerLayout section using
        InputDevice "Fully Functional Synaptics Touchpad"
Remember to restart the X server (using CTRL+ALT+Backspace) to load the new settings.

The integrated webcam works out of the box with all programs (Ekiga, for instance) using the V4L2 video plugin.

Extra applications

After enabling "All available applications" from Applications -> Add/Remove... menu it's possible to install some extra applications:
Accessories
  7zip (p7zip-full)
  ACE (unace)
  Qemu Launcher (qemu-launcher)
  RAR (rar)
Games
  Chromium (chromium)
  Flobo Puyo (flobopuyo)
  Frozen-Bubble (frozen-bubble)
  Gweled (gweled)
  Maelstrom (maelstrom)
  Neverball (neverball)
  Planet Penguin Racer (planetpenguin-racer)
Internet
  aMule (amule)
  ClusterSSH (clusterssh)
  DNS Query Tool (gresolver)
  Epiphany web Browser (epiphany-browser)
  FileZilla (filezilla)
  GMail Notify (gmail-notify)
  GpsDrive (gpsdrive)
  Liferea Feed Reader (liferea)
  Psi (psi)
  VPN Connection Manager (OpenVPN)
  Wengophone (wengophone)
  Wireshark (wireshark)
  XChat IRC Client (xchat)
Other
  Ubuntu Restricted Extras (ubuntu-restricted-extras)
Programming
  Bluefish Editor (bluefish)
  Eclipse (eclipse)
Sound & Video
  Banshee Music Player (banshee)
  Grip (grip)
  GStreamer Dirac video plugin
  GStreamer extra plugins (gstreamer0.10-plugins-ugly)
  GStreamer ffmpeg video plugin (gstreamer0.10-ffmpeg)
  GStreamer fluendo MPEG2 demuxing plugin
  GStreamer plugins for aac, xvid, mpeg2, faad (gstreamer0.10-plugins-bad-multiverse)
  GStreamer plugins for mms, wavpack, quicktime, musepack (gstreamer0.10-plugins-bad)
  Helix Player (helix-player)
  K3b (k3b)
  k9copy (k9copy)
  last.fm Player (lastfm)
  Mplayer Movie Player (mplayer)
  Mplayer Plugin for Mozilla (mozilla-mplayer)
  Streamtuner (streamtuner)
  VLC media Player (vlc)
System Tools
  Sun Java 6 Console (sun-java6-jdk)

Setting Java preferences

I want Java-related commands (java, javac and so on) to default to the Sun Java 6 JDK:
$ sudo update-java-alternatives -s java-6-sun
I also installed the Java JDK documentation, downloading jdk-6-doc.zip to /tmp (chowning it to root.root) and installing it with:
$ sudo aptitude install sun-java6-doc
$ sudo rm /tmp/jdk-6-doc.zip

Multiple networking environments

I use my laptop in several places (home, customers' offices, friends' homes), and I manage these network environments easily with netenv. Install it and use the script provided as a Debian example (or this one, which requires gawk and manages multiple network interfaces, wireless settings and hosts in a friendly manner). I expect to build a Debian/Ubuntu package also with the tweaks I made to /sbin/netenv to make netenv run properly on Ubuntu.
$ sudo aptitude install gawk netenv
$ sudo install -m 755 ~bibe/public_html/gutsy/netenv_setup /etc/netenv/
$ sudo install -m 755 ~bibe/public_html/gutsy/sbin_netenv /sbin/netenv
$ echo NETENV_SCRIPT=/etc/netenv/netenv_setup |sudo tee -a /etc/netenv/netenv.conf
I also add some altoptions directives in /boot/grub/menu.lst (leave these lines "commented", or you will lose them when updating grub) for commonly used network environments.
Grub configuration gets updated automatically at every linux-image (re)installation: to do it manually, simply run
$ sudo update-grub

Alternatives

Debian's way to manage multiple programs for the same task (i.e., editors) is the use of alternatives, which are symlinks provided in /etc/alternatives/. For instance, I set vim (instead of nano) as the system's default editor:
$ sudo update-alternatives --config editor [ select /usr/bin/vim.basic ]

Kismet Log Viewer

An interesting utility for viewing Kismet output as HTML pages is Kismet Log Viewer, available here. To install it, download the latest binary (version 0.9.7) and
$ cd /usr/src
$ tar zxf /path/to/kismet-log-viewer-0.9.7.tar.gz
$ cd kismet-log-viewer-0.9.7
$ install -o <kismet_suid_user> -m 700 *.pl <kismet_logs_path>
$ install -o <kismet_suid_user> -m 644 logo.png <kismet_logs_path>

Reboot

Now the system is fully configured: reboot and issue a
$ dmesg |less
to verify that there are no errors and/or problems during the boot process.

TODO list

I still have to test firewire and bluetooth with the appropriate hardware. I hope you will find some of these information useful, and if you have any suggestion for helping me to get everything to work, please email me at

bibe AT atworkonline DOT it
Last Updated ( Tuesday, 23 October 2007 )
 
< Prev   Next >
Debian Security
Latest Linux Kernel Versions