September 09th, 200909:57 am
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.
I just read somewhere that when writing LaTeX documents it’s useful to have each sentence on a new line. My current document only has (double) line breaks between paragraphs. Here is how to use Vim to insert line breaks after each full stop.
In command mode press ‘:’ then enter s/\.\s\+/\.^M/. The ^M character represents a line break and must be inserted with CTRL-V Enter. Press enter to run the substitution on the current line. Add a percent character to run the substitution on the whole file: %s/\.\s\+/\.^M/.
Some more useful commands in a SunWorld article from 1997.
I use the Dvorak keyboard layout but ran into some problems after upgrading to Ubuntu Jaunty. After logging in to X I got an error popup saying
Error activating XKB configuration.
It can happen under various circumstances:
- a bug in libxklavier library
- a bug in X server (xkbcomp, xmodmap utilities)
- X server with incompatible libxkbfile implementation
X server version data:
The X.Org Foundation
70000000
If you report this situation as a bug, please include:
- The result of xprop -root | grep XKB
- The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
Read more…
The Typo3 backend doesn’t work properly in Firefox3. The left most column with the highest level options (Page, View, List, Extensions, Configuration…) disappears if you click on Page for instance. Then clicking on items of the Page hierarchy doesn’t do anything.
The solution is to install an extension called Firefox3 Backend Bugfix. I downloaded the T3X file, then went to Extension Manager in the backend, Import Extensions from the top drop down menu, Upload Extension, then go to Install Extensions from the drop down menu and click the grey ‘+’ icon next to the new extension.
I’d backed up some files from a friend’s MacBook harddrive (onto an NTFS partition mounted in Ubuntu Linux). He then provided me with an external harddrive to copy them back onto. This wouldn’t work because many of the filenames weren’t supported by the FAT32 partition of the external HDD. This is the solution I chose.
Use gparted to resize the FAT32 partition on the external drive to a few hundred megabytes so I keep the software that was on there (probably not very useful).
Create a new partition in the free space, still using gparted. This partition will need to be reformatted with MacOSX so it doesn’t matter what format you create. I first created an HFS+ partition with gparted but it wasn’t recognised by MacOSX and although Ubuntu could mount it it wasn’t automagically mounted as external drives usually are.
This is solved by reformatting the partition as an unjournaled MacOS partition with MacOS via Applications -> Utilities -> Disk Utility.
Then both partitions (the resized FAT32 and the new unjournaled HFS+) should be mounted automatically in MacOSX and Linux systems. It is important for the filesystem to be unjournaled or Linux will mount it read-only.
To read MacOS partitions with Ubuntu you will need to install packages hfsplus, hfsprogs and hfsutils (maybe they are not all necessary).
This error appeared after updating squirrelmail on a debian server.
Fatal error: Call to undefined function sq_change_text_domain() in /usr/share/squirrelmail/plugins/multilogin/functions.php on line 201
It’s due to the multilogin plugin which lets users choose between multiple mail servers and the compatibility plugin which is required by multilogin. Both these plugins are still installed after the update but the patches included in their respective folders need to be applied again as explained in their INSTALL files. Make sure you install the correct version of the patch. The 1.4.9 patch worked for me on the 1.4.15 update. Apply as follows:
cd /usr/share/squirrelmail/plugins/multilogin
patch -p0 < patches/multilogin-squirrelmail-1.4.9.diff
cd /usr/share/squirrelmail/plugins/compatibility
patch -p0 < patches/compatibility_patch-1.4.9.diff
Ubuntu 9.04 Jaunty has a new version of the proprietary fglrx driver for ATI cards. This driver no longer supports my Macbook Pro 2,2 Radeon Mobility X1600. If you run aticonfig --initial you’ll get No supported adapters detected. Other symptoms may be that when you reboot, Xorg won’t start or it will complain about graphics drivers and try to run in low graphics mode.
It seems you can’t downgrade fglrx without also downgrading Xorg. Travis Whitton explains how to downgrade xorg packages from intrepid to hardy. To downgrade from jaunty to intrepid it’s very similar. Edit /etc/apt/sources.list and add the lines
deb http://gb.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ intrepid main restricted multiverse
Then aptitude update and apt-get --reinstall install xorg/intrepid xserver-xorg/intrepid .... There are a bunch of dependencies which will be requested and you may need to add to the end of that command. A load of unnecessary nvidia drivers were installed as dependencies.
My touchpad wasn’t working until I ran apt-get --reinstall install xserver-xorg-input-synaptics/intrepid.
To downgrade the fglrx drivers run apt-get --reinstall install fglrx-amdcccle/intrepid-updates fglrx-kernel-source/intrepid-updates fglrx-modaliases/intrepid-updates xorg-driver-fglrx/intrepid-updates xorg-driver-fglrx-dev/intrepid-updates.
To see what versions of a package are available use something like apt-cache policy xserver-xorg. This is useful to check that you’ve added the right lines in /etc/apt/sources.list.
Apparently these packages can be locked so they won’t be automatically upgraded by running aptitude hold packagename but when I tried this aptitude wanted to install a lot more things. It should also be possible to do this in the Synaptic graphical package manager.
I couldn’t initially make any of these changes because I couldn’t get a prompt. Recovery mode asks for the root password but since it’s not set by default in Ubuntu I was stuck. Solution: in the grub menu press ‘e’ to edit one of the entries and on the kernel line add rw init=/bin/bash at the end. Then press ‘b’ to boot. You’ll end up with a root prompt where you can run passwd to set the root password. Then you can reboot into recovery mode and ask for a root shell with network enabled. Networking didn’t work for me so I had to run ifconfig eth0 up and dhclient eth0.
After all this I can now log into Gnome but Xorg is using 100% of the CPU, fans are spinning very fast and I get the message
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed! *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO) *
(WW) fglrx(0): * no 3D acceleration available *
(WW) fglrx(0): ********************************************* *
in /var/log/Xorg.0.log. I’ve tried installing previous versions of the linux-image, linux-hea,ders and linux-source, and reinstalling fglrx-kernel-source so it gets compiled with the right kernel but to no avail.
I’ve ended up updating everything to the latest versions and using the radeonhd driver. I don’t know how to tell Xorg which driver to use now that /etc/X11/xorg.conf is all empty so I uninstalled fglrx. radeonhd works but feels a bit slow even when web browsing or typing. On the other hand it seems that I can now use RandR with external displays, something that wasn’t supported by fglrx.
December 20th, 200810:45 pm
Some computers come with Norton Antivirus and Internet Security preinstalled but with no uninstall link in the start menu and no entry in the add/remove software list. Symantec provide a removal tool that will cleanly uninstall their software.
December 18th, 200808:01 pm
Fedora Core uses LVM for its partitions. This makes them difficult to mount on other systems. Linux Step-by-step explains how to achieve this on Ubuntu. I haven’t tried this with a live CD, it might not work because it requires the lvm2 package.
December 09th, 200810:47 am
Lejos lets you run Java on Lego Mindstorm robots. Lejos 3 RC2 for the RCX bricks can run fine on Linux but initially gave the following error:
Unable to load native libraries: /usr/local/lejos/bin/libjirtrcx.so: libirtrcx.so: cannot open shared object file: No such file or directory.
Adding the following lines to your .profile should help, I don’t think the LD_LIBRARY_PATH was mentioned in the documentation.
export LEJOS_HOME=/usr/local/lejos
export PATH=$PATH:$LEJOS_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LEJOS_HOME/bin
export RCXTTY=/dev/usb/legousbtower0
You may also need to chmod 666 /dev/usb/legousbtower0 or add some udev rules to ensure your user has write access to the infrared tower.