Saturday, 25 September 2010

Edit a PDF using the Gimp

This is a continuation of my post on running a paperless office.
Only some PDF documents lend themselves to being edited using OpenOffice. Those that can be will be discussed in a later blog. Here we are going to describe how to use the Gimp to edit a PDF document.
On occasion PDF forms received that need to filled out. The typical way to enter these forms is to print them, add the requested information, then finally, scan or facsimile the document back. What I will describe here is a way to update a form electronically so you can then email or fax directly the completed document.
The methods described below were developed over time as part of my initiative to run an paperless office.
Suppose you have a multi-page PDF document to be updated. Each page will be separately edited and the final result stitched together. There are two reasons for this: Firstly this reduces the risk of losing the entire document on a mistake. So, you'll be able to recover up to last completed page. And secondly, The Gimp is memory hungry, so opening a page at a time means a more response machine.
Use The Gimp to open the first page as a layer:
Open as Layers... (CTL+ALT+O)
Increase the Resolution from the default of 100 pixels/inch to at least 300. For best results choose a resolution 100 pixels per inch above your printers default.
Select the first page to edit.
Create a new transparent layer:
New Layer. (Shift+CTL+N)
Use Layer Fill Type with default Transparency. 
Identify the first entry to update, name the layer to reflect this entry. A transparent layer will be added for each new form field. This will allow you to individually place and edit form data.
Select the Text Tool (T). Using the Tool Options dialogue, set the desired font and colour. The font size will need to be adjusted to fit the form text size. Choose a colour so that your form entries standout. On a black form navy blue works well. It has a HTML colour code of 000080. Add the required text. Place the text correctly. Use the Move Tool (M) to reposition the text if needed. Finally Merge Down the text box into the associated named layer:
Layer ► Merge Down
Hint: Ensure the named layer is on the top of the layers stack.
Repeat this process for each form field.
Once the page is complete print the page as a PDF. Include a page number in the name to assist merging of multi-page documents.
Load the next page, and repeat.
At the end of all this you will have a multiple documents representing a single form. So the next step is to stitch them together. For this use Ghostscript. This gives you the power to combine files, convert files, and much more, all from the command line. To combine several input files into one combined PDF using Ghostscript:
gs -sDEVICE=pdfwrite -dSAFER -o combined.pdf first.pdf second.pdf third.pdf […]

Friday, 24 September 2010

After that perfect coffee?

Coffee is a daily requirement!  After much searching, I've been very fortunate in finding a barista who's dedicated to making coffee of consistently high quality.  The team at Little Cupcakes greet me each day with smiles and in very short time, a fantastic coffee.  Here are some recommendations on coffee varieties to make that perfect cup ...
Want more choice suggestions? How about:
Or:
But, where can I get all these delicious beans? Well from here:

 Thank you Laura for some great advice, and even better coffee!

Friday, 17 September 2010

Telstra Tips

Extend Ring Time - Mobile
This explains how to extend the ring time of your mobile before it diverts to the MessageBank service. The default ring time setting is 15 seconds. You can extend this up to 30 seconds.  To change the ring time before calls are diverted to MessageBank, dial the following command on your mobile:
** 61 * 101 ** (Enter number of seconds required)  #
Source: Telstra FAQ
Extend Ring Time - Home
This explains how to extend the ring time of your home line before it diverts to the MessageBank service. You can extend this up to 60 seconds.  To change the ring time before calls are diverted to MessageBank, dial the following command on your home telephone:
** 99 (Enter number of seconds required)  #
For Australia only.

Monday, 13 September 2010

Running a paperless office

