You are currently browsing the archives for the Misc category.

Backend menus broken in Typo3

Problem: I login to the Typo3 backend at https://myserver/typo3 and get redirected to https://myserver/typo3/alt_main.php. I see the navigation bar or the left with items such as Page, View, List and Admin Tools. The main part of the page, on the right, displays the Typo3 backend welcome page. When I click on any item under Web or File in the left menu nothing happens. It should display the appropriate information in the main frame.

Solution: A bit of a hack really. Change the URL to https://myserver/typo3/backend.php. You will still see the backend interface but the links will work correctly.

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.

Typo3 and Firefox3 incompatibilities

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.

Matlab “Locking assertion failure.”

Running Matlab R2008a on Linux I got a bunch of error messages in the console.

Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb55257c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb5525891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0xb57ef494]
#3 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec302be]
#4 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0eed7]
#5 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0f188]
#6 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0xaec0f48f]
#7 [0xafb5c68e]

The solution is to run export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/ before running Matlab. A permanent solution is to add that line to /etc/profile.

See MatlabCentral for more details.

Converting PDF to PNG

OpenOffice doesn’t currently let me include PDFs. The following command uses ghostscript to convert the first page of a PDF to a PNG image with a resolution of 300dpi.

gs -q -sDEVICE=png16m -dBATCH -dNOPAUSE -dFirstPage=1 -dLastPage=1 -r300 -sOutputFile=output.png input.pdf

Thanks to a post by gosha bine.

Here we go.

Finally I’ve set up a place to jot down some of the things that I want to remember. I imagine this will mostly be solutions to computer related problems that seemed tricky to solve at the time. Maybe some items will be useful to others as well.