<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mikael Ståldal's technical blog</title>
	<atom:link href="http://www.staldal.nu/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.staldal.nu/tech</link>
	<description>Programming and software</description>
	<lastBuildDate>Sat, 14 Jan 2012 22:42:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Bachata Linux</title>
		<link>http://www.staldal.nu/tech/2012/01/14/bachata-linux/</link>
		<comments>http://www.staldal.nu/tech/2012/01/14/bachata-linux/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 22:42:43 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=286</guid>
		<description><![CDATA[Based on what I have desscribed in the two previous posts, I have now made a Linux distribution with an install CD. It is called Bachata Linux, check it out here.]]></description>
			<content:encoded><![CDATA[<p>Based on what I have desscribed in the <a href="http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/">two</a> <a href="http://www.staldal.nu/tech/2012/01/04/how-to-roll-your-own-bootable-linux-cd-rom/">previous</a> posts, I have now made a Linux distribution with an install CD.</p>
<p>It is called <em>Bachata Linux</em>, check it out <a href="http://www.bachatalinux.net/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2012/01/14/bachata-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to roll your own bootable Linux CD-ROM</title>
		<link>http://www.staldal.nu/tech/2012/01/04/how-to-roll-your-own-bootable-linux-cd-rom/</link>
		<comments>http://www.staldal.nu/tech/2012/01/04/how-to-roll-your-own-bootable-linux-cd-rom/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 14:32:44 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=267</guid>
		<description><![CDATA[When booting a regular Linux system, it just mounts some partition with a nice file system (such as ext4) on your HDD on / read/write and there you go. When booting from a CD-ROM, it&#8217;s not that simple. The CD-ROM &#8230; <a href="http://www.staldal.nu/tech/2012/01/04/how-to-roll-your-own-bootable-linux-cd-rom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When booting a regular Linux system, it just mounts some partition with a nice file system (such as ext4) on your HDD on / read/write and there you go.</p>
<p>When booting from a CD-ROM, it&#8217;s not that simple. The CD-ROM file system, ISO 9660, does not support the file names and attributes that a Linux system normally needs. And the CD-ROM is read only.</p>
<p>There are ways to work around these issues. You can use <a href="http://en.wikipedia.org/wiki/Rock_ridge">the Rock Ridge extension</a> to ISO 9660 to get the file names and attributes needed. And the read only issue can be handled either as I have <a href="http://www.staldal.nu/tech/2009/11/15/linux-with-mounted-read-only-2-0/">described in an earlier post</a>, or by using <a href="http://en.wikipedia.org/wiki/Unionfs">unionfs</a>.</p>
<p>There is also a different approach which I will describe here. Have an image file of the root file system on the CD which you mount in RAM. This will bypass the restrictions of ISO 9660 since you can use any file system in the image, and it can be read/write after being read into RAM. The obvious disadvantage is that this will consume RAM proportional to the size of the root file system, which can be a problem since you will not have any swap space available. But in several use cases, the size of the root file system can be kept small enough for this to work.</p>
<p>The easiest, and probably best, way to do this is to simply use the <a href="http://en.wikipedia.org/wiki/Initramfs">initramfs</a> mechanism built into the Linux kernel.</p>
<p>In the initramfs, the Linux kernel will start executing <code>/init</code> as the first process, and this process is not expected to exit. This <code>/init</code> can be (and usually is) a shell script. In a regular root file system, <code>/sbin/init</code> will be executed first. So you can convert a regular root file system into an initramfs by adding an <code>/init</code> like this (don&#8217;t forget to make it executable):</p>
<pre>
#!/bin/sh

exec /sbin/init $@
</pre>
<p>Then you need to package it as a gzipped cpio archive with these slightly awkward commands (<code>${ROOT_FS}</code> is where you have prepared the root file system, <code>${ISO_FS}</code> is where you are preparing the file system for the CD-ROM, don&#8217;t forget to create the directory <code>${ISO_FS}/isolinux</code> first):</p>
<pre>
(cd ${ROOT_FS} &#038;&#038; find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' | xargs -rL1 rm -f)
(cd ${ROOT_FS} &#038;&#038; find . | cpio --quiet -o -H newc | gzip -9 >${ISO_FS}/isolinux/initrd.img)
</pre>
<p>Then put this initramfs image along with the kernel image and pass it to the bootloader. Given that you use isolinux as bootloader, put the kernel image in <code>${ISO_FS}/isolinux/vmlinuz</code>, copy <code>isolinux.bin</code> to <code>${ISO_FS}/isolinux/</code> and create a config file <code>${ISO_FS}/isolinux/isolinux.cfg</code>:</p>
<pre>
default linux
label linux
    kernel vmlinuz
    append initrd=initrd.img quiet
</pre>
<p>Finally build an CD-ROM ISO image with this command:</p>
<pre>
genisoimage -b isolinux/isolinux.bin -c isolinux/boot.cat \
 -no-emul-boot -boot-load-size 4 -boot-info-table \
 -l -input-charset default -V MyLinuxBoot -A "My Linux Boot" \
 -o ${ISO_IMAGE} ${ISO_FS}
</pre>
<p>Then you can burn the ISO image on a CD-ROM, or use the image directly to test it in a virtual machine.</p>
<p>You can reduce the size of the root file system by placing some large auxiliary files (such as the files to install if you are building an installer) outside, directly on the CD-ROM. Then you need to mount the CD-ROM after boot, which can be a bit tricky. Given that you know that a file <code>install.cgz</code> should be on the CD-ROM, you can do like this to mount the CD-ROM on <code>/media</code>:</p>
<pre>
mount_cdrom() {
    for CD in /dev/cdrom /dev/cdrom[0-9] /dev/sr[0-9]; do
        if [ -b ${CD} ] ; then
            if mount -t iso9660 -o ro ${CD} /media 2>/dev/null ; then
                if [ -f ${1}/install.cgz ] ; then
                    return
                else
                    umount /media
                fi
            fi
        fi
    done
    echo "Failed to mount CD!"
}
</pre>
<p>This is inspired from <a href="http://www.phenix.bnl.gov/~purschke/RescueCD/">this article</a>. However, that article uses the older and less efficient initrd instead of initramfs. It also mounts the root file system in a two-step bootstrap process which seems redundant to me. So I have made it simpler and more efficient. The procedure with boot menus and different run levels described in the section <cite>Customizing and Adding Scripts</cite> can be useful though, I recommend reading that section if you need some kind of menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2012/01/04/how-to-roll-your-own-bootable-linux-cd-rom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to roll your own Debian based Linux distro</title>
		<link>http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/</link>
		<comments>http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 22:10:30 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=217</guid>
		<description><![CDATA[Goal To build a minimal Debian based Linux system with a fully functional bash shell, TCP/IP networking with DHCP client and apt setup to be able to install any package from the Debian repositories. The resulting system will use about &#8230; <a href="http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Goal</h3>
<p>To build a minimal Debian based Linux system with a fully functional bash shell, TCP/IP networking with DHCP client and apt setup to be able to install any package from the Debian repositories. The resulting system will use about 157 MB disk space and consume less than 10 MB RAM.</p>
<p><em>This is now implemented in <a href="http://www.bachatalinux.net/">Bachata Linux</a>.</em></p>
<h3>Prerequisites</h3>
<p>A Debian based Linux system to work from (e.g. Ubuntu desktop) with the <code>debootstrap</code> and <code>extlinux</code> packages installed. Some virtualization environment is highly recommended for testing, such as KVM/QEMU.</p>
<h3>Install system</h3>
<p>This will install the system on a disk mounted at <code>mnt</code>. Choose a hostname for the instance to create, substitute it for ${HOSTNAME}. Substitute the URL to your nearest <a href="http://www.debian.org/mirror/">Debian mirror</a> for ${MIRROR}.</p>
<ol>
<li><code>sudo debootstrap --variant=minbase --include=localepurge,netbase,ifupdown,net-tools,isc-dhcp-client,linux-base,linux-image-2.6-686,linux-image-2.6.32-5-686 squeeze mnt ${MIRROR}</code>
</li>
<li>sudo rm mnt/etc/udev/rules.d/70-persistent-net.rules
</li>
<li>sudo rm mnt/var/cache/apt/archives/*
</li>
<li>sudo rm mnt/var/cache/apt/*.bin
</li>
<li>sudo rm mnt/var/lib/apt/lists/*
</li>
<li>sudo rm mnt/var/log/dpkg.log*
</li>
<li>sudo rm mnt/var/log/apt/*
</li>
<li>sudo mkdir mnt/boot/extlinux
</li>
<li><code>sudo extlinux --install mnt/boot/extlinux</code>
</li>
<li>sudoedit mnt/boot/extlinux/syslinux.cfg
<pre>default linux 
    label linux
    kernel /boot/vmlinuz-2.6.32-5-686
    append initrd=/boot/initrd.img-2.6.32-5-686 root=UUID=${UUID} ro quiet</pre>
<p><em>Only for KVM/QEMU:</em> add <code>console=ttyS0</code> to the &#8220;append&#8221; line</p>
</li>
<li>sudoedit mnt/etc/inittab<br />
<em>For KVM/QEMU:</em> uncomment getty ttyS0 and comment out getty tty[1-6]<br />
<em>For others:</em> comment out getty tty[2-6]</p>
</li>
<li>sudoedit mnt/etc/passwd &#8211; blank password for root
</li>
<li>sudoedit mnt/etc/network/interfaces
<pre>
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
</pre>
</li>
<li>sudoedit mnt/etc/fstab
<pre>
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# &lt;file system> &lt;mount point>   &lt;type>  &lt;options>             &lt;dump>  &lt;pass>
proc            /proc           proc    nodev,noexec,nosuid   0       0
UUID=${UUID}        /               ext2    errors=remount-ro     0       1
</pre>
</li>
<li>sudoedit mnt/etc/hostname
<pre>
${HOSTNAME}
</pre>
</li>
<li>sudoedit mnt/etc/locale.nopurge
<pre>
MANDELETE

DONTBOTHERNEWLOCALE

SHOWFREEDSPACE

#QUICKNDIRTYCALC

#VERBOSE

en
</pre>
</li>
<li>sudoedit mnt/etc/apt/sources.list
<pre>
deb ${MIRROR} squeeze main
deb-src ${MIRROR} squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

# squeeze-updates, previously known as 'volatile'
deb ${MIRROR} squeeze-updates main
deb-src ${MIRROR} squeeze-updates main
</pre>
</li>
<li>sudoedit mnt/etc/apt/apt.conf.d/02nocache
<pre>
Dir::Cache {
  srcpkgcache "";
  pkgcache "";
}
</pre>
</li>
<li>sudoedit mnt/etc/apt/apt.conf.d/02compress-indexes
<pre>
Acquire::GzipIndexes "true";
Acquire::CompressionTypes::Order:: "gz";
</pre>
</li>
<li>sudo chroot mnt localepurge
</li>
<li>sudo chroot mnt apt-get update
</li>
<li>sudo chroot mnt passwd root
</li>
</ol>
<h3>Install on a physical disk</h3>
<ol>
<li>Create a bootable partition of at least 288 MB with system code 83 &#8220;Linux&#8221; using <code>fdisk</code></li>
<li>sudo mke2fs -L ${HOSTNAME} -t ext2 /dev/<em>xxxx</em>
</li>
<li>sudo UUID=`blkid -o value -s UUID /dev/<em>xxxx</em>`
</li>
<li>mkdir mnt
</li>
<li>sudo mount /dev/<em>xxxx</em> mnt
</li>
<li><em>Install system as above</em>
</li>
<li>sudo umount mnt
</li>
</ol>
<h3>Install in KVM/QEMU</h3>
<ol>
<li>dd if=/dev/zero of=${HOSTNAME}.img bs=1024 count=288K
</li>
<li>mke2fs -L ${HOSTNAME} -t ext2 ${HOSTNAME}.img
</li>
<li>UUID=`blkid -o value -s UUID ${HOSTNAME}.img`
</li>
<li>mkdir mnt
</li>
<li>sudo mount ${HOSTNAME}.img mnt
</li>
<li><em>Install system as above</em>
</li>
<li>sudo umount mnt
</li>
<li><code>virt-install --connect qemu:///system -n ${HOSTNAME} -r 256 --os-type linux --os-variant debiansqueeze --import --disk path=${HOSTNAME}.img --network=network:default --graphics none --virt-type kvm</code>
</li>
</ol>
<p>Use <code>--virt-type qemu</code> if your CPU doesn&#8217;t support virtualization.</p>
<p>Then you can start it with <code>virsh start ${HOSTNAME}</code> and connect to it with <code>virsh console ${HOSTNAME}</code></p>
<p>For some reason, doing <code>reboot</code> from inside the guest doesn&#8217;t seem to work properly. <code>virsh reboot</code> and <code>virsh shutdown</code> doesn&#8217;t work either (you might get that to work by installing some ACPI stuff in the guest). Use <code>halt</code> from inside the guest to have a clean shutdown, and then restart it with <code>virsh start</code>.</p>
<h3>Install in VirtualBox 4.1</h3>
<p>First create a virtual machine in VirtualBox with an empty VDI disk ${VDI_FILE} of least 288 MB.</p>
<p>Install VDI mounting tool according to <a href="http://jorgenmodin.net/index_html/archive/2011/12/13/mount-a-virtualbox-vdi-file-on-ubuntu-and-debian">this</a> description.</p>
<ol>
<li>mkdir vdi-mount</li>
<li>vdfuse-v82a -f ${VDI_FILE} vdi-mount</li>
<li>mke2fs -L ${HOSTNAME} -t ext2 vdi-mount/EntireDisk</li>
<li>mkdir mnt</li>
<li>sudo mount vdi-mount/EntireDisk mnt</li>
<li><em>Install system as above</em></li>
<li>sudo umount mnt</li>
<li>fusermount -u vdi-mount</li>
</ol>
<p>Then start the virtual machine in VirtualBox.</p>
<h3>Install in other virtualization environments</h3>
<p><em>Please tell me how!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to move MySQL data directory in Ubuntu Server</title>
		<link>http://www.staldal.nu/tech/2011/12/09/how-to-move-mysql-data-directory-in-ubuntu-server/</link>
		<comments>http://www.staldal.nu/tech/2011/12/09/how-to-move-mysql-data-directory-in-ubuntu-server/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 10:45:00 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=205</guid>
		<description><![CDATA[By default, the MySQL data is placed in /var/lib/mysql, which is a reasonable default. However, sometimes you want to place it somewhere else, such as on an other file system. Using a symlink doesn&#8217;t seem to work, so you have &#8230; <a href="http://www.staldal.nu/tech/2011/12/09/how-to-move-mysql-data-directory-in-ubuntu-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>By default, the MySQL data is placed in <code>/var/lib/mysql</code>, which is a reasonable default. However, sometimes you want to place it somewhere else, such as on an other file system. Using a symlink doesn&#8217;t seem to work, so you have follow this procedure.</p>
<p>To move the MySQL data directory from <code>/var/lib</code> to <code>/mnt/mydata</code>, run these commands as root:</p>
<ol>
<li><code>apt-get install mysql-server</code></li>
<li><code>service mysql stop</code></li>
<li><code>mv /var/lib/mysql /mnt/mydata/</code></li>
<li>replace <code>/var/lib/mysql</code> with <code>/mnt/mydata/mysql</code> in
<ul>
<li><code>/etc/passwd</code> &#8211; mysql</li>
<li><code>/etc/mysql/my.cnf</code> &#8211; [mysqld] datadir</li>
<li><code>/etc/apparmor.d/usr.sbin.mysqld</code> (twice)</li>
</ul>
</li>
<li><code>service mysql start</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/12/09/how-to-move-mysql-data-directory-in-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using ZTE Blade Android phone with Ubuntu 11.10</title>
		<link>http://www.staldal.nu/tech/2011/11/24/using-zte-blade-android-phone-with-ubuntu-11-10/</link>
		<comments>http://www.staldal.nu/tech/2011/11/24/using-zte-blade-android-phone-with-ubuntu-11-10/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 17:08:13 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=198</guid>
		<description><![CDATA[Using a ZTE Blade Android phone connected with USB is a bit tricky with Ubuntu 11.10. First you need to apply the patch in this bug, after doing that you should get USB storage to work. After doing that, it &#8230; <a href="http://www.staldal.nu/tech/2011/11/24/using-zte-blade-android-phone-with-ubuntu-11-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Using a ZTE Blade Android phone connected with USB is a bit tricky with Ubuntu 11.10.</p>
<p>First you need to apply the patch in <a href="https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch-data/+bug/894448">this bug</a>, after doing that you should get USB storage to work.</p>
<p>After doing that, it is also possible to get development and debugging to work over USB. Create a group <code>androiddev</code> (<code>addgroup --system androiddev</code>), and add yourself to it (<code>gpasswd -a <em>yourUsername</em> androiddev</code>). Then create a file <code>/etc/udev/rules.d/11-android.rules</code> with this content (4 lines, watch the line breaks):</p>
<blockquote><p>
SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;19d2&#8243;, ATTRS{idProduct}==&#8221;1353&#8243;, MODE=&#8221;0666&#8243;, OWNER=&#8221;root&#8221;, GROUP=&#8221;androiddev&#8221; #Normal Blade<br />
SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;19d2&#8243;, ATTRS{idProduct}==&#8221;1350&#8243;, MODE=&#8221;0666&#8243;, OWNER=&#8221;root&#8221;, GROUP=&#8221;androiddev&#8221; #Debug Blade<br />
SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;19d2&#8243;, ATTRS{idProduct}==&#8221;1354&#8243;, MODE=&#8221;0666&#8243;, OWNER=&#8221;root&#8221;, GROUP=&#8221;androiddev&#8221; #Recovery Blade<br />
SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;18d1&#8243;, ATTRS{idProduct}==&#8221;d00d&#8221;, MODE=&#8221;0666&#8243;, OWNER=&#8221;root&#8221;, GROUP=&#8221;androiddev&#8221; #Fastboot Blade
</p></blockquote>
<p>Finally logout and login again. Don&#8217;t forget to enable USB debugging on the phone before connecting it.</p>
<p>Depending on the exact model you have, you might need to adjust the file. See what the <code>lsusb</code> command says about your phone and put that product id in the second line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/11/24/using-zte-blade-android-phone-with-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to disable activity logging in Ubuntu 11.10 Oneiric Ozelot</title>
		<link>http://www.staldal.nu/tech/2011/10/27/how-to-disable-activity-logging-in-ubuntu-11-10-oneiric-ozelot/</link>
		<comments>http://www.staldal.nu/tech/2011/10/27/how-to-disable-activity-logging-in-ubuntu-11-10-oneiric-ozelot/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 17:09:56 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=191</guid>
		<description><![CDATA[Ubuntu has mechanism to log user activity such as used documents. This is used to facilitate searching, but can also be intrusive to your privacy. Here is a way to disable this logging without breaking Unity or any other part &#8230; <a href="http://www.staldal.nu/tech/2011/10/27/how-to-disable-activity-logging-in-ubuntu-11-10-oneiric-ozelot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ubuntu has mechanism to log user activity such as used documents. This is used to facilitate searching, but can also be intrusive to your privacy.</p>
<p>Here is a way to disable this logging without breaking Unity or any other part of the system, execute these commands in a terminal:</p>
<ol>
<li><code>sudo mv /etc/xdg/autostart/zeitgeist-datahub.desktop /etc/xdg/autostart/zeitgeist-datahub.desktop-inactive</code></li>
<li><code>rm ~/.local/share/recently-used.xbel</code></li>
<li><code>mkdir ~/.local/share/recently-used.xbel</code></li>
<li><code>rm -rf ~/.local/share/zeitgeist</code></li>
</ol>
<p>then log out and log in again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/10/27/how-to-disable-activity-logging-in-ubuntu-11-10-oneiric-ozelot/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Backup your mobile phone in Linux</title>
		<link>http://www.staldal.nu/tech/2011/07/31/backup-your-mobile-phone-in-linux/</link>
		<comments>http://www.staldal.nu/tech/2011/07/31/backup-your-mobile-phone-in-linux/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 08:55:16 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=184</guid>
		<description><![CDATA[To backup data from a non-smart SonyEricsson mobile phone (such as W890i) in Linux, use the gammu utility. Install gammu, it is available as a package in the standard repositories for Debian and Ubuntu, just install the gammu package. Create &#8230; <a href="http://www.staldal.nu/tech/2011/07/31/backup-your-mobile-phone-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To backup data from a non-smart SonyEricsson mobile phone (such as W890i) in Linux, use the <a href="http://wammu.eu/">gammu</a> utility.</p>
<ol>
<li>Install <a href="http://wammu.eu/">gammu</a>, it is available as a package in the standard repositories for Debian and Ubuntu, just install the <code>gammu</code> package.</li>
<li>
Create a <code>~/.gammurc</code> file with the following content:</p>
<blockquote><p>
[gammu]<br />
port = /dev/ttyACM0<br />
connection = at
</p></blockquote>
</li>
<li>Connect your mobile phone to the computer with the USB cable and select <code>Phone mode</code></li>
<li>Use<br />
<blockquote><p>
gammu backup &lt;filename&gt;.vcf -yes
</p></blockquote>
<p>to backup your phone book to a vCard file</li>
<li>Use<br />
<blockquote><p>
gammu geteachsms
</p></blockquote>
<p>to get all SMS stored in the phone (both sent and received), they will be written to STDOUT</li>
<li>There is also a lot more you can do with <a href="http://wammu.eu/">gammu</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/07/31/backup-your-mobile-phone-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP session timeout</title>
		<link>http://www.staldal.nu/tech/2011/07/20/php-session-timeout/</link>
		<comments>http://www.staldal.nu/tech/2011/07/20/php-session-timeout/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 09:13:40 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=179</guid>
		<description><![CDATA[The developers of PHP has, in their infinite wisdom, decided that the default session timeout should be 24 minutes (1440 seconds). This means that if you have a MediaWiki wiki and are editing a single page for half an hour &#8230; <a href="http://www.staldal.nu/tech/2011/07/20/php-session-timeout/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The developers of <a href="http://www.php.net/">PHP</a> has, in their infinite wisdom, decided that the default session timeout should be 24 minutes (1440 seconds).</p>
<p>This means that if you have a <a href="http://www.mediawiki.org/">MediaWiki</a> wiki and are editing a single page for half an hour and then click the save button, you are logged out and all your changes are lost. I just learned this the hard way.</p>
<p>Fortunately, you can change this with the <code>session.gc_maxlifetime</code> parameter in <code>php.ini</code>. So set this to a higher &#8211; more sane &#8211; value, such as 86400 (24 hours).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/07/20/php-session-timeout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrade to Ubuntu 11.04 without Unity</title>
		<link>http://www.staldal.nu/tech/2011/05/25/upgrade-to-ubuntu-11-04-without-unity/</link>
		<comments>http://www.staldal.nu/tech/2011/05/25/upgrade-to-ubuntu-11-04-without-unity/#comments</comments>
		<pubDate>Wed, 25 May 2011 08:43:47 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=175</guid>
		<description><![CDATA[The new Ubuntu release 11.04 Natty contains the new Unity desktop environment which is quite controversal. I have tried it for a while and I think it is neat but too buggy and immature. However, it is easy to revert &#8230; <a href="http://www.staldal.nu/tech/2011/05/25/upgrade-to-ubuntu-11-04-without-unity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://www.ubuntu.com/">Ubuntu</a> release 11.04 Natty contains the new Unity desktop environment which is quite controversal. I have tried it for a while and I think it is neat but too buggy and immature. However, it is easy to revert to the old Gnome 2 desktop environment and have things working almost as in 10.10.</p>
<p>First do a normal distribution upgrade to 11.04, then go to <code>System Settings</code> -> <code>Login Screen</code> and select <code>Ubuntu Classic</code> as default session and reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/05/25/upgrade-to-ubuntu-11-04-without-unity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Sveon SNT1020 WiFi USB adapter in Ubuntu</title>
		<link>http://www.staldal.nu/tech/2011/04/28/using-sveon-snt1020-wifi-usb-adapter-in-ubuntu/</link>
		<comments>http://www.staldal.nu/tech/2011/04/28/using-sveon-snt1020-wifi-usb-adapter-in-ubuntu/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 14:28:41 +0000</pubDate>
		<dc:creator>Mikael Ståldal</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.staldal.nu/tech/?p=168</guid>
		<description><![CDATA[I just brought an Sveon SNT1020 WiFi USB adapter. It works very well with Ubuntu Linux 10.10, just connect it to an USB 2 port and you can start using it with NetworkManager right away, no drivers or setup necessary. &#8230; <a href="http://www.staldal.nu/tech/2011/04/28/using-sveon-snt1020-wifi-usb-adapter-in-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just brought an <a href="http://www.sveon.com/fichaSNT1020.html">Sveon SNT1020 WiFi USB adapter</a>.</p>
<p>It works very well with Ubuntu Linux 10.10, just connect it to an USB 2 port and you can start using it with NetworkManager right away, no drivers or setup necessary. You should possibly disable any built-in WiFi adapters first though.</p>
<p>It cost €35.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.staldal.nu/tech/2011/04/28/using-sveon-snt1020-wifi-usb-adapter-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

