Jul 062012
 

Sometime ago I ported iodine to Android. It works, but it is not very stable and it is difficult to monitor if iodine is still running. MagicTunnel made it somewhat easier to manage, but didn’t solve the stability issue.

Since I found this unsatisfactory I developed my own DNS tunnel. The client is written in pure Java and the server is written in node.js. The client doesn’t even require root. My neighbour published the client application on Google Play and will take care of support and maintenance with me as second line. The source code is available on GitHub.

I am quite proud of this rather complex application!

DNS traffic is done through port 53 and iodine is element 53 of the periodic table.

Mar 112012
 

For my own record and maybe for your convenience I wrote down the steps to install a Debian/Ubuntu VPS as web server. This setup is optimized for low memory usage (128-512 MB). This means nginx instead of Apache, no DNS server and no e-mail server (only outgoing mail) and some MySQL, PHP and nginx tuning.

This setup guide has been tested for a VPS on OpenVZ, Xen and KVM and for Debian 6.0 (Squeeze), Ubuntu 10.04 (Lucid Lynx) and 11.10 (Oneiric Ocelot). My favorite combination so far is KVM and Debian 6.0 with the Dotdeb repository (fast virtualization, stable Linux and the latest server software).

This setup is handling > 60,000 page views per day (> 100,000 hits) for a dozen of sites on a dual core VPS (2 × 2.4 Ghz) with 512 MB memory with ease (little CPU usage, load average 0.1-0.2, and almost no swapping).

I use Hurricane Electric Free DNS Management, because I like the fast web interface, the possibility to set the TTL and because it is free (up to 50 domains), but be aware wildcard domains are not allowed (anymore). List of free DNS providers.

has been so kind to provide a VPS to test this guide.

Cheap, reliable VPS providers:

Fora:

Index

Setup VPS

From the hosting control panel:
  • Configure the host name
  • Configure rDNS and SPF (for reliable e-mail)
    • Check: dig -x <IP>
    • Check: dig TXT <domain>
    • SPF wizard
  • Point a domain name to the VPS
  • Install a recent version of Debian or Ubuntu

Setup security

  • Login to the VPS:
    • ssh root@domain
  • Set new root password:
    • passwd
  • Fix the hostname when needed:
    • hostname <name>
    • nano /etc/hosts
  • apt-get update
  • apt-get upgrade
  • apt-get install nano sudo
  • Sometimes needed:
    • locale-gen en_US en_US.UTF-8
    • dpkg-reconfigure locales
  • When IPv6 doesn’t work: nano /etc/gai.conf
precedence ::ffff:0:0/96  100
  • If you want more recent package versions, use Dotdeb
    • Don’t change to Dotdeb afterwards, because you will run into dependency problems!
  • Not every VPS-template is perfect and it may be necessary to prevent kernel/grub updates
    • nano /etc/apt/preferences
Package: linux-base linux-image linux-headers firmware-linux-free
Pin: version 2.6.32-30
Pin-Priority: 1001

Package: grub-common
Pin: version 1.98+20100804-14
Pin-Priority: 1001

This can be fixed this way too.

  • mkdir /root/.ssh
  • chmod 700 /root/.ssh
  • nano /root/.ssh/authorized_keys
    • paste key from local computer
    • cat ~/.ssh/id_dsa.pub
  • ssh-keygen -t dsa
  • nano /etc/ssh/sshd_config
Port 22022
PasswordAuthentication no
ClientAliveInterval 120
ClientAliveCountMax 600
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp
Match Group users
ChrootDirectory /home
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
  • service ssh restart
  • chown root:root /home/*
  • apt-get install iptables
  • nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
  • mkdir /etc/fw
  • Download FirewallBuilder
    • use web server template
    • allow https in
    • allow port 22022 in (ssh)
    • allow port 587 out (ssmtp)
    • allow http/https out (for updates)
    • allow ntp out
    • allow ftp out
    • allow xmpp-server in/out
    • allow xmpp-client in
    • Install
  • nano /etc/rc.local
/etc/fw/firewall.fw
echo 1 >/proc/sys/net/ipv6/conf/eth0/disable_ipv6
  • Prevent DoS attacks (to a certain extend):
iptables -I INPUT 1 -i eth0 -p tcp --syn --dport :1024 -m connlimit --connlimit-above 25 -j LOG --log-prefix "Conn limit: "
iptables -I INPUT 2 -i eth0 -p tcp --syn --dport :1024 -m connlimit --connlimit-above 25 -j DROP

(Documentation)

You can put these extra rules in Firewall Builder: double click on your machine name under Firewalls, then button Firewall Settings, tab Prolog/Epilog, second textarea.

  • nano /etc/default/useradd
SHELL=/bin/false

Setup time

  • apt-get install ntpdate
  • nano /root/ntpdate.sh
#!/bin/sh
/usr/sbin/ntpdate pool.ntp.org
  • chmod 755 /root/ntpdate.sh
  • crontab -e
0 9 * * * /root/ntpdate.sh >>/root/ntpdate.log 2>&1

Not needed/possible when shared Linux kernel (for example OpenVZ)

Setup servers

Remove pre-installed stuff:
  • apt-get purge sendmail* apache2* bind9 samba xinetd
Install new stuff:
  • apt-get install nginx php5-fpm php5-cli php5-apc php5-curl php5-gd php5-suhosin php5-mcrypt php5-intl php5-mysql mysql-server
Debian:
  • Use Dotdeb repository (see before)
Ubuntu 10.04:
  • apt-get install python-software-properties
  • add-apt-repository ppa:nginx/stable
  • add-apt-repository ppa:brianmercer/php
    • Obsolete and due to be closed in the near future.
  • apt-get update

Setup MySQL

  • nano /etc/mysql/my.cnf
[mysqld]
skip-innodb
#skip-external-locking
skip-networking
query_cache_size = 64M
key_buffer = 64M
table_cache = 1024
  • Debian:
default-storage-engine=MyISAM
  • service mysql restart

Setup PHP

  • nano /etc/php5/fpm/pool.d/www.conf
;pm = dynamic
;pm.max_children = 10
;pm.start_servers = 4

pm = static
pm.max_children = 3
pm.status_path = /fpm_status
catch_workers_output = yes
pm.max_requests = 1000
listen.backlog = -1

request_terminate_timeout = 60s
request_slowlog_timeout = 30s
slowlog = /var/log/php5-fpm-slow.log
  • You could also use the dynamic process manager:
pm = dynamic
pm.max_children = 7
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1
  • or the new on demand process manager:
pm = ondemand
pm.max_children = 3
pm.process_idle_timeout = 3s
  • nano /etc/php5/fpm/php.ini
cgi.fix_pathinfo = 0;
memory_limit = 80M;
user_ini.filename = ".user.ini"
upload_max_filesize = 4M
open_basedir = /home:/tmp
allow_url_fopen = Off
mail.add_x_header = Off

[PATH=/path/to/folder]
open_basedir =
suhosin.simulation = On
  • Debian:
date.timezone = "Europe/Amsterdam"
  • nano /etc/php5/fpm/conf.d/apc.ini
apc.enabled=1
apc.shm_size=96M
apc.cache_by_default=0
;apc.ttl=900
apc.stat=1
  • Get maximum size: sysctl kernel.shmmax
  • nano /etc/sysctl.conf
kernel.shmmax=83886080
  • nano .user.ini
apc.cache_by_default=1
  • nano /etc/php5/conf.d/suhosin.ini
suhosin.mail.protect=2
suhosin.memory_limit = 128M

[PATH=/path/to/piwik]
suhosin.memory_limit = 800M
  • service php5-fpm restart

Setup nginx

  • nano /etc/nginx/nginx.conf
worker_processes 2;
server_tokens off;
client_max_body_size 4M;
  • Enabled GZIP:
#gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 1;
gzip_min_length 1100;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/x$
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";

(you might want to use extra config files in /etc/nginx/conf.d)

  • service nginx restart

If you want to migrate from one server to another, you can do this:

server {
        listen 80;
        location / {
                proxy_pass http://aaa.bbb.ccc.ddd;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_redirect off;
        }
}

Setup WordPress

  • Segregate users:
    • useradd <username>
    • passwd <username>
    • usermod -G users <username>
  • File permissions
find /home -type d -name 'wp-content' -exec mkdir -p {}/../assets \;
find /home -type d -name 'wp-content' -exec mkdir -p {}/gallery \;
find /home -type d -name 'wp-content' -exec mkdir -p {}/uploads \;
find /home -type d -name 'wp-content' -exec mkdir -p {}/upgrade \;

chown root:root /home
chown -R <username>:www-data <username>

find /home -type d -exec chmod 2750 {} \;
chmod 755 /home
find /home -type d -name '.ssh' -exec chmod -R 2700 {} \;
find /home -type d -name 'wp-content' -exec chmod -R 2770 {}/gallery \;
find /home -type d -name 'wp-content' -exec chmod -R 2770 {}/uploads \;
find /home -type d -name 'wp-content' -exec chmod -R 2770 {}/upgrade \;
find /home -type d -name 'wp-content' -exec chmod -R 2770 {}/upgrade \;
find /home/ -type f -exec chmod 0640 {} \;

Setup Piwik

9 * * * * su www-data -c "/usr/bin/php5 .../misc/cron/archive.php --url=http://example.org/"
>>.../piwik-archive.log 2>&1

Setup E-Mail

Root=user@example.org
MailHub=smtp.gmail.com:587
RewriteDomain=example.org
Hostname=example.org
FromLineOverride=YES
UseTLS=YES
UseSTARTTLS=YES
AuthUser=user@example.org
AuthPass=...
AuthMethod=LOGIN
  • nano /etc/ssmtp/revaliases
root:user@example.org:smtp.gmail.com:587
www-data:user@example.org:smtp.gmail.com:587

For Google mail send limits, see here.

Don’t forget to setup rDNS and SPF.

Possible alternative: Msmtp (not tested)

Setup FTP

  • apt-get install proftpd
    • standalone
  • nano /etc/proftpd/proftpd.conf
RequireValidShell off
  • service proftpd restart

(needed for WordPress updates)

Setup XMPP

Backup

  • Backup databases:
fn="/tmp/backup_mysql.sql.gz"
mysqldump -u... -p... --all-databases | gzip -9 >$fn
scp -q -P 22022 $fn user@domain:/path/to/folder/
  • Restore databases:
gunzip <test.gz >/tmp/dump.sql
mysql -u... -p... </tmp/dump.sql
mysqladmin -u... -p... flush-privileges
  • You might need to restore the debian-sys-maint password:
    • nano /etc/mysql/debian.cnf
  • Backup files with rsync (apt-get install rsync)
rsync -avz -e 'ssh -p 22022' /etc/ user@domain:/path/to/folder/
rsync -avz -e 'ssh -p 22022' /var/lib/ user@domain:/path/to/folder/
rsync -avz -e 'ssh -p 22022' --exclude some/folder /home/ user@domain:/path/to/folder/
  • crontab -e
0 1 * * * /root/backup.sh >>/root/backup_`date +\%F`.log 2>&1
duplicity --exclude-filelist=duplicity.exclude --full-if-older-than 1W --allow-source-mismatch / rsync://user@host:22022//path/to/backup/folder
duplicity remove-older-than 1M --force rsync://user@host:22022//path/to/backup/folder

Some typical excludes for duplicity:

- /sys
- /dev
- /proc
- /tmp
- /mnt
- /var/lib/mysql
- /var/lib/mongodb

You might need a backport of duplicity on Debian.

(duplicity tutorial)

Monitoring

  • apt-get install munin munin-node sysstat libwww-perl libipc-sharelite-perl libcache-cache-perl
  • perl -MCPAN -eshell
  • install IPC::ShareLite
  • nano /etc/munin/plugin-conf.d/munin-node
[nginx_status]
env.url http://host/nginx_status

[nginx_request]
env.url http://host/nginx_status
  • ln -s /usr/share/munin/plugins/nginx_* /etc/munin/plugins
  • ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins
  • rm /etc/munin/plugins/mysql_innodb
  • rm /etc/munin/plugins/iostats_ios
  • service munin-node restart
  • munin-node-configure –suggest
  • PHP5-FPM
  • Other plugins

Tuning

  • nano /etc/sysctl.conf
vm.swappiness=10

Tools

Be sure to lock these down behind a firewall / password.

Remote desktop

  • apt-get install  lxde-core lxtask lxde-icon-theme xfonts-base xarchiver tightvncserver
  • tightvncserver :1
  • tightvncserver -kill :1
  • nano ~/.vnc/xstartup
lxterminal &
/usr/bin/lxsession -s LXDE &
  • tightvncserver :1
  • If you want a browser:
    • apt-get install epiphany-browser
  • xtightvncviewer -via “user@domain -p 22022″ localhost:1
  • If you want VNC in your web browser: noVNC

Please let me know if you have any remarks or suggestions.

Aug 122011
 

I am using the fast and light bbPress 1.x stand-alone forum software for support on some of my WordPress plugins.

To reduce spam I added the following code to bb-config.php to automatically close old topics:

// Auto close topics older than 10 days
mysql_connect(BBDB_HOST, BBDB_USER, BBDB_PASSWORD);
mysql_select_db(BBDB_NAME);
mysql_query('UPDATE bb_topics SET topic_open = 0 WHERE DATEDIFF(CURDATE(), topic_time) > 10');
mysql_close();
Jul 172011
 

BrowserID logoI welcome any initiative that could free us from logging in with a user name and password. I have created an account on countless websites and I have to remember all those user names and passwords. Except from being inconvenient, this is also not very safe.

The Identity Team of Mozilla Labs has recently launched BrowserID, an open source experiment to login with just two clicks. The idea is that your e-mail addresses represent your identity and that someone vouch for your ownership of it. You can read here how it works and you can try it here.

Because I like the idea and I wanted to support it, I wrote this WordPress plugin to allow logging in with BrowserID to any WordPress powered website (currently 50,899,997).

Install now

I am curious what you think about BrowserID.

Jun 142011
 

Sometimes guests write something on my weblog. I like guest posts to have a different background color. In the past I realized this with a little bit of PHP code and some CSS styling. To realize this in a nicer way and to make it available to more people I crafted another WordPress plugin for it. With the Author Color plugin each author can simply set the post background and border color using the personal option of his/her profile page.

Install now

Author Color - Profile personal optionsAuhor Color - Example post

Jun 122011
 

BackPackTrack for AndroidWhen I am traveling I like to display the route I have traveled so far for the people at home. To simplify this I wrote an open source Android application to keep track of my route automatically. To save batteries the application turns on the GPS of my Android phone periodically and tries to acquire an accurate location for some time. It is also possible to mark important locations manually (make waypoints), like an attraction or the hotel I am sleeping in. It is also possible to geocode an address (find the latitude/longitude for an address), for the case I forgot to make a waypoint. When I have internet access I can upload the route information to my weblog easily, maybe after I have reverse geocoded a few marked locations (find the address for a latitude/longitude). To make the upload to my weblog possible, I wrote a little WordPress plugin to extend the WordPress XML-RPC protocol. The route information is stored as a standard GPX file attached to a post which is automatically created at the first upload. The excellent XML Google Maps WordPress plugin can be used to display a map based on the GPX file (example).

Install now

QR code BackPackTrack for Android

May 172011
 

Just over three months ago I published the Add Link to Facebook WordPress plugin. I had never expected that the number of downloads would be over 100,000 today! Last week the number of ratings passed 300. The average rating is great (4 stars). The plugin is currently number 26 on the list of the most popular WordPress plugins. So far I have answered more than 1100 questions (!). To reduce the number of questions, I opened a forum, wrote an extensive FAQ and this week I added an User Guide. Since the first release I improved a lot of things and added quite a lot of features, such as showing the names of the people who liked the link, adding a Facebook like and send button and two-way comment integration. It is nice to see that something I wrote for myself is making a lot of other people happy too!

Update 20/6/2011: > 150,000 downloads, > 500 ratings, #19 most popular plugins, #131 top 1000 authors
Update 18/7/2011: > 200,000 downloads, > 650 ratings, #26 most popular plugins, #103 top 1000 authors
Update 24/8/2011: > 250,000 downloads, > 825 ratings, #26 most popular plugins, #86 top 1000 authors
Update 15/2/2012: > 500,000 downloads, > 600 ratings, #12 most popular plugins, #12 highest rated, #53 top 1000 authors
Update 15/12/2012: > 1,000,000 downloads, > 2120 ratings, #48 most popular plugins, #4 highest rated, #38 top 1000 authors

Mar 132011
 

Sometimes it is useful to have a DNS tunnel to circumvent too strict firewalls.

I already had installed and configured an iodine server on my AVM FRITZ!Box Fon WLAN 7270 v2 using Freetz and wanted to have an iodine client on my already rooted Sony Ericssons Xperia X10 mini. I started with looking for a suitable TUN Driver for my phone. Luckily I found one on the XDA developers forum. Next I started looking for a iodine client ported to Android. I found this one, but it didn’t work on my phone. So I decide to port iodine myself. This appeared to be not so simple, because the Android Linux is not a standard Linux. I had to change the source code on several places to make it work. I have sent a patch to the author of iodine, so maybe it will be part of the iodine package in the near future.

If you want to build iodine for Android yourself, you can follow these steps:

  • Download and install the Android SDK
  • Download and install the Android NDK
  • Download and unpack iodine-0.6.0-rc1
  • cd iodine-0.6.0-rc1/src
  • make base64u.h base64u.c
  • patch -p1 <…/iodine-0.6.0-rc1-android-3.patch
  • …/ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk

If the compilation succeeded, you can now try the executable on your phone:

  • adb push ./libs/armeabi/iodine /data/local/tmp
  • adb shell
  • su
  • cd /data/local/tmp
  • chmod 777 iodine
  • ./iodine

It will not work from an SD card, because Android mounts SD cards non-executable!

I choose iodine over dns2tcp, because it is possible to route all traffic through the tunnel. To start the iodine client and to setup routing I created a shell script. If you want to use this script, you have to fill in your own server details. It depends on busybox provided by Titanium backup and it assumes that a tunnel will be created over WiFi (device wlan0).

To copy the TUN Driver and the startup script to your phone:

  • adb push tun.ko /data/local/tmp
  • adb push iodine.sh /data/local/tmp

You can now try to setup a DNS tunnel on your phone:

  • adb shell
  • su
  • cd /data/local/tmp/
  • chmod 777 iodine_route.sh
  • iodine_route.sh

I use Script Manager to start the tunnel from my phone.

You can restore the default routing by disabling and enabling WiFi.

If you want to store iodine on a permanent location, you can re-mount your system partition read-write:

  • mount -o remount,rw -t yaffs2 /dev/block/mtdblock<your block number> /system
  • ../busybox cp /data/local/tmp/* /system/xbin

Tip: my hosting provider didn’t allowed me to set NS records for a sub-domain, that is why I used the FreeDNS service.

Fun facts:

  • iod = IP over DNS
  • DNS port number = 53 = atomic number of iodine

Download the patch, script and generic binary.

Update 19/5/2012: even easier now: MagicTunnel.

Update 6/7/2012: see here for my own DNS tunnel implementation.

Comments and questions are as always very welcome.

Feb 072011
 

For my own convenience I wrote another WordPress plugin, which is specialized in adding links of posts that are being published to your Facebook wall or pages. Although you have to create a Facebook application yourself (which is not difficult), the setup is as simple as it can be. Just follow the directions of the plugin. If you encounter a problem, please let me know below and I will try to help you.

The link title will be the post title. The link description will be the excerpt, or part of the post text if there is none. It is possible to configure a link image (WordPress icon, featured image or custom image) or you can let Facebook select one automatically. It is possible to exclude individual post links from being added to your wall or pages by ticking a check box just above the publish button. There is support for multi-user and network sites and shortcodes will be processed. It works for remote publishing too, for example from Android or iOS (iPhone, iPad) powered devices or using Window Live Writer or from Linux using BloGTK or Blogilo.

You can find the plugin here in the WordPress repository.

Install now

Add Link to Facebook

Oct 262010
 

Here is in short how you can host a static website on

  1. Sign up and create an application on your dashboard
  2. Create a local folder and put the two files below and your static files (.html, .css, .jpg, etc) into it
  3. Change ‘your-app-id‘ of app.yaml into the id of the application you have created in step 1
  4. Upload the application
  5. Connect your domain name to the application (optional)
    • Use WWWizer to redirect your naked domain

app.yaml

application: your-app-id
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: main.py

main.py

import os
import string
import logging
import mimetypes
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.dist import use_library
 
use_library('django', '0.96')
 
class Page(webapp.RequestHandler):
	def get(self, path):
		logging.info(os.environ['REMOTE_ADDR'] + ' GET ' + path)
		filename = self.getFileName()
		if os.path.exists(filename):
			ext = string.lower(os.path.splitext(filename)[1])
			if ext == '.ico':
				mimetype = 'image/ico'
			else:
				try:
					mimetype = mimetypes.types_map[ext]
				except KeyError:
					mimetype = 'application/octet-stream'
			self.response.headers['Content-Type'] = mimetype
			self.response.out.write(open(filename, 'rb').read())
		else:
			self.error(404)
			self.response.out.write('Not found')
 
	def getFileName(self):
		page = self.request.path[1:]
		if page == '':
			page = 'index'
		if '.' in page:
			suffix = ''
		else:
			suffix = '.html'
		return os.path.join(os.path.dirname(__file__), page + suffix)
 
application = webapp.WSGIApplication([(r'/(.*)', Page)], debug=False)
 
def main():
	run_wsgi_app(application)
 
if __name__ == '__main__':
	main()

If you want to host more than one website with the same application, you could replace the last line of the ‘getFileName‘ function with the following and put the static files of each website in a sub-folder with the name of the domain (for example ./www.example.org/).

		domain = os.environ['SERVER_NAME']
		path = os.path.join(os.path.dirname(__file__), domain)
		return os.path.join(path, page + suffix)
Aug 242010
 

If you have been traveling to developing countries, like India, you may have experienced that using WordPress on slow connections and/or slow computers can be an exercise in patience. To solve this problem I wrote another new WordPress plugin “Light Post” that allows you to publish and edit posts a lot quicker in such circumstances. The price is that you can only edit HTML and that you only have a basic set of features available, like choosing the title, category and tags. Availability of JavaScript and Flash is not required, but when JavaScript is enabled you can upload and insert images. To prevent loading of the chunky WordPress administration panel, the plugin redirects the browser directly after logging in to an alternate post management screen outside the normal WordPress environment (this can be turned off with a setting). Just one click brings you back to the normal WordPress rich edit screen and visa versa (look in the ‘Publish’ meta box for a link).

Install now

 Posted by at 14:06  Tagged with:
Jul 292010
 

For a while I have been searching for a WordPress plugin that could display at least the Google PageRank for a configurable list of sites in a dashboard widget. A requirement was that no third party site should be referenced to get the rankings. I couldn’t find one, so I wrote one myself.

The List Rank Dashboard Widget can display currently:

By default the Google PageRank, Alexa Rank and number of Delicious Posts are displayed for the current site, but more sites can be added using the settings. After entering a Google API Key and a Yahoo! Application ID (both free) the number of Google and Yahoo! Backlinks can be displayed too.

Included is a shortcode to display rankings in post, pages and sidebar widgets (see the Faq for usage instructions).

If you like to see more rankings, please leave a comment, but don’t ask me to add rankings, such as the Technorati Authority, which requires parsing an HTML response. Sooner or later this will break, when the design of the site is being changed.

Install now

 Posted by at 21:40  Tagged with:
May 082010
 

Based on the installation instructions of the previous version here is a how-to guide to install the desktop version of Ubuntu Lucid Lynx (version 10.04) on an Eee PC. This guide has been tested using an Eee PC 701 and will take one or two hours to execute (depending on your download speed and the hardware used).

Starting points

  1. The (smaller) SSD will be erased (backup important data!)
  2. Ubuntu will be installed without customizations (‘Vanilla’) and without swap space
  3. You have some experience using the CLI (Terminal)
  4. An USB flash memory stick of at least 1 GB is available

Instructions

The first four steps can be executed on a desktop PC running Microsoft Windows too. Instead of UNetbootin it is possible to use the new Ubuntu USB Startup Disk Creator too (System | Administration | USB Startup Disk Creator).

  1. Download the desktop version of Ubuntu here
  2. Download UNetbootin here
  3. Insert the USB flash memory stick into your desktop PC
  4. Start UNetbootin
    • Select ‘Diskimage’ and select the downloaded .iso file
    • Select the inserted USB flash memory stick and press ‘Ok’
      • Be careful to select the correct drive!
      • Check in the terminal with the command ‘mount’
  5. Remove all removable media from the Eee PC and insert the prepared USB flash memory stick
  6. Turn the Eee PC on
    • Press Esc soon after startup
    • Select USB Flash Memory or Disk and press enter
    • Select ‘Default’ (or wait a moment)
    • Ubuntu Live should startup
  7. Check if everything works (wireless, sound, etc)
    • Wireless should work on most models with kernel 2.6.32-23 or higher, see this bug report
    • Running an update with a wired connection maybe necessary
  8. Select System | Preferences | Appearance, Visual Effects -> None
    • Close the window
    • By pressing Alt + left mouse you can drag larger windows using the mouse pad now
  9. Start the installation wizard by double clicking the install icon and follow its steps
    • I choose my own keyboard layout: ‘USA – International (AltGr dead keys)’
    • ‘The installer has detected that the following disks have mounted partitions’ -> No
  10. At the step ‘Prepare disk space’:
    • Select ‘Specify partitions manually (advanced)’ and press ‘Forward’
    • Take a good look at what drive you want to install Ubuntu (all data will be erased!)
      • You probably want to install on the smaller SSD, because it is the fastest
    • Delete all partitions from the chosen drive (click on each partition and press ‘Delete’)
    • Select ‘free space’ and press ‘Add…’
    • Choose ‘Ext3 journaling file system’ as ‘Use as:’ (I don’t recommend using Ext4)
    • Choose ‘/’ as ‘Mount Point’
    • Press ‘Forward’
    • Confirm the message that no swap has been selected by pressing ‘Continue’
  11. Continue the wizard, the installation will take about 30 minutes
  12. Press ‘Reboot Now’ and remove the USB flash memory stick when asked (not earlier!)

Ubuntu Lucid Lynx is installed and should work now.

Tweaks

The following steps are to improve some things and to setup others. Skip what you don’t need/want.

  1. Setup wireless internet:
    • Click the radar symbol in the upper task bar
    • Select your network of preference
    • Enter the network password if required
  2. Disable login sound:
    • Open the terminal and run this command:
    • gconftool-2 –set /desktop/gnome/sound/event_sounds –type bool false
  3. Select System | Administration | Synaptic Package Manager, then Settings | Preferences | Files
    • Select ‘Delete downloaded packages after installation’
    • Set ‘Delete History files older than 0 days’
    • Press ‘Ok’
  4. Select System | Administration | Time and Date
    • ‘Click to make changes’ and enter your password if asked
    • Set ‘Configuration’ to ‘Keep Synchronized’
    • Press ‘Install NTP support’
    • Select one or more servers near your location
  5. Right click on the date/time in the upper task bar and select ‘Preferences’
    • General | 24 hour format
    • Location | Add, enter a location name near to you
    • Weather | C & km/h
  6. I installed the following applications:
  7. Localized spell-checker: sudo apt-get install aspell-<language> (thanks Satyamo)
  8. Localize OpenOffice (thanks Satyamo):
    • Go here
    • Search for your language
    • Press ‘Get it!’ and save the file
    • Right click on the saved file
    • Select ‘Open with Other Application…’
    • Select ‘OpenOffice.org Word Processor’
    • Follow the dialog
  9. I changed the following Firefox settings:
    • View | Toolbars | Bookmarks Toolbar -> Uncheck
    • View | Status Bar -> Uncheck
    • Edit | Preferences | Advanced | Network | Offline Storage ->Use up to 0 MB
    • Type ‘about:config’ in the addres bar
      • Press ‘I’ll will be carefull, I promise!’
      • Set ‘browser.urlbar.clickSelectsAll’ to ‘true’ by double clicking
    • Tool | Add-ons, search ‘Firebug’, click ‘Add to Firefox…’, etc
    • Maybe to want to install a nice persona
  10. Start Pidgin/Empathy automatic:
    • System | Preferences | Startup Applications | Add
      • Name/Description: whatever you like
      • Command: pidgin or empathy
  11. Default detailed file lists:
    • Open a file browser
      • Select Edit | Preferences
      • View new folders using -> List View
  12. Default subtitles:
    • Open Move Player
      • Edit | Preferences
      • Text Subtitles, Automatically Load … -> Check
  13. Take a look here for more fixes

Performance

Lucid Karmic Intrepid Jaunty
Startup until login (+BIOS): about 35 seconds 35 sec 65 sec 45 sec
Login until desktop: about 25 seconds 25 sec 30 sec 25 sec
Shutdown: about 5 seconds 7 sec 15 sec 15 sec
Used space after all updates: about 2.3 GiB (df -h) 2.2 GiB 2.6 GiB 2.2 GiB

Desktop

After some shuffling around, my desktop looks like this:

Basically the bottom panel has been removed and most of its items have been moved to the top panel.

Function keys

F1 Zzz Works
F2 Wireless Works
F3 Contrast- Works
F4 Contrast+ Works
F5 Externe monitor ?
F6 Task manager ?
F7 Mute Works
F8 Volume- Works
F9 Volume+ Works

Other functions

Suspend on lid close Works
Video/sound Works
Microphone Works
Webcam Works
Bluetooth (Sitecom CN-516) Works

For some models, like the 1201N, you might have to fix the function keys like this.

Comments, corrections and additions are as always very welcome!

 Posted by at 9:53  Tagged with:
Mar 202010
 

Recently I installed the simple, but beautiful Suffusion theme by Sayontan Sinha. This theme is using the funtions.php file extensively, the same place where my shortcode definitions were stored. Sayontan will probably fix this in the near future by including a custom functions.php file from another location. I also used some PHP code in two sidebar widgets that was executed by the Exec-PHP plugin.

I thought, why not use a plugin to define shortcodes and execute PHP code snippets? I couldn’t find one, so I wrote one myself. You can find it in the WordPress repository as Shortcode Exec PHP.

Example shortcode to print your age:

extract(shortcode_atts(array('birthdate' => 'Jan 1, 1980'), $atts));
return floor((time() - strtotime($birthdate)) / (60 * 60 * 24 * 365.2425));

If you named the shortcode age, you can execute it in pages, posts, comments, widgets and/or RSS feeds like this:

[age birthdate="Mar 20, 2010"]

Please, use the forum for questions, bug reports and feature requests.

If you know a nice shortcode, you can leave it in the forum too.

Install now

Listing posts

If you want to list posts or pages on a post, page or in a widget, you can use the code below.

// Prevent recursion
global $outerPost;
if ($outerPost)
	return '';
 
// Parse parameters
extract(shortcode_atts(array('query' => 'post_type=post'), $atts));
$query = html_entity_decode($query);
 
// Create new post loop
global $post;
$outerPost = $post;
$my_query = new WP_Query($query);
while ($my_query->have_posts()) {
	$my_query->the_post();
	setup_postdata($my_query->post);
 
	// Process post
	echo '<em>'; the_title(); echo '</em>';
	echo '<div style="font-size: xx-small; border: 1px solid;">';
	the_content();
	echo '<div>';
}
$post = $outerPost;
$outerPost = null;
setup_postdata($post);

Example usage:

[list_posts query="author_name=marcel"]

Look here for possible query parameters.
Be sure the shortcode option ‘Output echoed‘ is checked.

Using forms

Example of form handling:

if (isset($_POST['form_select']))
	echo 'You selected ' . $_POST['form_select'] . '<br />';
?>
<form method="post">
<select name="form_select">
<option selected="selected" value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
<input type="submit" value="Submit" />
</form>

Be sure the shortcode option ‘Output echoed‘ is checked.

 Posted by at 16:11  Tagged with:
Jan 132010
 

If you know how to do it, most things are simple. Figuring out how to make my Asrock ION 330HT-BD (running Ubuntu Karmic) a wireless access point took me a couple of hours. For my own reference and maybe to save you some time I wrote down all steps.

How-to

  • Check wireless adapter type
    • lspci -v | grep Network

      • Should be AR9285
  • Enable IP forwarding
    • sudo gedit /etc/sysctl.conf
      • Uncomment
        • net.ipv4.ip_forward = 1
    • Live change
      • sudo echo 1 > /proc/sys/net/ipv4/ip_forward
    • Check
      • cat /proc/sys/net/ipv4/ip_forward
  • Give wireless adapter a static address
    • sudo gedit /etc/network/interfaces
      • Add code below
    • Live change
      • sudo /etc/init.d/networking restart
    • Check
      • ifconfig wlan0
auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    broadcast 192.168.0.255
  • Download latest Linux wireless drivers (currently version 2.6)
    • Extract archive
    • Build/install
      • cd compat-wireless-*
      • ./scripts/driver-select ath9k
      • make
      • sudo make unload
      • sudo make install
      • Redo when new kernel
    • Live change
      • sudo modprobe ath9k
    • Check
      • grep ath9k /var/log/syslog
  • Install hostapd
    • sudo apt-get install hostapd
    • sudo gedit /etc/default/hostapd
      • Uncomment
        • RUN_DAEMON=”yes”
        • DAEMON_CONF=”/etc/hostapd/hostapd.conf”
    • sudo gedit /etc/hostapd/hostapd.conf
      • Add
        • driver=nl80211
      • Change
        • ssid=<name>
        • hw_mode=g
        • auth_algs=1
        • wpa=2
        • wpa_passphrase=<password>
        • wpa_pairwise=TKIP
    • Live change
      • sudo /etc/init.d/hostapd restart
    • Check
      • grep hostapd /var/log/syslog
  • Install dnsmasq
    • sudo apt-get install dnsmasq
    • sudo gedit /etc/default/dnsmasq
      • Uncomment
        • DNSMASQ_OPTS=”–conf-file=/etc/dnsmasq.conf”
      • Comment
        • #CONFIG_DIR=/etc/dnsmasq.d
    • sudo gedit /etc/dnsmasq.conf
      • Add
        • interface=wlan0
        • dhcp-range=192.168.0.2,192.168.0.127,12h
    • Live change
      • sudo /etc/init.d/dnsmasq restart
    • Check
      • grep dnsmasq /var/log/syslog
  • Routing
    • Give the Asrock a static IP 192.168.1.x
      • Preferable by your local DHCP server (based on MAC address)
    • Add a static route 192.168.0.0/255.255.255.0 > 192.168.1.x
      • In your modem/router
  • Now you should be able to connect

Links

 Posted by at 8:37  Tagged with:
Jan 122010
 

This how-to describes which hardware and software components I used to build my Home Theater PC, with the ability to watch satellite television too. It includes a step-by-step guide for installing and configuring the required software, which appeared to be quite an adventure if you want to use a softcam, because the information was scattered around the internet.

Some people consider the use of a softcam illegal. My opinion is that a softcam can be used illegally, but if you use it in combination with a valid subscription on one PC only it is perfectly legal. In fact I see no difference with a real CAM, which contains the same kind of software (firmware).

For installing the software at least some experience using the Linux CLI is required.

Comments, corrections and additions are as always very welcome!

Hardware

Goal

  • Small size
  • Low power
  • Low noise
  • HD ready
  • Satellite reception
  • Softcam
  • Linux compatible
  • Affordable

Guide

Power usage

Asrock ION 330HT-BD + TeVii S660

watt kWh/year Per year
Powered down ~3 26 €5,55
Ubuntu running ~29 254 €53,60
VDR running, no client ~31 271 €57,29
Watching SD channel ~36 315 €66,53

Assuming an average of 21,1 cent per kWh

Software

Goal

  • Open source
  • Repositories, only compilation when really necessary
  • User friendly
  • Recent, stable, supported, actively developed software

Guide

  • Install Ubuntu Lucid Lynx 32 bit (use CD or unetbootin)
  • Pin kernel 2.6.32-25 (for remote control)
    • sudo gedit /etc/apt/preferences
      • Package: linux-generic linux-headers-generic linux-image-generic
      • Pin: version 2.6.32-25
      • Pin-Priority: 1001
  • Setup network (wireless or wired)
  • Update Ubuntu
    • sudo apt-get update
    • sudo apt-get upgrade
    • sudo apt-get install linux-image-2.6.32-25-generic linux-headers-2.6.32-25
  • Blacklist nouveau driver
    • sudo gedit /etc/modprobe.d/blacklist.conf
      • Add blacklist nouveau
  • Install NVIDIA driver
    • sudo apt-get install nvidia-current nvidia-current-dev nvidia-current-modaliases
    • sudo nvidia-xconfig
    • Reboot
  • To prevent tearing
    • System | Preferences | Appearance: Visual Effects: None
  • Setup build environment
    • sudo apt-get install linux-headers-2.6.35-25 build-essential libncurses-dev subversion cmake gcc libusb-dev libssl-dev
  • Install TeVii S660 driver
    • sudo apt-get install unrar
    • Download and extract to home folder
    • sudo cp -v tevii_s2_liplianin-*/linux/firmware/*.fw /lib/firmware
    • cd tevii_s2_liplianin-*
    • sudo make menuconfig
      • Disable Multimedia Support > DVB/ATSC Adapters > FireDTV and FloppyDTV
    • make -j2 (this takes some time)
    • sudo make install
    • Reboot
    • dmesg | grep dvb
      • Check TEVII S660 DVBS2 USB2.0 successfully initialized and connected
    • Redo when new kernel
  • Install newcs card server
  • Install oscam card server
    • Install libusb
    • svn co http://streamboard.gmc.to/svn/oscam/tags/1.10 oscam-1.10
    • cd oscam-1.10
    • make i386-pc-linux-libusb
    • sudo cp -v Distribution/oscam-* /usr/bin/oscam
    • Download config files
    • sudo mkdir -p /etc/oscam
    • sudo tar xzvf oscam_conf.tar.gz -C /etc/oscam
    • lsusb
    • Find ‘Bus xxx Device yyy: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
    • sudo gedit /etc/oscam/oscam.server
    • set ‘Device = xxx:yyy
  • Install softcam sasc-ng
    • sudo apt-get install linux-headers-`uname -r` build-essential mercurial openssl libssl-dev gettext
    • cd ~
    • hg clone http://85.17.209.13:6100/sc (bleeding edge!)
    • cd sc
    • gedit Makefile
      • Find and remove -O3 from CSAFLAGS
    • cd ~/sc/contrib/sasc-ng
    • chmod +x configure
    • chmod +x ./dvbloopback/module/config_dvb.pl
    • ./configure –dvb-dir=~/linux_tevii_ds3000/linux-tevii-ds3000
    • make
    • make module
    • sudo -s
    • cp sasc-ng /usr/bin
    • mkdir /lib/modules/`uname -r`/misc
    • /usr/bin/install dvbloopback.ko /lib/modules/`uname -r`/misc/
    • depmod
    • modprobe dvbloopback
    • ls /dev/dvb
      • Check adapter1 (assuming one tuner)
    • mkdir /etc/sc
    • cp cardclient.conf /etc/sc
    • When FTDI bug is fixed: cp cardslot.conf /etc/sc
    • Redo when new kernel
  • Create card server script
    • Download script
    • sudo -s
    • cp oscam /etc/init.d
    • update-rc.d oscam defaults 19
    • /etc/init.d/oscam start
  • Install CIR receiver driver
    • Download and install
    • Remote control configuration
      • 1st config: None, None
      • 2nd config: Nuvotron Transceivers/Remotes, None
    • Redo when new kernel (because it is a patch actually)
  • Install VDR
    • deb http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu lucid main
      • System | Administration | Software Sources, Other
    • sudo -s
    • apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 6CF20474
    • apt-get install vdr vdr-plugin-xineliboutput xineliboutput-sxfe libxine-dev libxine2 cpupowerd
    • gedit /etc/default/vdr
      • OPTIONS=”-w 60 -D 1 –lirc=/dev/null
    • More than one LNB
      • gedit /etc/vdr/diseqc.conf (Astra 19E2/23E5)
      • gedit /var/lib/vdr/setup.conf(create file)
        • DiSEqC = 1
    • gedit /var/lib/vdr/setup.conf(create file)
      • UpdateChannels = 0
    • Download channels.conf (syntax)
      • grep -v ‘:-’ channels.conf | grep ‘CANALDIGITAAL’ >/var/lib/vdr/channels.conf
      • grep -v ‘:-’ channels.conf | grep -v ‘CANALDIGITAAL‘ >>/var/lib/vdr/channels.conf
    • Or scan channels
      • sudo apt-get install w-scan
      • sudo /etc/init.d/sc stop
      • w_scan -fs -sS19E2 -o7 -D0c >channels.conf
      • w_scan -fs -sS23E5 -o7 -D1c >>channels.conf
      • sudo /etc/init.d/sc start
      • Make channels FTA:
        • awk -F: ‘{if ($1 == “” ) print $0 ; else \
        • print $1″:”$2″:”$3″:”$4″:”$5″:”$6″:”$7″:”$8″:0:”$10″:”$11″:”$12″:”$13}’  \
        • channels.conf >>/var/lib/vdr/channels.conf
    • cp remote.conf /var/lib/vdr (info)
    • sudo /etc/init.d/vdr start
      • Check /var/log/user.log
    • Optional: apt-get install vdr-plugin-femon vdr-plugin-eepg
  • Install Tvheadend
    • Add this to /etc/init.d/tvheadend at the start of do_start()
      • LOGGER="/usr/bin/logger -t tvheadend "
        i=0
        while [ ! -e /dev/dvb/adapter0/frontend0 ] ; do
        		if [ $i -gt 20 ] ; then
        				$LOGGER "dvb adapter not ready"
        				return 2
        		fi
        		sleep 3
        		i=$(($i + 1))
        done
        sleep 15
    • Configure: http://localhost:9981/
      • Code Word Client:
        • Hostname: 127.0.0.1
        • Port: 34000
        • Username: oscam
        • Password: oscam
        • DES Key: 01:02:03:04:05:06:07:08:09:10:11:12:13:14
        • Update Card -> check
  • Install XBMC
  • Watch
    • Disable screen saver
      • System | Preferences | Screensaver: Active …: Never
      • System | Preferences | Power Management -> Display: Never
    • Dowload vdr-sxfe.sh to home folder
      • System | Preferences | Startup Applications: Add
      • Command: browse to vdr-sxfe.sh
    • Alternative
      • Put .lircrc in the home folder
      • Add irexec -d to startup applications
      • Start/stop vdr-sxfe using Enter/Clear on the remote control
      • Easy when vdr-sxfe crashes
    • Start XBMC

Issues

  • FTDI bug
    • Linux kernel must be pinned
    • newcs is needed to read smartcard, which it sometimes fails to do at startup
  • Communication sasc-ng/newcs sometimes fails
  • Zap time encrypted channels >= 5 sec
  • The German FTA HD channels work, but the Dutch HD channels have only sound so far
  • No official repositories, some compilation necessary
  • I have to set the listed frequencies about 25 MHz lower to get signal. This is annoying, because scanning channels does not work properly. The cause is most probably the TeVii S660 device, since using Windows doesn’t make any difference (assuming the drivers are different) and because my LNB has been replaced in the meantime. My local supplier will replace the device when it is restocked (probably within a week).
  • The IR driver doesn’t work with the latest kernel
  • The fans of the Asrock are a little noisy, however the high pitch can be canceled:

To remove the heatsinks the motherboard has to be removed (four screws and some cables).

Questions

  • Does anybody know how to compile vdr-plugin-sc without compiling vdr too?
    • Without getting the message below when starting vdr
      • WARNING: The following plugins have been left out due to really binary incompatibility: sc.
    • See comments for pointers to solutions
  • Does anbody know the difference between the oscam version here and here?
    • June 6, 2010: both version will be merged

Links

http://ppa.launchpad.net/yavdr/testing-vdr/ubuntu lucid main
 Posted by at 8:30  Tagged with:
Nov 142009
 

I tried the Ubuntu Netbook Remix (Karmic Koala 9.10 version) on my desktop by installing the meta package ubuntu-netbook-remix and by adding the Go Home and Window Picker applets to the upper panel. Because the Desktop Switcher application has been dropped from the Karmic Koala release, I was searching for a documented way to remove the netbook remix. I couldn’t find one, so I determined on another desktop which packages are being installed and came up with the following:

  • Remove the Go Home and Window Picker applets
  • Using System | Preferences | Startup Applications disable and remove:
    • Maximus Windows Management
    • Netbook Launcher
  • Issue the following commands in the terminal:
    • sudo apt-get remove go-home-applet libclutk-0.2-0 libfakekey0 liblauncher-0.1-0 libnetbook-launcher-0 maximus netbook-launcher ubuntu-netbook-remix-default-settings webfav window-picker-applet ubuntu-netbook-remix
    • sudo apt-get remove cheese (if you hadn’t Cheese installed before)
    • sudo apt-get autoremove
  • Reboot

If you know a simpler way, please let me know.

 Posted by at 19:14  Tagged with:
Nov 102009
 

Based on the installation instructions of the previous version here a how-to guide to install the desktop version of Ubuntu Karmic Koala (version 9.10) on an Eee PC. This guide has been tested using an Eee PC 701 and will take one or two hours to execute (depending on your download speed and the hardware used).

Starting points

  1. The (smaller) SSD will be erased (backup important data!)
  2. Ubuntu will be installed without customizations (‘Vanilla’) and without swap space
  3. You have some experience using the CLI (Terminal)
  4. An USB flash memory stick of at least 1 GB is available

Instructions

The first four steps can be executed on a desktop PC running Microsoft Windows too. Instead of UNetbootin it is possible to use the new Ubuntu USB Startup Disk Creator too (System | Administration | USB Startup Disk Creator).

  1. Download the desktop version of Ubuntu here
  2. Download UNetbootin here
  3. Insert the USB flash memory stick into your desktop PC
  4. Start UNetbootin
    • Select ‘Disk Image’ and select the downloaded .iso file
    • Select the inserted USB flash memory stick and press ‘Ok’
  5. Remove all removable media from the Eee PC and insert the prepared USB flash memory stick
  6. Turn the Eee PC on
    • Press Esc soon after startup
    • Select USB Flash Memory or Disk and press enter
    • Select ‘Default’ (or wait a moment)
    • Ubuntu Live should startup
  7. Check if everything works (wireless, sound, etc)
  8. Select System | Preferences | Appearance, Visual Effects -> None
    • Press the ‘Close’ button below
    • By pressing Alt + left mouse you can drag larger windows using the mouse pad now
  9. Start the installation wizard by double clicking the install icon and follow its steps
    • I choose my own keyboard layout: ‘USA – International (AltGr dead keys)’
  10. At the step ‘Prepare disk space’:
    • Select ‘Specify partitions manually (advanced)’ and press ‘Forward’
    • Take a good look at what drive you want to install Ubuntu (all data will be erased!)
      • You probably want to install on the smaller SSD, because it is the fastest
    • Delete all partitions from the chosen drive (click on each partition and press ‘Delete’)
    • Select ‘free space’ and press ‘Add…’
    • Choose ‘Ext3 journaling file system’ as ‘Use as:’ (I don’t recommend using Ext4)
    • Choose ‘/’ as ‘Mount Point’
    • Check ‘Format?’
    • Press ‘Forward’
    • Confirm the message that no swap has been selected by pressing ‘Continue’
  11. Continue the wizard, the installation will take about 25 minutes
  12. Press ‘Reboot Now’ and remove the USB flash memory stick when asked

Karmic Koala is installed and should work now.

Tweaks

The following steps are to improve some things and to setup others. Skip what you don’t need/want.

  1. Open the terminal and run this command:
    • gconftool-2 –set /apps/compiz/plugins/move/allscreens/options/constrain_y –type bool false
    • By pressing Alt + left mouse you can drag larger windows using the mouse pad now
  2. Setup wireless internet:
    • Click the signal indicator in the upper task bar
    • Select your network of preference
    • Enter the network password if required
  3. Limit the number of writes to the SSD this way (sudo gedit /etc/fstab)
  4. Disable login sound:
    • Open the terminal and run this command:
    • gconftool-2 –set /desktop/gnome/sound/event_sounds –type bool false
  5. Select System | Administration | Synaptic Package Manager, then Settings | Preferences | Files
    • Select ‘Delete downloaded packages after installation’
    • Set ‘Delete History files older than 0 days’
    • Press ‘Ok’
  6. Select System | Administration | Time and Date
    • Press the keys symbol and enter your password if asked
    • Set ‘Configuration’ to ‘Keep Synchronized’
    • Press ‘Install NTP support’
    • Select one or more servers near your location
  7. Right click on the date/time in the upper task bar and select ‘Preferences’
    • General | 24 hour format
    • Location | Add, enter a location name near to you
    • Weather | C & km/h
  8. I installed the following applications:
  9. Localized spell-checker: sudo apt-get install aspell-<language> (thanks Satyamo)
  10. Localize OpenOffice (thanks Satyamo):
    • Go here
    • Search for your language
    • Press ‘Get it!’ and save the file
    • Right click on the saved file
    • Select ‘Open with Other Application’
    • Select ‘OpenOffice.org Word Processor’
    • Follow the dialog
  11. I changed the following Firefox settings:
    • View | Toolbars | Bookmarks Toolbar -> Uncheck
    • View | Status Bar -> Uncheck
    • Edit | Preferences | Advanced | Network | Offline Storage ->Use up to 0 MB
    • Type ‘about:config’ in the addres bar
      • Press ‘I’ll will be carefull, I promise!’
      • Set ‘browser.urlbar.clickSelectsAll’ to ‘true’ by double clicking
    • Tool | Add-ons, search ‘Firebug’, click ‘Add to Firefox…’, etc
  12. Start Pidgin automatically (or Empathy)
  13. Default detailed file lists: Open a file browser, Edit | Preferences, View new folders using -> List View
  14. Default subtitles: Move Player | Edit | Preferences, Text Subtitles | Automatically Load … -> Check

Performance

Startup until login prompt: about 35 seconds (Intrepid: 65 sec; Jaunty: 45 sec)
Login until desktop: about 25 seconds (Intrepid: 30 sec; Jaunty: 25 sec)
Shutdown: about 7 seconds (Intrepid: 15 sec; Jaunty: 15 sec)
Used space after all updates: about 2.2 GiB (df -h) (Intrepid: 2.6 GiB; Jaunty: 2.2 GiB)

Desktop

After some shuffling around, my desktop looks like this:
Asus Eee PC Ubuntu Karmic Koala desktop
Basically the bottom panel has been removed and most of its items have been moved to the top panel.

Function keys

F1 Zzz Works
F2 Wireless Works
F3 Contrast- Works
F4 Contrast+ Works
F5 Externe monitor ?
F6 Task manager ?
F7 Mute Works
F8 Volume- Works
F9 Volume+ Works

Other functions

Suspend on lid close Works
Video/sound Works
Microphone Works
Webcam Works
Bluetooth (Sitecom CN-516) Works

Comments, corrections and additions are as always very welcome!

 Posted by at 12:27  Tagged with:
Aug 282009
 

Recently I published the One-Time Password WordPress plugin to be able to login more safely into my weblog to write my travel stories in internet cafés. I wanted something similar to access my e-mail. I considered using my weblog URL as OpenID, but most e-mail providers support OpenID only as provider, not as consumer (meaning that you cannot login with an OpenID). But suddenly I thought why not access my e-mail directly from my WordPress dashboard using a pre-stored password? This is exactly what the Mini Mail Dashboard Widget plugin offers, with the option to receive SMS messages when new e-mail messages arrive (using the services of VoipBuster or one of its clones).

Install now

Mini Mail Dashboard Widget

 Posted by at 14:47  Tagged with:
Aug 092009
 

For various reasons it is sometimes handy to have short URLs to my posts. After reading this post and some surfing around I selected Cli.gs as short URL service.

I couldn’t find a simple WordPress plugin to create and display Cli.gs short URLs, so I wrote Cli.gs and Tweet. As the name suggests this plugin can send a customizable Twitter message containing the created short URL too. This plugin can also inserts code into the page header for short url auto-discovery.

There is no setup required if you only want to automatically create short URLs when saving posts and display them above your posts. If you want to send Twitter messages, you just have to enter your Twitter user name and password. The appearance can be modified by some settings and/or by modifying a style sheet.

cligs-tweet-screenshot-1

This plugin requires PHP 4.3.0 only.

 Posted by at 18:02  Tagged with: