Drupal and SVN Repository conflicts

If you happen to maintain your webpage with Drupal and also host a SVN-Repository on the very same host you can run into trouble. Just try to commit a file starting with a period (for example a project file from eclipse: .project). It will give you an error "access denied for unknown reason". The solution is quite simple. There is a rule in the .htaccess file from Drupal which denies access to files starting with a period. You can either delete this rule or restrict it to only apply for the drupal part of the page.

gnome-tweak-tool Settings schema not installed error

When you run gnome-tweak-tool after installing Gnome 3 you can get the following error:

GLib-GIO-ERROR **: Settings schema 'org.gnome.shell.clock' is not installed

The cause is that you are missing a schema which is installed together with gnome-shell (which is probably not installed because you are running the fallback mode). The obvious fix is to install gnome-shell. But if you want to run Gnome 3 in fallback mode you need to do some additional steps: Open the System Settings, go to System Info, Graphics and check “Forced Fallback Mode”.

Download mp3 files containing the english pronunciation of a word

One place where you can find those files is dict.leo.org. You can easily play and download the pronunciation of a english word with the following bash script (just copy and save it to filename.sh):

#!/bin/bash

if [ $# -le 0 ]
then
    echo "usage:<script> <word> <word2> <word3> ..."
    exit 1
fi

for i in $*
do;
	mplayer "http://www.leo.org/dict/audio_en/$i.mp3"
	wget "http://www.leo.org/dict/audio_en/$i.mp3"
done

To execute just run something like:

sh /data/Scripts/playanddownloadenglishmp3.sh dangerous

or

sh /data/Scripts/playanddownloadenglishmp3.sh dangerous sign fish noun

 

Fix Anki should be run with python2.x.

When you start anki you might encounter something like:

[patrick@localhost anki-1.2.6]$ ./anki
Traceback (most recent call last):
  File "./anki", line 7, in 
    raise Exception("Anki should be run with python2.x.")
Exception: Anki should be run with python2.x.

If you are running a up-to-date linux distribution python2 should be installed but it is possible that the default version is set to python(1). However there is a very simple fix. Just open the anki (Anki Root Folder) file in a texteditor and replace the first line:

#!/usr/bin/env python

with

#!/usr/bin/python2.7

now it should be no problem to run Anki

Fix Guestbook in cmsmadesimple

The guestbook module of cmsmadesimple has the bad habit of showing the following error message after updates: Call to undefined function nl2pnbr(). The fix is quite easy. Just open the filemodules/Guestbook/action.get-entrylist.php in a texteditor and replace the line

$entry['message'] = nl2pnbr($entry['message']);

with the line

$entry['message'] = nl2br($entry['message']);

After that it works just fine.

Enhanced XSPF Player breaks when upgrading cmsmadesimple to 1.9.0

The player fails because of the update of the Uploads module and some missing includes. A fix is quite easy:

  1. Open modules/EnhancedXSPF/action.admin_edit_playlist.php in a texteditor. You need to change the line 101 from

    $filelist = array_merge($filelist, $uploads->getFileList($category));

    to

    $filelist = array_merge($filelist, $uploads->get_category_file_list($category));

    Now you should be able to edit the playlists again.

  2. There is still another problem left. The playlist is not generated. To fix this issue open up modules/EnhancedXSPF/playlist.xml.php in a texteditor. You need to insert another include. You can insert the following line:

    require(cms_join_path(CMSMS_ROOT,'lib/classes','class.cms_config.php'));

    just after line 20 (where adodb is included)

The player should work the same as before after applying these fixes

Qnap TS-209 with Debian: Control Fan

  1. Start the Fan Control Application

    qcontrol -d &
  2. Now you can set one of the following speeds: stop, silence, low, medium, high, full

    qcontrol fanspeed silence

I'm running my TS-209 in the silence mode. I have no harddisks installed (just use if for VPN and as file server for usb-attached disks) and therefore it is not necessary to cool it down

Automatic WLAN Connection on Startup – Linux without GUI

  1. First you need to make sure that you have installed the required packages for secure Wireless connections:

    sudo aptitude install wpasupplicant
  2. Now you need to open the /etc/network/interfaces file in a text editor:

    sudo nano /etc/network/interfaces
  3. Just add the following lines:

    auto wlan0
    iface wlan0 inet dhcp
        wpa-ssid NetworkName
        wpa-psk NetworkPassword
    
    

Source: http://wiki.debian.org/WiFi/HowToUse