Archive

Archive for May, 2010

Piping text to the clipboard in Vista and Windows 7

May 31st, 2010 niels No comments

Microsoft added a new command line tool to Vista and Windows 7: clip.exe. This nifty little utility allows user to copy program output to the clipboard on the windows command line. Its usage is pretty straightforward:

dir | clip – copies the output of the dir command to the clipboard
clip < example.txt – copy the contents of the file example.txt to the clipboard

Fighting Windows Sockets Legacy Troubles

May 14th, 2010 niels No comments

I came across a really annoying problem while using win32 sockets one of my bigger projects. In short, the VisualC compiler complained about redefinitions of basic Windows socket macros:

C:\sdk\windows\v6.0a\include\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
C:\sdk\windows\v6.0a\include\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(479) : see previous definition of 'AF_MAX'
C:\sdk\windows\v6.0a\include\ws2def.h(163) : warning C4005: 'SO_DONTLINGER' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
C:\sdk\windows\v6.0a\include\ws2def.h(206) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\sdk\windows\v6.0a\include\winsock.h(485) : see declaration of 'sockaddr'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing '}' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing ';' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2059: syntax error : 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(437) : error C2143: syntax error : missing ';' before '}
(...)

Read more…

Entering Foreign Characters in Firefox

May 4th, 2010 niels No comments

When dealing with foreign names, it is a matter of both correctness and courtesy to use the right spelling. But quite often it is also a problem of “how do I enter this darn character”.

Luckily, there is abcTajpu, a Firefox extension that allows you to select foreign characters, umlauts, … quite easily.

Free, no ads – really worth a try :)

Tags: ,

Synchronizing Google Contacts and Google Calendar in KDE 4

May 2nd, 2010 niels No comments

The support for Google Contacts and Google Calendar in KDE 4.4 is pretty good. All you need is libgcal (sudo apt-get install libgcal0 in Kubuntu). This library provides Akonadi access to your Google account. Once it is installed you just have to configure it in Akonadi, and then you can access your Google contacts and calendar in KMail, KAddressBook, Kontact and Korganizer.

Unfortunately there is no sync option for Akregator and Google Reader yet.

Tags: ,

How to install Ubuntu 10.04 on a Netbook with Full Disk Encryption

May 2nd, 2010 niels No comments

Installing Ubuntu on a netbook is trivial. Installing Ubuntu/Kubuntu with full disk encryption is absolutely easy. Unfortunately, installing it on a netbook with full disk encryption is not (at least not without a CD-ROM drive).

First of all, the desktop Ubuntu and Kubuntu install images don’t support full disk encryption. So get the Alternate ISO from here (Kubuntu users this way, please). Then create a bootable USB drive using UNetbootin.

Ready? Then boot your netbook from the USB drive, and proceed with the installation using this guide. You will be able to select your country, keyboard and configure your network. Then the installation will fail, because the installer won’t find a CD-ROM drive. Yuck.

Okay, if there is no CD-ROM drive we just have to mount the installer ISO. For this we copy the alternate installer ISO to a second USB stick, plug it into the netbook and give the system a few seconds to recognize it. Then we use alt+F2 to switch to a command line and hit so we can enter commands. First, we should make sure that both USB drives are there:

ls -la /dev/sd*

should return something like this:

/dev/sda
/dev/sda1
/dev/sda2
/dev/sdb
/dev/sdc

/dev/sda is your hard disk, /dev/sdb is the USB drive you booted from, and /dev/sdc is the second USB drive containing the installer ISO file (unless you have a second hard drive). Now you can mount the second USB drive to /mnt and the ISO image to /cdrom:

mount -t vfat /dev/sdc /mnt
mount /mnt/ubuntu-10.04-alternate-i386.iso /cdrom/
exit

Next, hit alt+f1 to return to the install menu and select “Detect CD-ROM”. The installation will proceed as described in the blog post above.

Have fun with Ubuntu 10.04! :)