Sometime ago I made up my mind to try running a paperless office. While there maybe many environmental justifications for doing so, my reasons were far more practical: laziness. A modern life collects an awful lot of related documentation. Documentation that needs to be saved for a few years, forgotten, then found again during those rare Spring cleans, and finally shredded. There certainly is a need to record information, I just couldn’t see the point of maintaining it in paper form. First, there is the storage required. Then what do you keep? And how long do you keep it for? Computer storage is cheap, very cheap. So that is when I decided to fire-up the scanner. Taking action straight away reveals problems early: OK, now I’ve scanned a document, what do I name it? Where should I file it? How long should I keep it for? Much the same issues that you have with paper. It is just easier. Over the past two years I worked out a system that works, for me ...
What is recorded?
For the most part it is amazing how little ends up needing to be scanned and recorded digitally once you make the decision to go paperless. Many business now offer that information be delivered by email or as a PDF or spreadsheet download. Many others provide information on their websites that can be forwarded in a variety of formats. What is left can be scanned. This has a number of benefits. For Australian taxation purposes, proof of purchase must be retained for a set number of years. But the paper receipts provided by many retailers fade after just a couple of weeks. Scanning ensures that information is legible for as long as your computer screen remains lit. In the early days I was concerned about such things as quality of image resolution, colour or black and white, as PDF, PostScript or as an image? This is now much simpler by focusing on the only important question: is the scanned image legible? Generally PDF’s are chosen so that multi-page documents can be recorded and stitched together by subject, such as proof of purchases for insurance purposes or annual tax receipts. It is amazing how much documentation has accumulated in relation to taxation! Going paperless has meant more can be recorded, not less. Look out for annual reports or summary statements, as more businesses now provide this information online. While they may be doing this to reduce their costs, it is to our advantage as it reduces the need to scan and improves there usefulness to searching of archives. 
How is it organised?
I maintain a bills directory with an archive sub-directory. Any current bills and associated receipts are recorded in the bills directory. When a new bill arrives, both old documents get archived and the new bill is recorded in a calendar reminder system. This works well in conjunction with daily and monthly backups. The archive directory is useful for looking at last months data, and backups retain the rest.
How long should I keep it?
Current and previous months are retained locally in the directories bills and bills/archive. This covers most queries. The accounting system is really the first point of reference. Archives are really there if proof of payment is required. The monthly backups are on a 12 month cycled, and Taxation records are record to archive CD as an accumlative data archive. So little data storage is consumed by this that for the last four years I’ve been practising this fits snuggly onto a CD without compression. So, the move to a DVD archive will be a while away. I prefer not compressing the files, just as it makes retrieval and receovery from data corruption easier.

Saturday, 11 September 2010

My FAQ

I maintain a technical FAQ here.
It is written as an SGML qandaset document and rendered as HTML.

Ubuntu Netbook Remix

10" HP Mini 110-1081TU & 14" Compaq Presario Notebook Installation Guide

Introduction

A netbook is, by definition a mobile device.  You never know when you may lose or have the device stolen. So I recommend that no private information is retained on the machine.  If it must be present, encrypt it.  As you probably have other devices using web-centric email and documentation can overcome many but not all of these issues.  This installation is tailored with these security issues in mind.

Installation

Get Ubuntu Netbook Remix (UNR) from http://www.ubuntu.com/GetUbuntu/download-netbook
Use this guide to create a bootable USB stick.

Post Installation

After installation, the internal microphone and wireless networking probably won't be working, see section in Problems.
For panel customisation see gconf.
For additional software I highly recommend, see Additional Software.
Finally I've added a section on hardware.

gconf

Custom Date Format for Clock Applet

To apply a custom date format for the current user (do not need root access):
  • for time format parameters see http://php.net/strftime 
  • use gconf-editor for the custom_format and format keys in /apps/panel/applets/applet_5/prefs
  • example: wk.%V | %a %d-%b-%Y %H:%M
    will display time as wk.22 | Sun 01-Jun-2008 12:18
  • my default is %a %d %b %Y %H:%M to show Sun 01 Jun 2008 12:18
This can also be achieved using a the gconftool-2 command as your user, not root:
gconftool-2 --set --type string /apps/panel/applets/applet_5/prefs/custom_format "%a %d %b %Y %H:%M"
gconftool-2 --set --type string /apps/panel/applets/applet_5/prefs/format custom
To show key/values pairs in a conf directory, use:
gconftool-2 -R /apps/panel/applets/applet_5/prefs

Reset Shutdown Confirmation

Reset this using the gconf-editor. The key is /apps/indicator-session/suppress_logout_restart_shutdown
If on, it will suppress the confirmation dialog for logout, restart and shutdown action.
Set with the command:
gconftool-2 --set --type bool /apps/indicator-session/suppress_logout_restart_shutdown true

Remove Email notification

Use package manager to remove indicator applets:
apt-get remove evolution evolution-common gwibber indicator-application indicator-me indicator-messages

