Archive for December, 2008

Ubuntu: Show Directory Names in Bash


This is a very short tip.

I made a small shell script to delete and create a link to my localhost htdocs directory. That way, I never have to move my projects around, I just keep them in separate directories under one main directory.

The problem comes when I forget important things: such as directory names. Instead of just typing ls /projects, I want the script to tell me the options I have.

And so, this little code is born, by not giving the script any arguments:

	if [ -z $1 ]
		echo "No valid user was provided!"
		echo "Possible users:"
		declare -a FOO
		let count=0
		let count2=0
		for d in $( find /projects -maxdepth 1 -type d -printf "%f " ); do
			if [ $count2 -gt 0 ]
		echo ${FOO[@]}

Note: I did it this way because otherwise you get “projects” in the list of results.


Ubuntu: Intrepid Ibex “breaks” the random wallpaper script


I posted the random wallpaper script a couple of months ago, and some time after that I upgraded my system from Hardy to Intrepid, and found out the script wasn’t working.

Since it was not something important to me, it took me a while to start searching for a solution.

The problem is not a bug, it’s a change made to gconf.

Fortunately, someone was able to find a workaround to those changes. It only involves creating a shell script, setting it to start every time you log in (it will create a file called .Xdbus in your home path), and then you modify your crontable so that the .Xdbus file is called before your script.

Once you log back in, you should see the wallpaper being changed again! :D

Ubuntu: Get VisualBoyAdvance fully working with Wine


If you miss VisualBoyAdvance’s cheats systems (GameShark, CodeBreaker/ActionReplay, and the memory editor) and you really don’t want to use Linux-based ports because they lack this feature, you’re in luck!

Let’s see the versions:

Wine (development version): 1.1.10
VisualBoyAdvance: 1.8.0-beta3 (more…)