Friday, June 08, 2012

Solved: Braid segfault

Downloaded the Braid game from the latest Humble Bundle V. When I start the game on my Debian testing system, immediate segfault. Well, this may fix it for ya!

 See if you have the following two libraries installed on your system. In my case, they were already in /lib/i386-linux-gnu and /usr/lib/gcc/i486-linux-gnu/4.6/


so I disabled the versions that came with Braid.

cd braid 

Voila! Braid now runs.

Saturday, October 08, 2011

Firefox 7 and WebGL

One of the advantages of upgrading my firefox browser to version 7 is the enhanced 3D acceleration for certain video cards, in my case an AMD 890GX Integrated graphics chipset on the motherboard (Radeon HD 4290 equivalent). In prior versions of Firefox, my driver, the free and open source radeon driver was blacklisted for GPU accelerated windows and WebGL. So after upgrading to version 7.0.1 of Firefox, I checked under Help | Troubleshooting Information and was surprised to see this:

So I entered aboug:config in the address box and searched on webgl. I found a parameter webgl.disabled set to true. I'm not sure how this got set to true, but changing it to false solved the problem. Now I can enjoy WebGL websites like this one.

Sunday, September 25, 2011

Set wallpaper in xfce4 from command line.

With so many folks switching to xfce4 desktop from gnome or kde, thought I'd post this little bash function for setting the wallpaper.

  # Set picture $1 as desktop background
  # 0 - Auto
  # 1 - Centered
  # 2 - Tiled
  # 3 - Stretched
  # 4 - Scaled
  # 5 - Zoomed
  xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s $1
  xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s 4
  xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-show -s false
  xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-show -s true

The last two xfconf-query commands seem to be needed to get the screen to refresh.

Labels: , ,

Sunday, December 27, 2009

Cheap MP3 Player and UDEV

This little tidbit might help someone some day.

Recently, I purchased a cheap mp3 player from When I plugged it into my Debian box running Squeeze/Sid, it was not properly recognized. According to dmesg, it was thought to be a USB touchscreen, rather than a USB storage device. The vendor ID is 1234 and the Product ID is 5678. Hmm, my guess is the manufacturer didn't bother to register the product with the official USB guys. One of the hazards of buying cheap stuff. Anyway, to get the udev to properly recognize the device, I added the following line (one long line) to /etc/udev/rules.d/z10_local.rules:

SUBSYSTEM=="usb", DRIVER=="usbtouchscreen", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", ACTION=="add",
RUN+="/usr/local/sbin/rebind_usbdriver usb-storage 1234 5678 :1.0"

This howto is an excellent description on how to write UDEV rules.

Saturday, September 19, 2009

GRUB2 Splash Images Must be DirectClass

Just a quick note that might save someone out there time. If you've upgraded to GRUB2 and can't get your custom splash image to work, try making sure your image is DirectClass

$ cd /boot/grub/images
$ convert robin.xpm -type truecolor -depth 8 robin.png
$ identify robin.png
robin.png PNG 640x480 640x480+0+0 8-bit DirectClass 26kb

If you don't specify the "-type truecolor" you'll get PseudoClass, which will silently not work.

Here's a article on how to upgrade to GRUB2 and enable splash images.

Friday, January 30, 2009

Wikipedia Picture of the Day as Wallpaper

This bash script downloads the Wikipedia Picture of the Day (POTD) and sets it as your KDE wallpaper. Works only with KDE 3.5 but probably could be adapted to KDE4 pretty easily. (Hint: Use dbus instead of dcop.) Written by Albert Thuswaldner. Wikipedia recently changed their POTD web pages, so I've made the necessary changes.