Order Favourites

Favourites are hidden in the file ~/.gconf/apps/netbook-launcher/favorites/\%gconf.xml
Entries are numbered and relate to further entries in sub-directories.  Still working out how to simplify the ordering of favourites, even alphabetically.  A script here would be really nice.

Additional Software

Skype

Skype is now available from standard Ubuntu Netbook Remix package repositories, so installation is as simple as:
apt-get install skype
For further information see https://help.ubuntu.com/community/Skype

Adobe Flash Plugin

Install from Ubuntu Software Centre or Synaptic. To find use:
aptitude search flash | grep -i adobe

Google Chrome

Chrome is now included in the default Ubuntu packages as chromium.

Installation

From Ubuntu default repositories:
apt-get install chromium-browser
To install using Google repositories:
  • Append Google repositories to /etc/apt/sources.list:
    # Google software repository
    deb http://dl.google.com/linux/deb/ stable non-free main
  • Add package signing key:
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
  • Update repositories:
    apt-get update
  • Finally install Google Chrome from command or install from Synaptic:
    apt-get install google-chrome-beta

Extensions

My suggestions for Chrome extensions are:
  • AdBlock
  • Browser Button for AdBlock
  • FlashBlock
  • Google Dictionary
  • Google Mail Checker Plus
  • Google Reader Notifier
  • Google RSS Subscription Extension

File Encryption - encfs

I recommend putting no private data on the mobile device.  If you do, then encrypt it. encfs is a small, simple encryption of a file system.  Installation is simple with:
apt-get install encfs
To encrypt a source directory to a destination directory then using full paths:
user@host:~$ encfs /home/user/source/ /home/user/destination/
Now anything you place in the destination will be automatically encrypted to the source directory.
Once you are done, unmount using:
user@host: fusermount -u

OpenOffice.org

To install the latest version of Open Office:
add-apt-repository ppa:openoffice-pkgs/ppa
Then call:
apt-get update
apt-get upgrade
Alternatively,
apt-get --fix-missing --list-cleanup update
apt-get -u upgrade
apt-get check
apt-get autoclean
apt-get autoremove

Managing Photographs

The default photograph program is F-Spot which uses Mono. I've had a play with this program and am not at all happy. Particularly as there are better alternatives like, Shotwell
To install this and remove F-Spot run:
apt-get install shotwell
apt-get purge f-spot

Recording CD/DVD

The default CD/DVD recorder is brasero.  I've had problems with this program in the past so have reverted to xfburn.

Playing DVD's

Videos on DVD's can be played using Totem, but Gstreamer libraries need to be added. This site has a good explanation. Essentially it entails installing a few additional packages:
apt-get install gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse
To play all region DVD's there is one more package to install.  Which can be done by installing the package directly:
wget http://www.dtek.chalmers.se/groups/dvd/deb/libdvdcss2_1.2.5-1_i386.deb
sudo dpkg -i libdvdcss2_1.2.5-1_i386.deb
Or, get the latest libdvdread package and running the contained script.

Networking

Tethering to iPhone using USB

I was very impressed with this as you do not need a jail broken iPhone. Tethering your iPhone via USB uses a iPhone Ethernet driver written by Diego GiagioPaul McEnery has set up a PPA repository with the driver and it’s dependencies so there is no longer the need to compile both libiphone and ipheth. The first step is to add the PPA repository to your Synaptic repositories. To do so, open a new Terminal window and execute the following command:
sudo add-apt-repository ppa:pmcenery/ppa
sudo apt-get update
Next, install the driver and dependencies:
sudo apt-get install gvfs ipheth-dkms ipheth-utils
Now plug-in your iPhone via USB, if internet tethering is enabled you should see a new interface pop up and a blue banner on your iPhone along with a dialog on your computer notifying you about a new Ethernet connect.
Note: You may need to re-install these packages if your kernel updates.

Network Time Protocol (NTP)

