Amarok2 TrackInfo object in QtScript

I just started playing with QtScript in Amarok and so far the documentation has been a big let down. A lot of things are documented for C++ but the conversion into JavaScript is a lot trickier then it looked.

This is ofcourse because the whole QtScript engine is all new and this will become better over time. In this posting I will show what the TrackInfo object holds, which is returned by Amarok.Engine.currentTrack();

 destroyed(QObject*): function () { [native] } destroyed(): function () { [native] } deleteLater(): function () { [native] } objectName:  title: Hotaka (radio edit) sampleRate: 44100 bitrate: 192 score: 49.5 rating: 0 inCollection: true type: mp3 length: 215 fileSize: 5195160 trackNumber: 1 discNumber: 0 playCount: 1 playable: true album: Hotaka artist: Juno Reactor composer:  genre: Electronic year: 2002 comment: DHA's Music Archive path: /mnt/music/Mp3/Albums2/Juno Reactor/Juno Reactor - Hotaka/01 Hotaka (radio edit).mp3 isValid: true isEditable: true lyrics: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">  <html xmlns="" xml:lang="en" lang="en" dir="ltr">  <head>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />      <title>Juno Reactor Hotaka (radio edit) lyrics</title>  </head>  <body><h3><a href=''>Hotaka (radio edit)</a> by <a href=''>Juno Reactor</a></h3> <pre> Not found</pre><hr/>Additional Info: <ul> <li><strong>url: </strong><a href=';action=edit' title='url'>;action=edit</a> </li> </ul> </body> </html> 

So the next time you need some information about the currently playing track you know exactly which fields are available.

On a side note: the isValid boolean tells you if the track info you are parsing is in fact a running track. If Amarok is not playing all fields will be empty or zero. Check isValid before you start processing an empty data object…

Linux / Gentoo Linux

Getting Evolution to go native on KDE4

Right now I’m trying to get Evolution to work and fill the void that the removal of KitchenSync from KDE 4.2 has caused: the possibility to synchronize your phone, PDA, calendar, contacts and email using one central point.

Installing Evolution is only the start and please note that I am running Gentoo so if you are on another linux distributions things might turn out different.

We start with the basics: when you try to install synce and you have the ‘kde’ use flag – it will try to pull in ‘synce-kio-rapip-0.10-r1’ or similar. If you are truly running KDE 4 (and ditched KDE 3 and Qt3 – like me) the ebuild will fail because it needs KDE 3. There is a new package called ‘kde4-kio-rapip’ (currently at version 0.2) which should work for KDE 4. I decided I don’t want the deprecated KIO slaves and should I need direct access to my Windows Mobile 2003 PDA I will rather install the FUSE driver for it.

To make Evolution look like the KDE applications you need to get GTK2 to use the Qt4 engine – which will theme everything like the rest of KDE. There are 2 or 3 choices at the moment but ‘x11-themes/gtk-engines-qt‘ is currently your best bet (at version 1.1-r1 right now).

After installing it, open up System Settings -> Appearance -> GTK Styles and Fonts and select "Use my KDE style…" and "Use my KDE fonts…" and hit apply. Now log out and back in and Firefox, Thunderbird, Evolution and any other GTK program should look like KDE applications.

The next obstacle was the fact that Evolution is missing its icons despite that the theming of the interface itself is working. This is because the normal parts of the program interface are rendered by Qt4 but the icons are not a part of the standard Qt4 theme. To fix this we need to tell GTK which native theme it should use. Not to skin the program but to provide the icons.

Unfortunately I can not figure out what is going wrong as some icons are picked up and others are not while the console of Evolution stays quiet. Running the program itself from a console shows these messages:

Bonobo-WARNING **: Could not find GNOME pixmap file (null)

Because reinstalling seems to do nothing I might try to downgrade Evolution to see if that works…

General blog entries

Autoupdate for Joomla 1.5.x

One of the annoying things about Joomla sites it the fact you have to manually upload any update for the system. The result is painfully obvious: uncountable websites running unsafe installations because nobody feels the urge to upgrade (unless stuff goes wrong ofcourse).

It seems that Joomla 1.6 is getting auto-update support which means that updating a website is a mere press of a button. It looks like they wan’t to make it even fancies to allow plugins and components to check for updates to be sure that you are running the latest version of everything.

For those who can’t wait for fancy features like that by the end of 2009, you can get Advanced Tools for 1.5 now. This component has some cool tools but the real candy here is the Updater which auto-updates Joomla itself .

Note that you need to have write access to your entire Joomla site for this to work or you could use a small script to temporarily change ownership.


Windows 2003 Server and 404 errors in reporting

I’ve ran a few times into a strange phenomenon when dealing with clean installed Windows 2003 SBS servers. In particular Windows 2003 SBS R2 with SP1 – but I’m sure other versions are affected as well.

The symptoms: A clean installation of the server refuses to show the Backup overview and Server Performance and Server Usage Reports. Instead you get a 404 error telling you the page can not be found. If you send reports by mail, those users will see the same thing.

When you navigate to http://localhost/Backup or http://localhost/Monitoring or http://localhost/Remote – all 3 sites give you a 404 error while for example http://localhost/ClientHelp and http://localhost/exchange work just fine.

Please note that if you can’t see these last 2 pages as well or you do not get error 404 but something else, you probably have a different problem.

The problem:
Windows SP1 and consecutive updates pull in updates for Microsoft ASP.NET and add ASP.NET 2.x to the server. The defaults then become to use ASP.NET 2.x instead of 1.1. The reporting modules do NOT work with ASP.NET 2.0 or higher.

Open up server management, expand on the left pane the ‘Advanced’ section. Next, expand, ‘IIS’, ‘YourServerName’, ‘Websites’ and finally ‘DefaultWebsite’. Click on ‘DefaultWebsite’ and the right pane should show a listing of components in your default site.

In the right pane, do for each broken service (‘Backup’,’Remote’ and ‘Monitoring’) the following: right mouse click on the name and select ‘Properties’. In the popup select the tab called ‘ASP.NET’ and look for the selected ASP version. Most likeliy you will see something like ‘2.0.x.y’. Switch the version to ‘1.1.x.y’ and click ‘Apply’ and then ‘OK’. You now switched that folder to the correct version, now repeat for the other broken services.

Check if you can now open up the pages that previously gave you a 404 error – they should work. Note that displaying them can take a while because they have to parse the Windows event logs to show you the reports.


HighPoint RocketRAID 1742 in CentOS 5.2

After having a bit of a fight with CentOS and its broken Realtek 8169 driver (called r8169 and which also claims Realtek 8168 devices but screw up when detecting the link status) I finally got to play with a RocketRAID 1742 controller from HighPoint. Where Promise dropped the ball with supporting hardware RAID on linux (basically you get 2 or 4 extra SATA ports but the RAID controller plays dead), HighPoint promised us true RAID under linux without any wonky software drivers.

Note that the RPM package for the DKMS rr174x driver is attached on the next page.