# $Id: wikiwall 24 2007-09-02 20:00:08Z thuswa $
# Last modified Sun Sep 2 21:58:28 2007 on stalker
# Update count: 221
# Copyright (C) 2007 by Albert Thuswaldner, thuswa gmail com
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Purpose:
# Wikiwall is a bash script which will set the "picture of the day"
# (POTD) from as your KDE desktop wallpaper.
# If you set it to autostart it will give you a new fresh background
# as you login in, on a daily basis.
# The wallpaper pictures are saved in the /tmp directory, a history of one
# week back in time is kept. The script does some basic checking
# if wikipedia is reachable and if the wallpaper already is the current one.
# Usage:
# 1.) put in ~/bin
# 2.) make executable
# 3.) test it!
# 4.) (at your option) run: wikiwall --set-auto
# to make it autostart at login
# 5.) Have a great time - all the time! ;)
# Tested:
# On OpenSUSE 10.2, should work on most Linux distros, and other UNIX flavours
# too albeit the arguments for the ping command have to be modified.
# Note #1: The file size of the POTD's at wikipedia are sometimes
# quite large (~10Mb), so you with a "broadband" connection,
# Note #2: The picture files that are downloaded will be stored in the
# /tmp/kde- directory. This script does not delete
# any of these files, so it is up to you. However,
# the way the file name is constructed:
# "wikiwall.00N", where N equals the current weekday (N=1..7),
# does so that only a maximum of one week of PTOD's will be
# stored on your computer.
# Note #3: It is up to you the user of this script to make sure that
# by doing this you honour the license of the artworks that
# you download. This should not be a problem in most cases
# since using a picture on your own private computer
# desktop is considered fair use.

# Get date in correct format
TD=`date +%F` #YYYY-MM-DD
WDN=`date +%u` #Weekday number

#Set temp file name

# Set wikiwall to autostart
if [ "$1" = "--set-auto" ]
ln -s $PWD/wikiwall $HOME/.kde/Autostart/wikiwall

# Revert back to yesterdays picture
if [ "$1" = "--revert" ]
WDN=`expr $WDN - 1`
if [ $WDN -eq 0 ]
dcop kdesktop KBackgroundIface setWallpaper $TMPFILE 8 # 8=Scale and crop

# Set wikipedia specifics

# get current wallpaper
CURRPIC=`dcop kdesktop KBackgroundIface currentWallpaper 0`


if [ "$CURRPIC" != "$TMPFILE" ]

# check if wikipedia is reachable
if ping -c 1 -q -W 2 -w 2 ${SITE[1]} >/dev/null

for N in 1 2; do
# extract picture of the day url
POTD=`wget -qO - ${PAGE[$N]} | \
grep File: | sed -e "s,.*href=\",," -e "s,\",," | cut -d ' ' -f 1`

echo ${PAGE[$N]}

# echo $POTDURL

# extract picture url
PICURL=`wget -qO - $POTDURL | \
grep Full\ resolution | sed -e "s,.*href=\",," -e "s,\",," | cut -d '>' -f 1`

if [ -n "$PICURL" ]
echo $PICURL

# get picture

# set picture as desktop background
dcop kdesktop KBackgroundIface setWallpaper $TMPFILE 8 # 8=Scale and crop
if [ $N -eq 1 ]
echo no PTOD found, fallback.
echo no PTOD found, no new wallpaper set.
echo wikipedia is unreachable, no new wallpaper set.
echo wallpaper already set to current. Resetting.
dcop kdesktop KBackgroundIface setWallpaper $TMPFILE 8 # 8=Scale and crop

Tuesday, November 14, 2006


Some of you may recognize the name Raymond Chen. He's a longtime Microsoft developer and a recognized expert on the Win32 API. It's his job to make sure that each new version of Windows is backwards compatible to the previous versions. Something he does extremely well and someone I admire.

I was reading his blog and happened on this entry.

After reading, my reaction was "Welcome to the world you helped create, Raymond!" Thinking about it more, that's not a fair statement, but I was amazed that he was unaware of what Windows users have to put up with. Or maybe he is aware but it just had never hit him so close to home.

Sure am glad that my computer is not 0wned by the PC vendors.

Bonus link just for grins: fearless.