GVim problems after upgrading to Ubuntu 11.10 Oneiric Ocelot

After upgrading Ubuntu 11.04 (Natty Narwhal) to 11.10 (Oneiric Ocelot), GVim starts to behave weirdly.

6 May 2012 UPDATE: Issue persists even after upgrading to 12.04 (Precise Pangolin)! 🙁


  1. It sometimes freezes during startup, rendering the window greyish. If you wait, it may or may not regain control.
  2. When it doesn’t freeze during startup, typing response becomes very slow. For example, when you hit ‘j’ to move the cursor down 1 line, it takes ~7s before the action takes place. Key response then returns to normal if GVim is editing an empty file.
  3. When GVim loads a large file, typing response becomes very slow all the time.
  4. Sometimes you may see this error in the Terminal window you used to run gvim:
    ** (gvim:5933): IBUS-WARNING **: Create input context failed: Timeout was reached.
  5. Other times you may see this instead:
    ** (gvim:5760): WARNING **: Unable to register window with path '/com/canonical/menu/5C00024': Timeout was reached


Run gvim -f instead of just gvim.

Put this in your .bashrc if you don’t want to add -f all the time, or if you already have other aliases using gvim and you don’t want to change all of them:

gvim(){ setsid /usr/bin/gvim -f "$@"; }

How to reduce size of VirtualBox VDI file


VirtualBox version = 4.0.12
Guest OS = Win 7
Host OS = Linux Mint 9 Isadora (based on Ubuntu)

Perform these tasks on all the Win 7 local hard-disks:

  1. chkdsk /F
  2. defrag /X
  3. sdelete -z

Shutdown the Win 7 VM, then run this command on Mint:
[shell]$ VBoxManage modifyhd /home/user/.VirtualBox/HardDisks/win7.vdi –compact[/shell]

That freed up 5GB of space for me, a 20% reduction.

Fix outdated/corrupted EPEL repo metadata

yum update failed in RHEL (Red Hat Enterprise Linux) server 5.5 with EPEL repo added:

[root@server ~]# yum update
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package cups.x86_64 1:1.3.7-18.el5_5.8 set to be updated
---> Package cups-libs.i386 1:1.3.7-18.el5_5.8 set to be updated
---> Package cups-libs.x86_64 1:1.3.7-18.el5_5.8 set to be updated
---> Package pam.i386 0: set to be updated
---> Package pam.x86_64 0: set to be updated
---> Package pam-devel.i386 0: set to be updated
---> Package pam-devel.x86_64 0: set to be updated
---> Package yum.noarch 0:3.2.22-26.el5_5.1 set to be updated
http://mirror01.idc.hinet.net/EPEL/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yandex.ru/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.kddilabs.jp/Linux/packages/fedora/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://sulawesi.idrepo.or.id/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure: repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest

Fixed with:

yum clean metadata
yum clean dbcache
yum update

Why is Drupal “Contact Form” not sending any email?

PROBLEM : My “Contact Form” in Drupal (v6.14) was not delivering any email to my mailbox. No error was indicated in Drupal logs.

SOLUTION : Turned out my web hosting company had to move my domain name record from /etc/localdomains to /etc/remotedomains.

Here’s a php script to test the sending of email:

$to = "name@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a test message.";
$from = "<name>@<your domain>";
$headers = "From: $from";
echo "Mail Sent.";