Monthly Archives: May 2008

How to wget in a different language

Some websites are smart and depending on your location they make assumption on the interface language. For example I’m in Japan and so when I go to google for the first time the page will be in Japanese.

The same thing happens with this command:

wget http://www.timeanddate.com/calendar/index.html?year=2008&country=26 -O calendar.html

The output will be in Japanese, which is really wonderful and all, but…

To tell the website that I want the English interface:

wget –header=’Accept-Language: en-us’ http://www.timeanddate.com/calendar/index.html?year=2008&country=26 -O calendar.html

Installing VMware Server 1.0.x in hardy

Of course you need the usual requirements:

  • linux-headers-FLAVOR where FLAVOR is for example generic, server, etc. Instead of flavor it can be the exact kernel version (uname -r).
  • gcc and g++ and inetd or xinetd
  • On 64-bit platforms ia32-libs too, as this version of VMware is a 32-bit app.

With the above and the vmware server tarball you usually would be able to build the vmware modules. Unfortunately that’s not always the case given that you are on an unsupported platform etc etc etc. To make it work there is a vmware-any-any-update tarball developed by a Czech dude called Petr. His FTP site is here:
http://platan.vc.cvut.cz/ftp/pub/vmware/

There is a runme.pl script inside that you are supposed to run as the super-user… Scary stuff. But it worked for a lot of people, including me.

Oh and one more thing. Even though vmware-config.pl completed successfully, vmware still didn’t run due to the following library issue:

/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)

I made a backup of usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 and replaced with /lib/libgcc_s.so.1

Installing bzr-svn in gutsy

I already added the gutsy repository for bzr, but since the latest version of bzr-svn lives only in gutsy-backports for now, I had to add that as well, so I had these extra lines in /etc/apt/sources.list for these two packages:

deb http://jp.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse

# extra repos
deb http://ppa.launchpad.net/bzr/ubuntu gutsy main
deb-src http://ppa.launchpad.net/bzr/ubuntu gutsy main

Unfortunately, there is a conflict between the latest versions, namely, bzr-svn depends on an older version of bzr, causing a simple apt-get install bzr-svn to fail.

The solution:

sudo apt-get install bzr=1.3.1~rc1-0ubuntu1~gutsy1 bzr-svn

FYI, the dependency requirement of bzr-svn:

apt-cache show bzr-svn | grep ^Depends

…and the available versions of bzr:

apt-cache show bzr | grep ^Version

How to do grep in windows

findstr in windows works similarly to grep in unix. For example you can do this:

netstat -a | findstr 8000

Another command find is also similar, with slightly different syntax and powers. I don’t remember which is which, but with one of them you can use regular expressions.

VMware Server NAT nameserver

Occasionally VMs configured with NAT interface in VMware server lose connectivity to the name server. The fix is to restart the “VMware NAT Service”, after that DNS requests are forwarded correctly to the nameserver.