Perl – GTK2 – Ubuntu 9.04

How to setup Gtk2 for perl in Ubuntu 9.04

You will need the following packages

sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev libglib2.0-dev libpango1.0-dev

Now run cpan

sudo cpan

Install the following in order

install ExtUtils::Depends
install ExtUtils::PkgConfig
install Glib
instal Pango
install Gtk2

And now you done, you can test it with the following script:

#!/usr/bin/perl
use Gtk2 -init;

my $window = Gtk2::Window->new ('toplevel');
my $button = Gtk2::Button->new ('Quit');
$button->signal_connect (clicked => sub { Gtk2->main_quit });
$window->add ($button);
$window->show_all;
Gtk2->main;

To run it save the script as gtk-test.pl and run

perl gtk-test.pl

from the command line.

A small window should open, with a Quit button inside.

Ubuntu 9.04 – Nvidia 9600GT

After having problems installing the latest Ubuntu 9.04 with a 9600GT GPU I thought I would let you all know the the process that worked for me.

First download the ‘Alternate install image of Ubuntu 9.04 from ubuntu.com

Burn the image and run through the Installation as normal.

After Ubuntu has been install and restarted, at the GRUB boot loader prompt press Esc and select:

 Ubuntu 9.04 , kernel 2.6.28-11-generic (recovey mode) 

Once it has loaded select:

netroot - Drop to a root shell prompt with networking

Now type:

apt-get update
apt-get install envyng-gtk

Now run envy by typing:

envyng -t

select:

1 - Install the NVIDIA driver

and then:

0 - 180.44-0ubuntu1

Envyng will now download the selected driver and install it.

You should be prompted with the success message:

 Success: Operation Completed 

To restart Select:

0 - Yes (recommended)

Ubuntu should now boot into the GUI.