Virtualbox clipboard workaround

With Virtualbox OSE 1.5.2, host Kubuntu 7.10 and guest Win XP I have intermittent clipboard problems: Garbled text, often even from one Linux app to another.

I tried upgrading to VirtualBox 1.5.4 non-free but had network problems with it.

Finally I came up with the following workaround. The idea is to write/read the clipboard using a temporary shared file. Prerequisites:

  • Install xclip in Kubuntu.
  • Put the cat, pclip and gclip commands in the PATH of the Windows system.
  • Set up a Samba share that both guest and host can read and write to.

In my setup the share is /share in the guest and mounted as network drive S: in the guest. The temporary file will be in /share/clipboard/.

Create an application shortcut in Kubuntu with the Application command

xclip -o > /share/clipboard/clip.txt

and drag it on the taskbar so that you can execute it with one click. To avoid annoying startup notifications disable them in the “Advanced Options” in the “Application” tab of the shortcut. Now you should be able to copy the content of the X clipboard to the temporary file with one click.

In the guest system (Windows) you do the same thing in reverse but with a keyboard shortcut: Put a file clip-in.bat into a safe location (where you won’t accidentally delete it) with the following one line of code:

cat S:\clipboard\clip.txt | gclip

Create a desktop shortcut pointing to clip-in.bat and define a keybard shortcut for it (under right-click, Properties..), e.g. ALT-CTRL-C.

Now you should be able to mark and paste from the host to the guest system in the following way:

  • Mark some text in the host (Kubuntu) system
  • Click the shortcut in the KDE taskbar
  • In the host system press CTR-ALT-C and then CTRL-V (to paste)

The return of the console mailer: ALPINE

ALPINE start screenMany students had to use it at the university in the early years of the Internet: PINE, the text mode mail client. I was one of those students and I actually liked it and configured it to the maximum.

Somehow I later switched to Mozilla Thunderbird and haven’t used a text mode mailer since. But this week I discovered “ALPINE”. It is sort of “PINE reloaded”, as Open Source under the Apache License (think Apache License PINE).

I set it up for Gmail with IMAP (thanks to the author of this blog entry):

  1. Start ALPINE and type S L A (Setup > collectionLists > Add)
  2. Enter something like the following but replacing “id” with your gmail name:
  3. Nickname : Gmail
    Server : imap.gmail.com/ssl/user=id@gmail.com
    Path :
    View :

  4. Press CTRL-X and then E to save the setting.
  5. Type S C (Setup > Configuration) and set up SMTP to use the gmail server:
  6. SMTP Server = smtp.gmail.com:587/tls/user=id@gmail.com

I noticed that I had to install the package “ca-certificates” on my Kubuntu system. Otherwise I got a certificate error.