Monthly Archive for November, 2007

Install phpPgAdmin on Ubuntu 7.10

Update: These instructions have been tested and work fine in the latest version of Ubuntu (8.04, Hardy Heron).

phpPgAdmin is a web based GUI for administrating a PostgreSQL database server.

Here’s some quick notes on getting it installed easily on Ubuntu 7.10…

In the terminal enter the following:

$ sudo apt-get install phppgadmin

This will set up and install all of the phpPgAdmin packages. It will also set-up and configure Apache and php5 for you too if you haven’t installed these already.

Next we need to create a symlink to phpPgAdmin so that Apache can find it:

$ sudo ln -s /etc/phppgadmin/apache.conf /etc/apache2/conf.d/phppgadmin.conf

Now if you navigate to http://localhost/phppgadmin you should be greeted with the phpPgAdmin screen. If your user account has a PostgreSQL account however, you will be logged in automagically.

Optionally, if you would like to be able to use the phpPgAdmin interface as the default ‘postgres’ administration account,1 you will need to do the following2

$ sudo gedit /usr/share/phppgadmin/conf/config.inc.php

Now find and change the following line

$conf['extra_login_security'] = true;

to

$conf['extra_login_security'] = false;

Save and close gedit. Now all you need to do is restart Apache.

$ sudo /etc/init.d/apache2 reload

Now if you head on over to http://localhost/phppgadmin all should be ready for you.


  1. I am assuming here that you have set-up your PostgreSQL server using my set-up instructions and therefore have a password protected ‘postgres’ account and that logins require passwords. 

  2. Please make sure you have read the above footnote and understand the security implications of allowing this type of access to your database server - if you have not secured your administration accounts, do it now! 

Mount ISO Files With Nautilus

Here’s two short bash scripts that allow you to mount and unmount an ISO image easily within the right-click menu in Nautilus (the file manager in Gnome):

$ sudo mkdir /media/ISO
$ cd ~/.gnome2/nautilus-scripts/
$ gedit "Mount ISO Image"

Now paste this code into the file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo mount -o loop -t iso9660 $I /media/ISO
done
done
exit0

Save, and exit gedit.

$ gedit "Unmount ISO Image"

Then paste this code in this file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo umount $I
done
done
exit0

Save, and exit gedit. Now finally…

$ chmod a+x *

Now you can mount and unmount ISO files by using the ‘Scripts’ options in the right-click menu. :)

Thanks to the Ubuntu Blog for the information.

Installing Apache and PHP Troubles

I just recently set Apache up on my home server (more on the server at some point in the future), but I was having problems serving up php pages. Every time I tried to access a php based page, Firefox came up asking if I wanted to download a ‘.PHTML’ file!!! :(

Thankfully the answer (like most things with Ubuntu) was found on the Ubuntu Forums

Simply edit the file /etc/apache2/apache2.conf by adding the following line:

AddType application/x-httpd-php .php .phtml

Now php files should be handled by the server in the way that they were intended.

Zotero

Zotero

Zotero is a new reference management tool that comes in the form of a Firefox (and Flock) extension. It looks like it could be a very good (and free) alternative to commercial reference management software tools like Endnote and Reference Manager. It even has plugins for Word and OpenOffice for cite-while-you-write functionality, and Wordpress so that writers of Wordpress based blogs can ensure that their posts are cleanly imported for users of Zotero.

Zotero [zoh-TAIR-oh] is a free, easy-to-use Firefox extension to help you collect, manage, and cite your research sources. It lives right where you do your work — in the web browser itself.

If you have any potential use for reference management (i.e. if you are a student or scientist) - I seriously recommend checking this out.

A First Look at Android

I really thought that Android was going to be a complete turkey, but after watching some of the videos up on YouTube it does look like it could be quite promising. If someone releases some decent hardware at a reasonable price the iPhone could have some competition…

American Style Pancakes

These are a great idea for a quick and easy dessert when there’s nothing else to hand (they saved me last night)! Cheers to Celia for the recipe.

pancake.jpg

Continue reading ‘American Style Pancakes’

Stacks Overlays

This is a great idea to improve the appearance (and usability) of stacks in Leopard.

Stacks is pretty much Leopard’s only non-eyecandy change to the dock, and it had the potential to be pretty handy, but the fact that the icon representing the stack is whatever the top file in the folder happens to be really ruins it (for me at least). However, if you haven’t yet given up on stacks and thrown them off your dock, there is a solution: overlaying stacks icons.

In essence, these are just small-ish semi-transparent icons that are permanently our top icon. This picture explain it best (before & after):

stacks-overlay.jpg

read more

Stephen Fry on the iPhone

Stephen Fry:

I have been using an Apple iPhone now for more than four months. This is due to an unhealthy mixture of friendship with its designer, a slobbery and pathetic love of the new, the possession of an American billing address (necessary until today for the activation and use of the device) and a willingness to pay preposterous international roaming charges. It puts me in a good position however, to tell you what you’re in for if you decide to own one of these honeys.

read more

Broken Arrow

broken_arrow.jpg

Note to self: Buy Broken Arrow on DVD. Caught a bit of it on TV last night - I forgot just how damn good that film is! (The soundtrack is great too)!

Massive Data Loss Bug in Leopard

I’ve been reading about this in a few places now.

Leopard’s Finder has a glaring bug in its directory-moving code, leading to horrendous data loss if a destination volume disappears while a move operation is in action. I first came across it when Samba crashed while I was moving a directory from my desktop over to a Samba mount on my FreeBSD server.

This is why you should NEVER just move data from one drive to another - copy it first, only then delete the original.

via