Thursday, 9 February 2012
Selecting a text region on Android 2.3+
Touch and hold the screen until the popup menu appears. Choose Select Word or Select All. Which one you use depends on how much you want to include or exclude. You will get two "paddles" surrounding the selection. Drag them to surround the region you want, then hit backspace to delete, or tap the screen to copy to clipboard. Depending on the app, there might be other options accessible from the menu to check the text in dictionary, etc.
This is actually explained in detail in this Android guide. I wish I had found that guide when I was first looking.
Hope this helps.
Friday, 2 September 2011
Importing a whole bunch of MH mail files into dovecot
from/alice/1
from/alice/2
from/bob/1
from/carol/1
I wanted to import the alice mail into the logical dovecot mail folder Archives/from/alice and similarly for the others. (Archives is a Thunderbird standard.) In my dovecot setup however, the corresponding maildir directory is ~/Mail/.Archives.from.alice
First I shut down Thunderbird so that it wouldn't interfere during the second step later. This script does the job (backslash continuation inserted for clarity):
for d in from/*
do
for f in $d/[0-9]*
do
/usr/lib/dovecot/deliver -s -m \
Archives.${d/\//.} -p $f
done
done
See the documentation of deliver for the meanings of the -s -m and -p options.
You can track the progress of the import by following the syslog file for mail. Any failed imports go into INBOX.
This second step is not required, but I am obsessive. I wanted each imported file to have the same timestamp as the old one. This script uses findup from the fslint toolkit to collect the duplicates (backslash continuation inserted for clarity):
/usr/local/src/fslint-2.42/fslint/findup \
from ~/Mail/.Archives.*.* > /tmp/dups
This generates pairs of duplicates in /tmp/dups separated by a blank line. This script then applies the old timestamp to each new file.
while read a
do
read b
touch -r $a $b
read c
done < /tmp/dups
I still have to figure out how to mark all the old mail read from the CLI. I just went into Thunderbird and marked each folder read. If you have a good solution, please do comment.
Monday, 2 May 2011
Truth is stranger than fiction, or, The Internet rocks
Well it did power up for me on my bench and I proceeded to update the software and clean the disk. Then the bug struck: pressing the power button would only cause the LEDs to flash rapidly for a few seconds and the machine would sink into inactivity again.
A dead clock battery can cause this because the CPU has no source of timer events for the BIOS code. Fortunately in this model, the clock cells are very accessible. I measured the three of them and their voltage was well above the 7.2V required. So that wasn't the problem.
So I did a search on the Internet and found this page on FixYa. The top solution was to depress F7 and F8 while booting. I was skeptical but it was simple to try. Lo and behold, the machine fired up. Apparently this model experiences a lot of contact problems with the BIOS chip which is just underneath F7 and F8.
The owner told me that a repair shop had assured him that the machine was beyond repair. Maybe they need to be told about this thing called the Internet.
Saturday, 23 April 2011
How to access CIFS shares from a user account on Ubuntu Lucid
I did a search and found tips involving setting up fstab. This was not satisfactory because the machine was a notebook and the server would not be accessible while on the road. Tips involving autofs and automount were also not satisfactory because of the complicated setup.
I figured that since the file browser could see the share, it must be mounted somewhere. The output of mount showed that it was mounted on $HOME/.gvfs. The problem is that theThunderbird file selector does not display dotfiles. Other programs may have a similar restriction. My solution was this:
ln -s .gvfs GVFS
I then instructed him to look for his share under GVFS. Actually Thunderbird can navigate to dotfiles, you have to click on the Type a file name icon at the top left and type in .gvfs, but I figured that this was much easier for the user.
If you make a bookmark in the file browser and also tell it to remember the credentials for the connection, it should be one-click to mount. I think this should work for the other types of mounts that the file browser can do, e.g. FTP.
Saturday, 19 February 2011
Sunday, 17 October 2010
Retarded industrial designer
Do designers believe that these cells (CR2016 or CR2032) never die? This is not the first laptop I encountered that had a difficult to access RTC cell. I feel it's a conspiracy to create work for computer technicians.
If you are unlucky to have the same symptoms (computer will not remember time), search on the Internet for the NC6000 service manual which has disassembly instructions. The cell I removed had solder tags. I simply peeled off the tags and sticky taped them on a new cell. Hopefully it will last until the laptop becomes obsolescent.
Thursday, 14 October 2010
A look at Lubuntu 10.10
This review is far in the past so out of date as Lubuntu has advanced a lot, but I'm leaving it here for posterity.
I'm always interested in lightweight distros for older machines. A while back I looked at Lubuntu 10.04. Lubuntu 10.10 came out recently so I decided to see if the issues I mentioned were fixed.
I burnt the image to a CD-RW and booted an old Celeron 400MHz with 256MB RAM with it.
On the standard Ubuntu splash screen I see there is now an option to install right away, so I picked that. However the machine then churned away for many minutes. Finally I got a desktop with an Install icon. Silly me, I thought that if I picked Install to Disk it would not waste time setting up a desktop but go straight into the installer like Ubuntu does.
I clicked on the Install icon and after a long wait with more CD reading it said that Ubiquity had crashed. I must have clicked several times in succession because one of the attempts did bring up the first stage of the install dialog, but that didn't last long and crashed too.
Ok, maybe I should try it in a VirtualBox VM. Again, assign the same amount of RAM, 256MB, to the VM.
The first try I used the host CD drive. It eventually brought up the desktop with the Install icon, but the desktop was unresponsive, showing a wristwatch wait icon. I noticed that it was doing a lot of probing on the USB port. Why?
The second try I copied the ISO image to the disk and booted from that. This one also brought up the desktop and then Ubiquity crashed again. Again there was a lot of activity on the USB port. What was it doing?
At this point, I decided that this was all a waste of time. Sorry, I cannot recommend Lubuntu 10.10. if anything it's a regression from 10.04. Maybe I don't have enough RAM, but other LXDE distros installed fine with that much RAM. If you want a LXDE desktop, I recommend Mint 9 LXDE or Debian 5 LXDE both of which installed fully on that Celeron.
