Archive for the 'Software' Category Page 2 of 3



Pentax K20D firmware update under Linux

Pentax has recently issued a new firmware update (1.03) for their current top DSLR, the K20D. Linux users might be suprised to see that only Windows and Mac users are supposed to download the firmware, as there’s only a download link for those two. A closer look to the accompanying text, however, shows that the Mac download is actually an ordinary zip file. I have yet to see a Linux distro that doesn’t support extraction of zip-files, and this particular zip-file extracts to the bin-file you need to update the camera. Even under Linux (or BSD or…)

Drupal: Combining Taxonomy Menu and Taxonomy Redirect

Taxonomy Menu is a very nice Drupal module that lets you create a menu based on a content type’s taxonomy. The taxonomy terms form the menu structure, and the way the nodes are displayed when a menu item (= taxonomy term) is selected can be customised using a custom view. I really like it. I like it so much, that I wanted the taxonomy terms displayed in the header of my nodes to link to the same menu structure, so that clicking on them was the same as clicking on the same term in the Taxonomy Menu.

Here enters Taxonomy Redirect. This module allows one to rewrite the url that the Taxonomy module creates. So instead of blabla.com/taxonomy/term/999 you can make the link blablabla.com/goto/this/instead/999. For this, you can define a redirect as plain text, or with a php snippet. Due to the link structure Taxonomy Menu uses, I had to resort to php for dynamically creating the Redirect link. The standard format for the link structure for Taxonomy Menu is “sitename.com/category/vid/pid1/pid2/tid” (with vid the vocabulary id, pid a parent term id, and tid the term id). The term “category” can be set in the settings for Taxonomy Menuy. Using plain text to define the Redirect link would f*** things up when the taxonomy term did not have any parents. Php worked fine, once I found out that the Redirect module defines a variable $tid for the term id, that you can use in your script. The code I used:

<?php
$output = “category/1/”;
$parents = taxonomy_get_parents_all($tid);
$parents = array_reverse($parents);
// Remove the child term from the array
array_pop($parents);
foreach ($parents as $parent) {
$output .= “$parent->tid”;
$output .= “/”;
}
$output .= $tid;
return $output;
?>

The “1″ behind “category” in the first line is for the vocabulary, so you’ll have to check what value you need there. Note that using php might not work straight away for anonymous users. To resolve this, have a look here

Opensuse 11.1: Connection was not provided by any settings service

Recently, I put openSUSE on my laptop, with the kde4 windows manager, and it was (kind of) love at first sight. A couple of days ago, however, I played around with some vpn related packages to login to my work’s vpn. Using Yast, I installed a couple of packages and Yast automatically installed some dependencies with them (of course). Little did I know, that I was breaking my wifi…

After I was done, I noticed that while knetworkmanager still showed the available wireless networks, I couldn’t connect to any of them. Clicking on a connection that had been set up before, didn’t seem to do anything. Never underestimate the power of Linux, however. (OK, it shouldn’t have broken in the first place, but well…) What did I find in /var/log/NetworkManager? This:

NetworkManager: <WARN> wait_for_connection_expired(): Connection (2) /org/freedesktop/NetworkManagerSettings/Connection/0 failed to activate (timeout): (0) Connection was not provided by any settings service “

Not being a Linux-guru myself, this didn’t mean a whole lot to me, but it provided me with the necessary seeds to sow in the google-field, and true enough, after a couple of minutes, google bore a nice ripe peace of fruit: the answer. A short synopsis for the not so adventurous: I had to remove the (inadvertently installed) package “NetworkManager-kde4″, which worked perfectly.

Now openSUSE and I are on friendly terms again.