N8×0 Backgrounds II

January 27, 2008 – 10:56 pm

Here are some more of my photo’s optimised for use as N8×0 backgrounds. Enjoy!!

img_5468-1_nn.jpg

img_6618.jpg

img_2402_nn.jpg

img_4983_1.jpg

img_2397_b.jpg

TermLauncher Applet 0.0.3

January 27, 2008 – 1:22 pm

TermLaunch This is a bug fix release which fixes an issue with the applet not shutting down cleanly when a user logs off. I’ve also cleaned up the source package to allow an Ubuntu package to be created - thanks to Mitsuya Shibata.

Download: TermLauncherApplet-0.0.3.tar.gz

N8×0 Backgrounds

January 14, 2008 – 9:38 pm

While I’m in photo mode here are some of my photo’s optimised for use as N8×0 backgrounds. Enjoy!!

Grand Bazaar

Poppy

Pink

Leaves

Peacock Butterfly

Photoblog

January 14, 2008 – 9:05 pm

I’ve decided to give Photoblog a try out instead of Flickr. You can see my photo’s at http://www.photoblog.com/mpeters

Manually Adding Swap on an N800

January 11, 2008 – 12:21 am

Although you can add swap through Settings->Control Panel->Memory, I wanted to add a swap file manually. There are a couple of reasons you might want to do this. Perhaps you want more than the maximum of 128Mb offered through the Control Panel or it may be the fact that when you add swap through the Control Panel, it gets placed on your memory card. Hence when you attach your device to a PC, the mmc is umounted so you lose the swap - you can get round this if you’ve created a Linux partition on your card as I described previously.

First create an empty file of the size you want, eg 128Mb, in the location you want using dd:
dd if=/dev/zero of=/extfs/.swap bs=1024 count=131072

Now format the file as swap:

mkswap /extfs/.swap

Now add the swap:

swapon /extfs/.swap

To make your new swapfile persistent across boots, add the following entry as a new line in your /etc/fstab:

/extfs/.swap    none    swap    sw    0    0

Finally add the following line to /etc/init.d/rcS towards the end (but before the exit 0 line):

swapon -a

Extended root partition on an N800 with OS2008

January 9, 2008 – 11:53 pm

Like many, I wanted to increase the space available to me for my root partition on my n800. There are a lot of sites describing the process of putting the whole of root onto your memory card but I wanted to keep using the internal flash for most of the OS and move only data and some self compiled apps/scripts to the mmc.

The following procedure assumes you have at least a working knowledge of the Linux CLI and have root access to your n800 (note - the procedure should also work for an n810).

Warning: You will be formatting your memory card and modifying boot and system scripts, so, before you do anything backup your data!! You have been warned!

Disclaimer: Follow this procedure at your own risk. If you lose any data or brick your device I take no responsibility (don’t worry though, you can just re-flash it to get back to a pristine state).

Step 1 - Partition and Format the Card

I will describe creating 2 partitions on your card. One will be formatted as ext3 and used as the extension to the root partition and the other will be formatted as FAT and be seen as a normal memory card by the OS, just as it was previously. When planning how to partition your card you should plan to use the first partition for your FAT partition and the second as the extension to root. As such you probably want to have the first partition bigger than the second, for example on my 4Gb card I created a 3Gb FAT and a 1Gb Ext3 partition.

OS2008 doesn’t include mkfs.ext3 (or mkfs.ext2), needed to format your partitions. So, if you want to use ext2 or ext3, the first thing you’ll need to do is install them. They are both included in the e2fsprogs package:

apt-get install e2fsprogs

Before you can partition your memory card you must first umount it:

umount /media/mmc2

In order to partition the card you need to use sfdisk as OS2008 doesn’t include cfdisk. Running:

sfdisk /dev/mmcblk0

will give you an sfdisk prompt as follows:

/dev/mmcblk0p1 :

At the prompt, you need to enter the starting block and size, in cylinders, of the first partition, eg for a 3Gb partition:

/dev/mmcblk0p1 : 0 9660

Hitting Enter will prompt you for the second partition and then the third etc. Just leave them blank if you only need 2 partitions:

/dev/mmcblk0p2 : 9660 3220
/dev/mmcblk0p3 :
/dev/mmcblk0p4 :

