Archive for the ‘Uncategorized’ Category

switch cheap kvm with scroll lock led on xorg

#!/bin/sh
xset led 3
xset -led 3
sleep 1
xset led 3
sleep 1
xset -led 3

Advertisements

Ampache and AAC nero/apple tags track numbers

I’ve installed ampache 3.5.1 on a machine, and I discovered that it cannot get track numbers from MP4/AAC files tagged by Nero AAC encoder o Apple encoder.

This issue can be solved by writing a script that uses faad to get the track number, and modifying some ampache code.

The scripts is:

$ cat /usr/local/bin/gettracknoaac.sh
#!/bin/bash

if [ -z "$1" ]; then
 echo usage: $0 file
 exit
fi

faad -i "$1" 2>&1 |grep track: |cut -d\   -f2

You need also to edit the file /usr/share/ampache/www/lib/class/vainfo.class.php (this is the ampache debian package path, please change it to match your installation). Locate the function getinfo and add before the line at the end of the function:

unset($this->_raw);

the code:

if($this->tags['quicktime']['track']==0) {
 $this->tags['quicktime']['track']=exec('/usr/local/bin/gettracknoaac.sh '.escapeshellarg($this->filename).'',$retval);
 debug_event('getid3',$this->tags['quicktime']['track'],'5');
 }

Enabling the debug log to level 5 on ampache you can see that it gets the track numbers from the mp4/aac files.

My madwifi module settings for eeepc atheros ar5025 wifi

After some tuning I found that to get optimal wifi speed with the madwifi-free driver on my home I had to set:
options ath_pci hal_tpc=1 intmit=1 ratectl=amrr

Bye!

Tivoli Directory Server init script for redhat

Here is a very simple init script for IBM Tivoli Directory Server V. 6.0.

Bye!

#!/bin/bash
#
#       /etc/init.d/ibmslapd
#
#       IBM Tivoli init script
#       2009 - Emilio Scalise, < emisca at rocketmail dot com >
#
# chkconfig: 345 70 20
#
# description: IBM Tivoli init script

# Source function library.
. /etc/init.d/functions

start() {
        echo -n "Starting ibmslapd: "
        daemon --check ibmslapd /opt/ibm/ldap/V6.0/sbin/slapd
        RETVAL=$?
        touch /var/lock/subsys/ibmslapd
        return $RETVAL
}

stop() {
        echo -n "Shutting down ibmslapd: "
        /opt/ibm/ldap/V6.0/sbin/slapd -k
        RETVAL=$?
        rm -f /var/lock/subsys/ibmslapd
        return $RETVAL
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo "Usage: ibmslapd {start|stop|status|reload|restart[|probe]"
        exit 1
        ;;
esac
exit $?

zune-like black theme for KDE/QtCurve

I’ve made a black theme for kde using the QtCurve engine (you can use the qtcurve packages in the misc-backports repository..).

http://download.tuxfamily.org/emiscabpo/other/QtCurveZuneScreenshot-1.jpg

http://download.tuxfamily.org/emiscabpo/other/QtCurveZuneScreenshot-2.jpg

http://download.tuxfamily.org/emiscabpo/other/QtCurveZuneKDE.tar.gz

I’ve taken inspiration from the Micro$oft (oh my god…) Zune theme.. i liked it 😉

(http://go.microsoft.com/fwlink/?LinkID=75078)

Bye!

lyx 1.5.x and 1.4.5 backports

You can find here lyx 1.5.3:

deb http://download.tuxfamily.org/emiscabpo/lyx15-bpo ./

and here it is the 1.4.5 version (for the ones who want to stick with the 1.4.x version:

deb http://download.tuxfamily.org/emiscabpo/lyx14-bpo ./

These repositories contain a backported libboost 1.34 library, that could be installed alongside the 1.33 version. Please note that the libboost-dev package of the 1.34 version overrides the libboost 1.33 one in apt.

updated compiz 0.6.2 uploaded…

These should fix the problem.. The new version is 0.6.2-0~emiscabpo+2.

Bye

little error in the compiz-manager startup script…

I missed changing the path variables on the compiz-manager script, copied to /usr/bin/compiz by the compiz-core_0.6.2-0~emiscabpo+1.deb.

The incriminated lines are:
COMPIZ_BIN_PATH=”/usr/local/bin/” # For window decorators and compiz
PLUGIN_PATH=”/usr/local/lib/compiz/”
GLXINFO=”/usr/bin/glxinfo”
KWIN=”/usr/bin/kwin”
METACITY=”/usr/bin/metacity”
COMPIZ_NAME=”compiz” # Final name for compiz (compiz.real)

fixed to:
COMPIZ_BIN_PATH=”/usr/bin/” # For window decorators and compiz
PLUGIN_PATH=”/usr/lib/compiz/”
GLXINFO=”/usr/bin/glxinfo”
KWIN=”/usr/bin/kwin”
METACITY=”/usr/bin/metacity”
COMPIZ_NAME=”compiz.real” # Final name for compiz (compiz.real)

Tell me if there are other issues..