Archive for December, 2007

You are now browsing the archive for December in 2007.

“No module named _dbus” in Deluge Torrent

I decided to upgrade from my current deluge-torrent (a BitTorrent client) to the latest version 0.5.7.1, as I just got a what.cd invite. Unfortunately, the .deb package from the Deluge site didn’t work instantly.

tim@royalgala:~/Desktop$ sudo dpkg -i deluge-torrent_0.5.7-1_i386.feisty.deb 
Selecting previously deselected package deluge-torrent.
(Reading database ... 158322 files and directories currently installed.)
Unpacking deluge-torrent (from deluge-torrent_0.5.7-1_i386.feisty.deb) ...
Setting up deluge-torrent (0.5.7-1) ...
 
tim@royalgala:~/Desktop$ deluge
Traceback (most recent call last):
  File "/usr/bin/deluge", line 45, in <module>
    import deluge._dbus as dbus
ImportError: No module named _dbus

Googling for “No module named _dbus” gave me only two results, both Deluge-related. The first forum thread had no solution. dpkg purging the system from deluge-torrent did not solve the problem. In the second thread, the problem was solved through manually deleting all files from the previous installation, which is what I did, using slocate. Deluge 0.5.7.1 would then install nicely.

Getting Pretty URLs with phpwiki

The default for the phpwiki wiki software is to have links of the form /index.php/HomePage. This is ugly. To get Wikipedia-style permalinks, append the following to .htaccess and verify that you have the mod_rewrite apache module installed:

RewriteEngine On
RewriteRule ^index\.php/([^\.]*)$ /redir.php?dest=$1
RewriteRule ^([^\.]+)$ /index2.php/$1

Now, move your index.php to index2.php. Create a redir.php file that contains only a redirection:

<?
header( 'Location: /' . $_REQUEST['dest'] );
?>

I am aware that phpwiki does support native link prettifying. However, I couldn’t get it to work and had to solve it in some way.

FireStats iconAnvänder FireStats