22 April 2007

Thoughts on Ubuntu 7.04

Here are some of the issues I have with 7.04:

Support screen resolutions are not automatically detected
This problem is not limited to Ubuntu, but to every distro that uses xorg. This issue annoys the hell out of me. I've recently tried Ubuntu on my Macbook and it booted directly in 1024x768, and there was no option to set the correct resolution. I've tried Ubuntu (and other distros) on my Samsung 32" TV and again it was unable to detect the correct resolution. Now, when I use Windows or OSX, they are both able to correctly detect the resolutions. Mac OSX works even better than Windows and seems to know what the native resolution is and use it!
I'm tired tired tired of editing xorg.conf and adding modelines each and every time I install Linux. Also, dual head? Mac OS X just works. Windows might need a little configuration, but easy enough. Linux? Forget about it.

User interface
If "Pretty is a feature", then where the hell is it? Ubuntu's fonts still look *awful*, they are absolutely horrible. The spacing and layout of widgets and text look terribe, just load Evolution to see what I mean. KDE is a little better in but still suffers from terrible looking fonts.

File sharing

I want to share a particular folder. I guessed that Ubuntu was going to use Samba for the job. I navigated to the preferences menu and select sharing and setup my share. I tried to connect from my Windows machine, and wasn't able to authenticate by typing in my Ubuntu username and password. Grrrrr. I guessed that Ubuntu hadn't setup a Samba username and password for me. I opened a terminal and typed $ smbpasswd -a username, this allowed me to setup myself as a user and specify a password. Now when I connected from my Windows machine it worked.
I'm reasonably familiar with Samba to know how to setup a user, but how on earth would your average user figure this out?

Overall
Ubuntu makes a great server, but I'm not sure about it being a good desktop system. I've grown tired of experiencing the sames problems over over again. I don't find being my own sysadmin and being much fun.

21 March 2007

Translate 0.6.0.11

Changes from 0.6.0.10

* Fixed context menu

Small extension that translates web pages (via toolbar button) or selected text (via context menu) from and to different languages. Uses BabelFish and Google translation engines. Works only with Firefox 2.0.*

Install/Download

Translate Context Menu Problems

I've been investigating into what was causing the problem with the context menu not displaying. It turns out that my XBL binding was overriding Mozilla's and therefore preventing the menupopup element from functioning. I'll upload an new version of Translate tonight.

04 March 2007

Translate 0.6.0.10

Finally :-)

Changes from 0.6.0.9

* Compatible with Firefox 2.0.*
* Removed Tools menu functionality
* Context menu and Toolbutton menus are constructed using XBL instead of javascript

Small extension that translates web pages (via toolbar button) or selected text (via context menu) from and to different languages. Uses BabelFish and Google translation engines. Works only with Firefox 2.0.*

Install/Download

Using Rake to build Firefox extensions

I've been use rake to build my Firefox extension and found that it's been quite a pleasant experience. I needed to write a new build script as my old one was a Windows batch script and no longer use Windows for doing any development. Ant was a instant non-starter, I've had a enough XML config/programming to last me a lifetime. XML is great for data definition, not for configuration or programming. Rake seems very readable, and easy to maintain. Anyway, here's my build script for those of you interested in extension development:


require 'rexml/document'
include REXML

EXTENSION_NAME="translate"
BUILD_DIR="build/#{EXTENSION_NAME}"

# here we have a directory task, it will create the
# build directory if it doesn't already exists
directory "#{BUILD_DIR}/chrome"
task :create_buildchrome_dir => ["#{BUILD_DIR}/chrome"]

# we copy the manifest file to the build dir
# then iterate through each line and change the directory references
# to references to the jar file. this allows us to debug/develop normally
# and let the Rakefile deal with the changes necessary for release.
desc "prepare the chrome.manifest file"
file "#{BUILD_DIR}/chrome.manifest" => [:create_buildchrome_dir] do
open("#{BUILD_DIR}/chrome.manifest",'w') do |infile|
open("chrome.manifest", "r") do |outfile|
while line = outfile.gets
infile.puts line.gsub(/chrome\//, "jar:chrome/#{EXTENSION_NAME}.jar!/")
end
end
end
end
task :create_chrome_manifest => ["#{BUILD_DIR}/chrome.manifest"]

# not much to do here, just copy the install.rdf file over
# to the build dir.
desc "prepare the install.rdf file"
file "#{BUILD_DIR}/install.rdf" => [:create_buildchrome_dir] do
cp 'install.rdf', "#{BUILD_DIR}/install.rdf"
end
task :create_install_rdf => ["#{BUILD_DIR}/install.rdf"]

# here we create the jar file. ruby does natively support the creation of zip files
# so I have to use the shell to do it. the zip command allows the exclusion of certain file
# and in this case I want to exclude my svn files.
desc "create the chrome jar file"
task :create_chrome_jar => [:create_buildchrome_dir] do
sh "cd chrome && zip -qr -0 ../#{BUILD_DIR}/chrome/#{EXTENSION_NAME}.jar * -x \*.svn\*"
end

# this task makes sure the we've created the jar, prepared the manifest and install.rdf
# then we zip all of those files. We also extract the extension's version number from
# the install.rdf in order to generate the correct xpi file name.
desc "create the xpi file and use the version number in the file name"
task :create_extension_xpi => [:create_chrome_jar, :create_chrome_manifest, :create_install_rdf] do
install_rdf_file = File.new('install.rdf','r')
install_rdf_xmldoc = Document.new(install_rdf_file)
version_number = ""
install_rdf_xmldoc.elements.each('RDF/Description/em:version') do |element|
version_number = element.text
end

sh "cd #{BUILD_DIR} && zip -qr -9 ../../#{EXTENSION_NAME}-#{version_number}-fx.xpi *"
rm_rf "build"
end

task :default => [:create_extension_xpi]

21 February 2007

I got my Airport Extreme!

I ordered it on the 16th. Apple said they'd deliver on the 3rd of March, instead I received it today! Great service.
The unit itself looks great, and was a piece of cake to setup. I've already managed to setup up shared harddisk. My Macbook automatically picks up the shares using afp, while my Windows machine mounts them using SMB/CIFS. Better still the mounted volumes have indexing turned on automatically! Now I just need to see if my printer works.

20 February 2007

Translate

Sometime ago I created a Firefox extension called Translate. It was an extension that I initially created for my own needs. I thought some others might like my extension so I gave it some polish by adding a reasonable icon and some user friendliness. Subsequent versions of Firefox required bumping the version number in order to get things working. However, Firefox 2 rendered my extension completely broken. I simple version bump wasn't sufficient.

I get the odd mail now and then from people asking me if/when I can get it working in Firefox 2.0. Last weekend I spent a sometime on Translate. I've refactored a lot of the code, removed some nasty dynamic XUL building code and replaced it with nicer XBL. I've had to completely remove Translate from the tools menu, it was taking to long to debug. I'm guessing no one used that feature anyway.

Anyway, for the few remaining users of Translate, I just need to do some testing, make sure everything is working reasonably well, and release it.