Layered PNGs in GIMP

Posted 21:16, 6/5/2008, in Ubuntu

I quite often get website creative supplied in PNG format, particularly from our main designer who uses Macromedia Fireworks. Fireworks saves these by default with layers, which can be useful when convering layouts into HTML/CSS, but I never understood why these layers were gone when I opened the file in the GIMP.

It turns out, the reason is because... the PNG format doesn't support layers! The format does allow for files to contain some extra data, which is apparently where Macromedia stores the layer data. So much for the 'portable' network graphics format.

Comments (0)

Setting up PDT 1.x, Eclipse 3.3 on Ubuntu Hardy

Posted 13:03, 3/5/2008, in Ubuntu

Not quite convinced by PHP under Netbeans, I decided to go back to the PDT plugin for Eclipse for my PHP development. Unfortunately setting this all up is much more complicated than it should be, since the current release version of PDT requires Eclipse 3.3+, but the latest version in the Ubuntu repositories is 3.2.2.

There are alternative ways to install this of course, the PDT site offers an all-in-one package, or you can download Eclipse 3.3 from eclipse.org, and go from there. However I've never had too much luck with these.

So here's how to get it working:

  1. Install the latest version of Eclipse from the repositories (you can do this either via. Applications > Add/Remove, via. Synaptic or via. the command line).
  2. Update Eclipse to 3.3.x using its own build-in auto-update function. To do this:
    1. Run Eclipse via. the command line as root - sudo eclipse (this is important as otherwise your update will fail when it tries to overwrite some of the core files)
    2. Add some new update sites (which I got from this blog post), you can either add them manually or import from the from the supplied XML file.
    3. Select the most recent Eclipse 3.3.x version and then follow all of the installation instructions (will take a few mins).
    4. Exit the program
  3. Install PDT. Run Eclipse normally (not via. Sudo), you should get the 'Europa' splash screen, which will confirm that you're running version 3.3.x. Help > Find and install updates etc. Select PDT and its depdendencies, and install.

et. voila.

Hopefully the next Ubuntu release will include an Eclipse update, which will make this process a lot easier.

Comments (0)

Zend Framework in Ubuntu 8.04

Posted 14:42, 27/4/2008, in Ubuntu

With the release of Hardy, the Ubuntu repositories now include a package for the Zend Framework, so you can have just one copy of the library on your server that is automatically updated. To install and use this:

sudo apt-get install zend-framework

then add it to the include_path for your app, in a .htaccess file:

php_value include_path '.:/usr/share/php/libzend-framework-php'

you can then require in Zend Framework classes as you need them, or use the Zend autoloader to pull them in automatically when instantiated.

Comments (0)

Ubuntu 8.04 released

Posted 14:09, 26/4/2008, in Ubuntu

Thursday saw the release of Ubuntu 8.04 (codenamed "hardy heron"). Since I had a load of new PC bits arrive yesterday, I had the opportunity to compare installation of both XP and Ubuntu from scratch on the same machine.

The XP installation took about 40 minutes (not including the initial disc format), during which there were a few interruptions where I had to select my country, language, keyboard layout etc. After it was completed, the machine booted into a very low resolution desktop with fairly sluggish graphics performance and no networking.

The Ubuntu installation on the other hand took 10 minutes (including the repartitioning), had fewer interruptions, and afterwards the machine booted into my screen's native resolution, and everything was working out of the box. The only thing I had to install was the non-free Nvidia drivers for my graphics card, which took a few clicks (no CDs or web searching required).