NTP is used to synchronise the date and time. First, configure your timezone:
dpkg-reconfigure tzdata
Using the menu, select your location, for example Australia / Melbourne.
Next, install required software:
apt-get install ntp
Finally set your NTP time servers.  This can be done manually by adding the entries directly into /etc/ntp.conf
server 0.au.pool.ntp.org
server 1.au.pool.ntp.org
server 2.au.pool.ntp.org
server 3.au.pool.ntp.org
These servers are maintained by NTP Pool Project, http://www.pool.ntp.org/zone/au 
(XFCE) Set using the time-admin command: Applications > Settings > Time and Date.  
(UNR) Set using the time-admin command: System > (Administration) Time and Date.  
Select servers in your locale.
Servers provided by the xx command are:
time.esec.com.au (Australia)
ntp.adelaide.edu.au (South Australia)
ntp.cs.mu.oz.au (Melbourne, Australia)

Problems

Internal Microphone Not Working

To fix problem when the internal microphone is not working, but internal output speakers fine.

Lucid Lynx 10.04 

On upgrading to this release, it appears that Skype now uses Pulse-Audio.
To mange the sound devices install pavucontrol:
apt-get install pavucontrol

Install ALSA

To enable microphone support on Karmic:
  • First determine what kernel are you running: (here, highlighted in red)
# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"
  • Find backports module for your kernel (appended codename 
aptitude search linux-backports-modules-alsa-lucid
  • Add the ALSA package:
apt-get install linux-backports-modules-alsa-lucid-generic
  • Reboot.
Assign user and group rights:
  • To set user rights, go to System>Preferences>Sound and change everything to ALSA
  • Add your user to pulse group, System -> Administration -> Groups & Users.
  • Reboot.
Set the sound levels:
  • Using a Terminal session to setup sound levels, call:
    alsamixer
  • Press Tab once on the keyboard to show microphone
  • Turn Front Mic volume to maximum
  • To exit, press ESC.
Make sure to set all channels to high volume levels in alsamixer except for external amplifier

Getting Sound Card Information

  • To get device summary information:
lspci | grep -i audio
hwinfo --sound
  • To gather lots of sound card information, run these commands:
sudo aptitude install --reinstall hwinfo
hwinfo --sound
aplay -l
cat /dev/sndstat
lspci -nn
lsmod | grep snd
cat /proc/asound/card*/codec* | grep Codec
grep audio /etc/group

Advanced Sound Card Set-up

This used to be a problem, but since I've upgrade to Ubuntu 9.10 karmic-updates, all devices work. I suggest installing ALSA packages.
Try adding this to alsa.conf:
options snd-hda-intel model=[your_card]
A detailed explanation can be found at, https://answers.launchpad.net/ubuntu/+question/64930
If the output of the command:
grep audio /etc/group
looks like this:
audio:x:81
or like this:
audio:x:81:pulse
Then replace that audio line with something like this:
audio:x:81:YOUR_LOGIN
Where YOUR_LOGIN is the user name you use to log into Ubuntu.
Check for correct /etc/modprobe.d/alsa-base.conf options at bottom of this page:
For some initial suggestions:
Try adding the following string to the /etc/modprobe.d/alsa-base.conf file:
options snd-hda-intel model=YOUR_MODEL
Valid model names depending on the codec chip, can be found at ALSA-Configuration
If you do not know your codec chip name, you can execute the following Terminal command to find out:
cat /proc/asound/card*/codec* | grep Codec

No Video in Skype

I'm using machines with built in video and microphones. To see what video devices (if any are loaded):
$ lsmod | grep video
uvcvideo 56990 0
videodev 34361 1 uvcvideo
v4l1_compat 13251 2 uvcvideo,videodev
video 17375 1 i915
output 1871 1 video
I got this working in the end by running:
ldconfig
env LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
It could then see a webcam under /dev/video0 called Webcam-101.
Re-running Skype without ld pre-load seemed to preserve former settings.
Source:  https://help.ubuntu.com/community/Skype
Duplicate Home Directory in "Files and Folders"
If you get duplicate entries in the "Folders" window of the "Files & Folders" menu, then this is because the file
~/.config/user-dirs.dirs
is corrupt. I found the easiest solution was to remove all folder entries in this file and restart the session.

Hardware

Batteries

Due to limited battery life I'm considering getting an extra battery, or upgrading it.
My current battery is a Li - Ion 3 Cell HSTNN-LB0C.
Evidently model HP HSTNN-CB0D is a replacement. 
But I'm still investigating this...

Alternate Installations

There are other light weight Ubuntu derivatives: