You are currently browsing the Carl's notes weblog archives for September, 2009.

Selecting PDF version for LaTeX documents

Uploading a recent paper to EDAS for an IEEE conference gave the warning The PDF file uses PDF version 1.4, however only 1.5, 1.6, 1.7 is allowed.

Add the line \pdfminorversion=5 at the top of the latex document and recompile. Minor versions up to 9 seem to work.

VPN in Ubuntu

Finally managed to re-connect to the Lancaster University VPN. It used to work, then didn’t, now works again. Maybe due to some combination of regression and bug fixes in Ubuntu, and my tinkering with the options. One Ubuntu forums post in particular was helpful.

Install the network-manager-pptp package to enable VPN connections in the network manager GUI.
Right now I’ve only set the gateway and user name on the VPN tab. Don’t set the password, there is a bug related to this. In the advanced options uncheck PAP and EAP authentication, check CHAP, MSCHAP and MSCHAPv2. Check MPPE and allow stateful encryption. Uncheck all the compression options. Check ‘send PPP echo packets’.
Under the IPv4 Settings tab set the method to Automatic (VPN). Uncheck everything in Routes and delete all routes.

After applying these settings restart the network manager with sudo /etc/init.d/NetworkManager restart.

I’m sure the routes can be modified without breaking the connection but I’m not sure about the rest. This works for me as of today.

EeePC out of disk space

More trouble with the EeePC 901. Applying the recommended updates will rapidly fill all the available disk space. Removing packages doesn’t help because the underlying partition is read only and something called unionfs or aufs ensures that all user changes are only applied to a very small partition mounted on top of the read only partition.

A post at the Eee User wiki explains how to make the main system partition read-write and how to merge both system partitions. Unfortunately an EeePC 901 will break if you run the fsck command as explained in that post. And there doesn’t seem to be a way to recover without completely reinstalling the system from DVD/USB stick. In other words it also breaks the recovery partition so pressing F9 at startup and doing a system restore won’t help. The error message is /init: /init: 65 cannot open /mnt/dev/console: No such file.

I’ve decided to install Ubuntu Netbook Remix from a USB stick. I’ll repartition the system disk during the installation and hope that this will solve all my problems including lack of space, no support for WPA Enterprise, out of date packages and unused packages.

[Later...] Ubuntu Netbook Remix works very well. I’m running it on the full 4GB disk. Only 671MB left but that’s after installing my C, Python and Java programming environments and I still have the option to really remove the extra software such as games that Ubuntu installs by default.

EeePC BIOS update

Trouble updating the BIOS on my EeePC 901 because the /usr/sbin/biosupdate.pl script wouldn’t use the proxy settings. There’s a way to use a USB stick. I think you download the zip archive from Asus, unzip it and copy the image to a USB stick formatted with FAT16, the image must be named 901.rom.

But you can do it without a USB stick. The biosupdate.pl script just copies the image file to a special partition and changes a proc file. Run the following as root. Best to run line by line. For me the image was called 1703.ROM and the partcode was 901.

cd /tmp
mkdir mnt
chmod 0755 mnt
mount -L BIOS mnt
rom=`find -name \*.[Rr][Oo][Mm] | head -n1`
partcode=`/usr/sbin/dmidecode -s baseboard-product-name`
cp $rom mnt/$partcode.rom
umount mnt
echo 0x030c > /proc/acpi/asus/hdps

When you reboot the EeePC will update itself, play a few notes and reboot. Make sure it’s connected to the mains.

The full script is available on the Eee User forums if you’ve overwritten yours.

Removing a website from Google

Google keeps pages in its database for a long time after they have been removed, at least several months, and there is usually a cached version of the page somewhere. This is a problem when a blog page or photo gallery gets spammed and genuine searches return unpleasant results, particularly when they appear in the university search results.

Google explains how to remove pages from its database. I used the following solution to remove all the pages of an obsolete photo gallery.

Returning a 404 Page Not Found is not enough to remove an entire folder. In fact you don’t have to remove the pages at all.

But you do need to make sure search motors are aware that these pages shouldn’t be indexed by creating an appropriate robots.txt file at the root of your domain. Mine contains
User-agent: *
Disallow:/~carl/gallery/

Unfortunately you need an account so you can log in to the Webmaster Tools.

Then you need to add your site and confirm that you control it by adding a file with a special name to the root directory or adding a particular string to the main page meta data.

Ask Google to remove the directory or file by going to Site Configuration, Crawler Access, Remove URL.

Within a few days the pages should no longer appear in search results and the robots.txt file will prevent them from ever reappearing.