Archive for January, 2006

referrer

Monday, January 30th, 2006

Finally managing the blog from the 770, since opera does not send referrer as default or is it configurable I thought I was out of luck. But oh yay, it was just a simple matter of editing ~/.opera/opera.ini to include Enable Referrer=0 \o/, just run this in your xterm with all browser windows closed:

sed -i /^Enable/s/Referrer=0/Referrer=1/ ~/.opera/opera.ini

Oh can you shut that thing off?

Monday, January 30th, 2006

So I annoyed myself about this a few days ago when I found myself listening to some music on the 770, had my PSP at home and my iAudio is still being repaired. Having german music blasting out of the headphones when you trying to order a coffe is probably not the best thing, so what to do when you do not have a remote? Try to remove the cover and quickly press stop without unplugging the headphones and treating everyone to a bit of your taste in music. *sigh* Hardly efficient :) Thankfully someone raised a similar question on #maemo earlier today which prompted me to throw together a rather silly script. Unplugging the headphones will set the volume 0 :) (I made it remember the current values aswell, but just to show the person on IRC.) Stupid hack I agree, but I found it quite useful and will promptly put in among the init scripts.

HP="/sys/devices/platform/gpio-switch/headphone/connection_switch"
MAIN=0
HEAD=80
while true; do
        NEW=$(cat $HP)
        if [ "$OLD" != "$NEW" ]; then
                if [ "$NEW" = "connected" ]; then
                        gconftool -s /apps/osso/sound/master_volume -t int $HEAD
                else
                        gconftool -s /apps/osso/sound/master_volume -t int $MAIN
                fi
        fi
        if [ "$NEW" = "connected" ]; then
                HEAD=$(gconftool -g /apps/osso/sound/master_volume)
        else
                MAIN=$(gconftool -g /apps/osso/sound/master_volume)
        fi
        OLD=$NEW
        sleep 1
done