Finally you will be asked if you want to write the changes. Hit “y” if you are happy with the partitioning scheme you entered, alternatively you can hit “n” to try again.

Once your new partitions have been written out to the card, you need to format them (you may need a reboot here before you can format the new partitions).

mkfs.mdos /dev/mmcblk0p1
mkfs.ext3 /dev/mmcblk0p2

Step 2 - Enable the extended partition at boot
You’ll now need to edit an init script to load the modules needed to see your ext3 partition and also mount it early in the boot process. Open up /etc/init.d/rcS and after the PATH= line add the following:

insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
insmod /mnt/initfs/lib/modules/2.6.21-omap1/jbd.ko
insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext3.ko

Now, near the end of the file, before the line exit 0, add:

mount -a -t ext3

Save and exit the file.

Next you need to create a mount point for your partition, I chose to use /extfs:

mkdir /extfs

Now add the partition to /etc/fstab:

/dev/mmcblk0p2 /extfs ext3 defaults,rw,noatime 0 0

Now reboot and once your device comes back up you should have a spanking new 1Gb partition under /extfs and a 3Gb memory card (or whatever you configured).

Step 3 - Making sure you can still see your card when connected to your PC via USB
If you now connect your device to a PC via USB, you’ll get a message stating “Memory cards in use: internal memory card” and your memory card won’t be available to your PC. To get round this you need to edit /usr/sbin/oss-mmc-umount.sh, replace the if block after the line grep "$MP " /proc/mounts > /dev/null with:

if [ $? = 0 ]; then
  if [ "$MP" != "/extfs" ] ; then umount $MP 2> /dev/null ; fi
  RC=$?
  if [ $RC != 0 ]; then
    echo "$0: could not unmount $MP"
    exit $RC
  fi
fi

Note - if you called your mount point something other than extfs, remember to edit the test [ "$MP" != "/extfs" ] accordingly. Your FAT partition will now be umount’ed before being made available to your PC. The linux partition also be available but will remain mounted in your device. This should be safe as long as you don’t try to write to the ext3 partition, you probably only need to write to the FAT partition anyway.

Step 4 - Transferring data from Flash to the partition
This is the easy bit. You can transfer any data you want from the flash memory to your new partition. If you then create a symlink to the new location it will be accessible just as it was previously. Good candidates for moving are /usr/share and /home. eg:

cp -a /usr/share /extfs
rm -r /usr/share
ln -s /extfs/share /usr/share

References:

http://www.internettablettalk.com/forums/showthread.php?p=40839#post40839

http://maemo.org/community/wiki/extendedrootfilesystem/

Sultanahmet

December 18, 2007 – 12:15 am

The Blue Mosque, Istanbul

Sultanahmet

Version 2 already?!

December 15, 2007 – 12:41 am

Why is it that whenever you release anything you immediately find something wrong with it? Anyway, click the link below to download version 0.0.2 of my TermLauncher Applet.

Download: TermLauncherApplet-0.0.2.tar.gz

Here’s what’s fixed in this version:

src/termlauncher-applet.py:
- Get current profiles from /apps/gnome-terminal/global/profile_list
- Sort profiles alphabetically

Basically I now grab the list of profiles from /apps/gnome-terminal/global/profile_list instead of listing the profiles under /apps/gnome-terminal/profiles. The latter may contain deleted profiles.

Oh, and here’s the obligatory screenshot…..

Screenshot

TermLauncher Applet Initial Release

December 14, 2007 – 12:12 am

termlauncher I like to have a GNOME-Terminal profile for each machine I connect to (and there’s a few of them) which automatically connects me to that machine on launch. The standard application launcher on the Ubuntu (and many other distros) default panel only gives you the option of launching a terminal of the default profile. Rather than open a default terminal and then open a new tab for the profile I want, I decided to knock up this quick panel applet as an alternative to the standard launcher applet. The only difference between this and the standard launcher applet (so far) is that it has a context menu made up of your profiles, from which you can launch a GNOME-Terminal of the chosen profile.

At some point I plan to add the ability to organize your profiles into a hierarchical menu. Perhaps also the ability to select and jump to a particular terminal from the menu, similar to the functionality provided by the Window Selector applet.

Enjoy!! And let me know how you get on.

Download: TermLauncherApplet-0.0.1.tar.gz

Taking A Break

December 12, 2007 – 11:27 pm

Taking A Break