My only complaints about the Ubuntu installation process are the partioning screen, which still uses terminology that would scare off a lot of users. Since it can detect if any other operating systems are installed on the disc, really it should present some simple options like:

  1. Install Ubuntu on disc XXX, alongside your current Microsoft Windows XP installation
  2. Install Ubuntu on another disc (if there's more than one in the machine)
  3. Replace your existing Microsoft Windows XP installation (warning about deleting data)

if the user chooses option 1 they're presented with the slider to control how much space each OS should use (and it should default at giving each 50% of the disc space).

Manual creation of partitions, and terminology like 'contiguous space' and 'swap' should be hidden behind an advanced/manual configuration screen.

Netbeans vs. Eclipse

I'm also considering switching from Eclipse to Netbeans for PHP development. I'm already using Netbeans for Ruby (i.e. Rails) stuff at work, and I've never been especially happy with Eclipse. It's not particularly easy to setup (largely because the Ubuntu respository holds version 3.2 which isn't compatible with the latest version of PDT), and generally the more plugins you seem to add to it, the more flakey it becomes.

Netbeans is certainly much easier to setup - the version from the repository works straight out of the box, and adding plugins is a simple as ticking the ones you want to install from a menu. I believe both apps are Java-based, but Netbeans generally feels more responsive, and there are fewer hangs whilst the app reparses some code.

However, the PHP plugin for Netbeans still seems to be in its infancy. Once installed, I opened a sample PHP file and was presented with a horrible lime green background behind all the code. Apparently this isn't something that can be changed in the preferences yet (!). The code was all shown in a serif font, even though the options had it set to use a monospaced one.

Comments (0)

Ubuntu - issues resolved

Posted 22:07, 5/11/2007, in Ubuntu

I managed to fix quite a few of my remaining 'niggles' with Ubuntu today after 20 mins or so of Googling. So here are the problems and solutions incase they help anyone else:

Lack of 5.1 surround (Realtek AC'97)

Here's the contents of my .asoundrc config file (which I setup last time I was trying to fix this):

pcm.!default {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}

but I was still only getting sound from the front two speakers. The solution? Type alsamixer into a console window - this will give you an ascii volume control for each channel. Crank up the rear speakers (the volume of which was defaulted to 0), and voila.

A nice sound configuration GUI is one thing that Ubuntu lacks.

No flash player (64-bit related)

As I understand it, Adobe don't do a 64-bit version of their flash player, so I have been using the open source (but limited) 'gnash' player up until now. However
in Gutsy, you can now install the normal 32-bit flash player package (flashplayer-nonfree), as this will also automatically install a package called nspluginwrapper, which allows 32-bit plugins to work in 64-bit Firefox. Simple!

Comments (0)

PHP IDE

Posted 21:39, 23/4/2007, in Ubuntu

I finally have a working PHP IDE under Ubuntu, although the hoops I had to go through were a little ridiculous. For my own future reference, here's how to do it:

  1. Install Eclipse via. the standard Add/Remove applications interface
  2. Use the built in software update feature to add a number of packages from the Callisto download site, details of which pages is on the PDT installation page (which by the way is the first installation page I've seen that has no installation instructions). Some guessing required!
    • Models and Model Development -> XML Schema Infoset Model (XSD)
    • Web and J2EE Development -> Web Standard Tools (WST)
  3. Add Zend has a download site using the software update feature in Eclipse (clear instructions for this are on Zend's PDT page).
  4. Attempt to install PDT (it will fail)
  5. Go back to through the Callisto software update process and install which ever package it was that PDT depends on
  6. Add whichever package the above package depends on
  7. Install PDT

et. voila, a working PHP IDE. Quite why the Eclipse installer isn't able to automatically select package dependencies is beyond me, but I'm sure there's a reasonable explanation.

First impressions of Eclipse/PDT are good. The sheer number of configuration options is daunting, but it has some very sensible defaults, along with some nice features sorely missing from PHPEdit, such as sensible auto-completiong and code folding.

Comments (0)

Ubuntu part #3

Posted 21:24, 20/4/2007, in Ubuntu

Some more updates:

The weird font display has been greatly improved by installing the latest versions of freetype, see this thread for details. Installing the MS core fonts package has helped as well, as web pages are now being displayed using the same fonts they would be on Windows.

I'll have to give up on getting Beryl (fancy desktop effects) working for now. It seems the drivers for the later ATI cards don't yet support the funky stuff required to run those sorts of apps (among other things - basically, ATI on Linux sucks). There's some more info on the ubuntu forums, and a short-but-sweet confirmation on AMD's knowledge base.

I'm still having a suprising amount of difficulty connecting to the samba share on my web dev box. Googling anything remotely connected to this reveals hundreds of articles on how to share files from your Ubuntu PC using samba, but what I want to do is the reverse. But I'm sure I'll figure it out.

Installing mplayer has given me some better movie file playback (there's some weird codec issue with the built-in player - the colours on most AVI files appear odd).  Next I need to figure out how to change the default file associations, so these files open in mplayer by default. Still no look with the 5.1 sound, I think it's due to a lack of driver for my onboard sound card. More investigation required.

Comments (0)

Ubuntu - first impressions

Posted 00:31, 20/4/2007, in Ubuntu

Yesterday I tried Ubuntu for the first time in the form of the "edgy" live CD (where you can play about with the OS without actually installing anything). Today I downloaded and installed the newly released "feisty fawn" version, and I'm impressed.

The installation process is pretty straightforward. The only thing that could be improved (if anything) is the partition selection screen. Rather than giving me a list of the machine names of various hard discs (fairly cryptic), give me some options like "Do you wish to replace your existing Windows XP installation?  Or install Ubuntu alongside your existing Windows installation on Hard disc 1 (name here), 200GB, Hard disc 2 (name here)."

Problems encountered

The main problem post-install was it not correctly recognising the screen resolutions my monitor and graphics card are capable of displaying. This left me using a horribly stretched 1600x1200 on a widescreen monitor. A quick bit of googling revealed that this is a known issue with whatever component detects screen resolutions.  Editing the config file at /etc/X11/xorg.conf to add my preferred resolution (1920x1200) fixed this.

Things I like so far

The main strength of running an open source operating system - the add/remove applications option from the menu opens a system that allows me to browse literally thousands of free, categorised and rated software apps. All installable within a click or two of the button.

The process for installing codecs is nicely implemented. There is a built in media player app, but without any codecs (for copyright reasons). When I double-clicked on an mp3 file for the first time it told me I needed to install a codec to play mp3 files, and gave me a list of suitable ones. Two clicks later and it was installed. The same works for videos.

Stuff I still need to figure out:

  • Beryl - sounds awesome from what I've read, but I haven't got it to work yet (the settings app works fun but running it from the command line gives me the error "No composite extension")
  • Although my sound card was recognised and works, I'm only getting sound out of two of the speakers.

And things I'm not quite decided on yet:

The look and feel - although I can see what they were trying to do with the whole "tribal" theme (from the sound effects to the orangey-brown colour scheme), sit it alongside with Windows Vista and you'd be hard pushed to say Ubuntu looks better. I know desktop appearance is easily changed, but first impressions matter.

Comments (0)

Ubuntu 7.04 ("Feisty Fawn") released

Posted 17:39, 19/4/2007, in Ubuntu

After having it sitting on my desktop for weeks, I finally got around to burning and trying out Ubuntu yesterday. And today they've released a major new version (typical!).

The 700MB CD image Ubuntu provide can either be used to install the full OS, or to try it out without affecting your Windows installation (as the OS can be run straight off the CD). If you choose the latter option, the operating system will run much slower than it would normally (and you won't be able to install anything), but it's a good way to get an idea what it's like to use, and more importantly how well your hardware will work with it out-of-the-box.

Early impressions were good, except that my USB mouse didn't work so I had to dig out an old-style PS/2 one.

Now that I use GMail for email, the only apps I'd need under Linux in order to switch to it for desktop use would be a PHP IDE and some sort of media player, although obviously I'd still have to use Windows for gaming. So I think I'll install it properly (dual booting with XP for now), to have a proper look.

Comments (0)

Search this site
Login
(or login/signup the old fashioned way)
Elsewhere

External URLs/articles that may be of interest:

ZF Blog Application tutorial

This is the first part in a multi-part tutorial in creating a blogging app using ZF. It serves as a great introduction for people trying to get started with the framework, and looks at application structure, mvc, templating and ACL.

Drupal in the Enterprise

An interesting look at why the author doesn't feel Drupal is ready for the enterprise. Drupal certainly appears to be one of the better CMSes around, so some of these criticisms seem a little harsh when you compare it to some of its inferior competitors. However many can also be applied to PHP web apps in general.

BBC admits Linux usage figures were off

Recently the BBC said one of the reasons they didn't push for a Linux compatible version of their iPlayer was that their website only received about 600 visits a week from Linux users. They've now admitted this figure is closer to 100,000. Just a bit off then.

Online ad tracking 'opt out' list

Lobbyists in the US are trying to get an 'opt out' list created for online advertising, so users could choose not to have their browsing habits tracked. The irony is, for this to work technically, some system somewhere would have to create a huge list of IP addresses and personal information, which seems to defeat the point.