Skip to content

Home

Mac OS X 10.5 (Leopard) on a PowerBook G4 12”

I briefly wrote an entry about how getting VLC to be your default DVD-playing application, and how to get it to start viewing a DVD you’ve inserted automatically. I even mentioned that I had installed Mac OS X 10.5 (Leopard) on my Powerbook. I’ll go into further detail about that. The installation went okay, BUT, it took ages. One and a half hour perhaps, and I was tempted to reboot to see if starting the process all over again would do it good. But one thing did occur to me during the installation – it was 9G with data that was being installed. Not your usual stripped 150MB installation of Debian, eh. So I waited, and waited. And finally it was installed. I actually think my PowerBook was handling Leopard smoother than Tiger. But it’s probably all in my head. The specifications for my Powerbook G4 12?; 1.5Ghz processor, 512MB RAM, 75G disk (just about), you know, a pretty standard Powerbook. I even ordered 1G memory for the Powerbook yesterday, and it’ll hopefully be arriving today, working miracles with my machine. Now, having said that Leopard is working fine so far, the native DVD-playing software isn’t. In fact, by running the application I’m guaranteeing myself a reboot – really. It locks up the PB so bad, waiting ages doesn’t really help. So what I did was that I just uninstalled the software, along with iTunes and some other crap I didn’t need, downloaded VLC and set that as my default DVD playing software. You gotta love VLC. I haven’t really tested heavy applications on the PowerBook, as I use it as a work/media computer. That means having Terminal, SSHKeychain, Safari, Adium and VLC up and going. Working great so far. Now to see how long it lasts. ;)

Mac – Play DVD automatically on insertion in VLC Media Player

So I’ve installed Mac OS X 10.5 on my PowerBook G4 12?, and it’s working quite well so far. Until the native DVD-playing software went haywire that is. Needless to say, I turned to VLC. Now the problem is getting VLC to automatically launch and start playing the DVD when a DVD is inserted. Here’s what you do. Open up the program Script Editor, and place the following in there:

tell application "VLC"
OpenURL "dvdnav:///dev/rdisk1"
play
next
end tell

Save it, and close the application. Now go to System Preferences -> CDs & DVDs and when pressing When you insert a video DVD, select Run script… and just use the applescript you just made. Voila, it works!

Simple directory listing script

<?php

/*
 *   Dili 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 2 of the License, or
 *   (at your option) any later version.
 *
 *   Dili is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with Dili; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
********************************************************************************
 *  
 * This is the Dili (DIrectory LIsting) script v0.0.1.
 * Place the index.php in the directory you want listed, simple as that. :)
 *  
 * Jorge Barrera Grandon 
 * Atlantiscrew 
 *
 */

$title = basename(dirname(__FILE__)).'/';

        echo '';
        echo '';
        echo '';
        echo ''.$title.'';
        echo '';
        echo '';
        echo '';
        echo 'Directory listing of '.$title.'';

        $dir = opendir(".");

        while(FALSE !== ($file = readdir($dir))) {
            if($file != "." && $file != ".." && $file != "index.php") {
                $myFiles[] = "$file";
            }
        }

        closedir($dir);
        sort($myFiles);
        reset($myFiles);

        foreach($myFiles as $value) {
            if (is_dir($value)) {
                echo '[d] - '.$value.'/';
        } else {
                echo '[f] - '.$value.'';
            }
        }

        echo '';
        echo '';
            echo '';
                echo '';
            echo '';
            echo '';
                echo '';
            echo '';
        echo '';
        echo '';
        echo '';
?>

How to display UTF-8 in your Putty bash shell

My girlfriend was having some problems displaying the correct characters while talking on IRC through irssi, and putty. Eventually I came to the conclusion that it wasn’t my server or irssi that was configured badly. Searching the internet I found this:

echo -ne 'e%Ge[?47he%Ge[?47l'

Simply put that into your .bash_profile or .bashrc and relog to your server. It’s a collection of terminal escape codes that together means ESC %G – “switch to UTF-8”.

Quake Wars and switchscreen

Still being thrilled about having gotten my 22” monitor, after 2 years of nagging (I need to emphasize that I’ve spent TWO years nagging my better half about a damn monitor. Did I mention I spent 2 years?), I briefly spoke to a co-worker of mine about having nothing to play after I quit World of Warcraft. He said that he’d heard about a game called Quake Wars, and that it had a Linux-client. So I took a look at it, downloaded the demo, and now I’m hooked! Not as much as before, but it’s fun nonetheless. Anyway – playing the game with a 1680×1050 monitor resolution is INSANE! I can just about feel a grenade blowing up in my face. We’re about 3 people at work planning on making a clan, so we just need a few more to make it work. And I am definitely going to buy the full game tomorrow! For more information about Quake Wars, take a look at http://community.enemyterritory.com/.

Right, that was that about Quake Wars. Now to my next subject – a nifty little program named switchscreen. A quote from the website:

switchscreen is a command-line utility that moves the X mouse cursor to a given point on a given screen. I wrote it because I could find no other program that can define both the mouse position and screen number.

In other words – you can use your keyboard to navigate between your two monitors instead of your mouse! I find it to be a wicked program that I just had to mention. ;)

Update: I forgot to mention yesterday (as I’m typing it’s the 29th) that I nearly got bald and (even more) nuts by not being able to find the “x-devel-” package for SuSe, being that we need libx.h to make switchscreen work. Just fire up YaST and search for xorg-x11-devel, and there you go!

Create a DVD with growisofs

#!/bin/sh

# Create an AUDIO_TS subdirectory if it does not exist
[ ! -d AUDIO_TS ] && mkdir AUDIO_TS

chown -R root:root AUDIO_TS VIDEO_TS
chmod 500 AUDIO_TS VIDEO_TS
chmod 400 VIDEO_TS/*

growisofs -dvd-compat -Z /dev/dvd -R -J -dvd-video .

Mount iso

mount -t iso9660 -o ro,loop=/dev/loop0 /var/tmp/some.iso /mnt/cdrom