T e c h n o t e s

Dowload Picasa Web Album

Here's a nice little script to download all images in full size from a Google Picasa web album.

#sudo apt-get install wget libxml-xpath-perl gawk

if [ -z "$2" ]; then
    echo "Usage: $0 <user> <album> [authKey]"
    exit 1

if [ "$3" ]; then
set -e

wget $params -O - "https://picasaweb.google.com/data/feed/api/user/$1/album/$2?imgmax=d&$authkey" \
    | xpath -q -e "//media:content/@url" \
    | awk -F \" '{print $2 }' \
    | while read i; do wget $params "$i"; done
Created February 20th 2012

Debian Post Install

Login as root:
apt-get install sudo emacs
export EDITOR=emacs
Add your login name. Logout and relogin using your user credentials.
sudo apt-get install openssh-server
sudo emacs -nw /etc/ssh/sshd_config 
Deny root login over ssh:
PermitRootLogin no
sudo /etc/init.d/ssh restart
Created December 6th 2011

Adobe Flash hardware decoding in Ubuntu

Create /etc/adobe/mms.cfg and put this in it:
This bit of information was brought to you by gradinaruvasile at [ubuntuforums.org]. Works up to Adobe flash plugin version Tested on ASUS AT5IONT-I.
Created August 10th 2011
Modified December 6th 2011

Volume control shortcuts for Xfce4 and ALSA

ALSA sound mixer can be controlled using the amixer program. This example is for the softvol configuration shown in the note below. Xfce shortcuts are managed using the xfce4-keyboard-settings program's Applications Shortcuts tab. Click +Add close to the bottom of the window, then copy the following to the command text field:
amixer -q -c 1 set 'Master',0 5+
This command increases master volume defined in /etc/asound.conf. Next, the key combination for the increase volume action is input. I chose to use CTRL+SHIFT+<arrow-up/arrow-down> for the volume controls. The command for the volume down action is
amixer -q -c 1 set 'Master',0 5-
The key combinations become active immediately and can be tested right away. If the volume is changing in too small or large steps, change the number 5 in the above command into a larger or smaller number.
Created April 16th 2011

ALSA configuration for external USB audio device

This is the configuration I created for my M Audio USB AudioSport Duo external audio device after giving up on Pulseaudio on Ubuntu 10.04.2 LTS. Now I just need to figure out how to neatly control the volume from the desktop... Tweet
koti@silli:~$ cat /etc/asound.conf

# Take over the default output and connect it to "softvol"

pcm.!default {
     type plug
     slave.pcm "softvol"

# Enable software volume control and connect to "dmixer"

pcm.softvol {
    type            softvol
    slave.pcm       "dmixer"
    control.name    "Master"
    control.card    1

# Configure dmix to enable concurrent access to the device

pcm.dmixer  {
    type dmix
    ipc_key 1024
    ipc_key_add_uid false
    ipc_perm 0666
    slave {
  pcm "hw:1,0"
      period_time 0
  period_size 1024
      buffer_size 4096
  rate 44100
  bindings {
   0 0
     1 1

ctl.dmixer {
   type hw
   card 1
Created April 6th 2011

How to really get serial mouse working on Linux

Install inputattach and add

ia1:2345:respawn:/usr/bin/inputattach --microsoft /dev/ttyS0

to /etc/inittab. On Debian the inputattach binary can be found on the joystick package. On Ubuntu the package is simply called inputattach.

Created Jun 10th 2010

Notes on moving to Cocoon 2.2

Get Cocoon 2.2 source code from the Cocoon SVN repository and compile it. Then follow the instructions from Hugh Sparks' Cocoon 2.2 Without Tears.

File upload configuration is now done in a properties file located in WEB-INF/cocoon/properties. I appended the following to core.properties:


Names of the other properties can be found in MultipartConfigurationHelper.java.

Created Oct 2nd 2009

Ubuntu 9.04 Jaunty serial mouse problem

Upgrading Ubuntu to 9.04 broke my serial mouse. This seems to have something to do with Ubuntu X11 now using hal. A fix for the problem has been documented at serial mouse problem after upgrading to ubuntu 9.04 by knoid. Don't bother with the other messages in that thread. Just create a text file named '10-mouse.fdi' in /etc/hal/fdi/policy/ and put the following in it:

<?xml version='1.0' encoding='UTF-8'?>
<deviceinfo version='0.2'>
    <match key='info.capabilities' contains='input.mouse'>
      <merge key='input.x11_driver' type='string'>mouse</merge>
      <merge key="input.x11_options.Device" type="string">/dev/ttyS0</merge>
      <merge key="input.x11_options.Protocol" type="string">ThinkingMouse</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
      <merge key="input.x11_options.CorePointer" type="string">On</merge>
      <merge key="input.x11_options.Buttons" type="string">4</merge>
      <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4</merge>
Created May 27th 2009