You are currently browsing the monthly archive for January 2009.

#!, pronounced “Crunchbang” Linux is the newest addition to my Tablet PC that I am striving for. Crunchbang is a lightweight, stripped down Ubuntu derivative. I’m trying to get it to boot from SD; I’ve gotten as far as getting the bootloader to recognize it, but so far it’s hanging while “looking for the root filesystem.”

It’ll be pretty cool when I get it done though, and cutting the HD out of the picture for stuff like note-taking on the tablet should give me a huge battery boost. Expectations aside, there will be updates when it becomes a reality.

I wonder if there’s a market for OS-on-a-card, running for $20 a pop?

crunchbangsd

I think this would be pretty slick...

Update: Feb 2nd 2009

It seems my BIOS does not support doing this, and although I have /boot installed on my hard drive, launching Crunchbang from GRUB is proving very difficult. I can get the boot to start but it stalls while “looking for root partition” which makes me think I’m missing some driver module for SD.. but I’m unsure and the project might take longer than I had hoped. More updates to come if more success arises.

This is scary stuff. Some parts of the Bush Administration I’m more unhappy with than others, and one of my least favorite parts is the Department of Homeland Security. Check this out.

In short, a Dell customer found a hardware keylogger in his laptop, and when he asked the police about it they sent him to the DHS, and when he asked them, they said they were not obligated to tell him why it was there. What?

Combine that with Obama’s “civilian national security force” and 1984 might be very short in coming.

Obama’s speech, for those of you unfamiliar with it:

Actually, this is about Frets on Fire X:

fretsonfire

I can beat this one if I'm not taking screenshots...

Frets on Fire X takes the base that Frets on Fire built as an open source clone for PC and makes it awesome. You can get the game for Windows, Mac, or Linux from http://code.google.com/p/fofix/. It’s pretty slick but the download itself doesn’t include any music. However, if you head on over to http://geetarfreaks.webs.com they can hook you up with music from the games and their original note charts. The site is also full of great stuff like themes (make FoFiX look like Guitar Hero or Rock Band) and a tech center for ripping the songs off the games if you, say, find the game for sale used and don’t have a console, and feel uncomfortable about downloading the songs off the site for whatever reason. Disclaimer: The song downloads do seem to be in a gray legal area. The site is not distributing full copies of any copyrighted material, so I think this falls under Fair Use. However, if you get in trouble for this, it is in no way my fault. OK, now that I’ve covered my own hide:

First of all you’re going to need a guitar, and toysrus has one for $20 that works in Windows and Linux. I actually got mine on sale for $10 so if you hit up slickdeals.net you might be able to get it cheaper. That one is Red Octane too so it’s not a cheap knockoff; it’s a great guitar and it’s not expensive. The only drawback is the wire, but the wireless ones just aren’t worth $60+ to me.

See? It even says official.

See? It even says official.

In Windows you need to go to Google and find the Xbox 360 Controller driver. This guitar uses the same one.

In Linux the guitar is usually plug-and-play, but I had some issues plugging it in before booting. When you plug it in, the light on the guitar should be your only indication. Start FretsOnFire and go into Options->Controls. Start changing the controls and if you can select a control and press a button on the guitar you’re golden. If this doesn’t work, make sure the “joystick” package is installed on your distribution.

Now, if you did download some music from GeetarFreaks and you’re on Mac or Linux the music isn’t going to work, and it’s due to some naming problems. I’ve written a python script (make sure you have python 2.x and not 3k when you run this) that will take their .zips, rename them properly, and organize them. Other than that, follow their how-to. Here is the code for the script:


import string
import os
import zipfile
import shutil

def lowercase() :
        contents = os.listdir(".")
        for x in contents :
                if os.path.isdir(x) :
                        print "Entering " + x
                        os.chdir(x)
                        lowercase()
                else :
                        print "Renaming "+x+" to "+x.lower()
                        os.rename(x,x.lower())
        os.chdir("..")

def unzipall() :
        zips = os.listdir("./")
        for filename in zips :
                if (zipfile.is_zipfile(filename)) :
                        print "Unzipping "+filename
                        short = filename[:-4]
                        os.mkdir(short)
                        shutil.move(filename, short)
                        os.chdir(short)
                        unzip(filename)
                        os.chdir("..")
                        song = open(short+"/Song.ini")
                        for i in song.readlines() :
                                if (not i.find("Name")) :
                                        Name = i[7:-2]
                        song.close()
                        print "Renaming "+short+" to " + Name
                        os.rename(short,Name)
                        os.remove(Name+"/"+filename)
                else :
                        print "Skipping "+filename

def unzip(filename) :
        fh = open( filename , 'rb')
        z = zipfile.ZipFile(fh)
        for name in z.namelist():
            outfile = open(name, 'wb')
            outfile.write(z.read(name))
            outfile.close()
        fh.close()

unzipall()
lowercase()
print "Finished."

I had the wrong script up for the first day.
Apologies to anyone who tried to use it.

This is Python so make sure you keep the indentions. This is known to work in Windows (useful for the mass unzipping) and Linux, and possibly works in Mac OS X. To use:

  • Place the script in the same folder as all of the .zips you downloaded from Geetar Freaks.
  • In Windows, just put it in something.py and run it.
  • In Linux/Mac be sure to put it in a file named something and make it executable (chmod +x something.py), then run it. (./something.py).
  • Be careful with this script because it will keep renaming files to the same name but lowercase all the way up the directory tree, so if you put it in /home/ it will rename everything in /home/username/etc/etc/etc/etc but if you just put it in /home/username/etc it will only rename etc/etc/etc :P In that vain: Second Disclaimer: This script is provided as-is with no warranty or copyright (consider it public domain), and if it breaks your computer, that’s your problem, not mine.

Everything not covered here is covered in either the FoFiX howtos and/or the Geetar Freaks “Tech Centre.” This is just what I had to figure out on my own.

Wordy title..

OK so let’s say you’ve written a great backup script, backup.sh and it’s executable (chmod +x backup.sh) and you want it to run automatically when you plug in your external hard drive.

This is pretty hackish, but without learning udev or HAL scripting this is the easiest way to do this.

    • Place the script in your home folder.
    • Go to your desktop.
    • Right-click and choose ‘Create Launcher’.
    • Enter Backup for ‘Name’ and for ‘Command’ put the complete path to your script: ~/backup.sh
    • Choose OK.
    • Open a Terminal.
    • Type: "mv ~/Desktop/Backup.desktop ~/.local/share/applications/" without the quotes.
    • Plug in your device. When the dialog comes up, choose your application launcher.
    • Check ‘Always Do This.’

      Now, I haven’t tested this if you have more than one device with which you want to do this, so you might want to test if you have more than one of the same type of device (say, two USB externals) and you don’t want the script run on both of them.

      If You Want to Get An iPod Classic/iPod Nano 3G (Possibly 4G) Working, keep reading:

      If you’re in an Ubuntu/Debian derivative and the script needs to be run as root, just add ‘gksudo’ before your script in the ‘Command’ box in the launcher. If this is for your iPod, change the command above to "gksudo ipod-read-sysinfo-extended /dev/path/to/device /media/mountpoint" without quotes. You’re set. If you want to run a media player after this, you need to put the command just given to you into a script and add "&& your-favorite-music-player" to the end. Other than that, you’re all set.

      If you’re on a Fedora box, you have to set up a program called ‘consolehelper’ and the whole thing gets a lot more hackish. I ran into this on my desktop, and the Ubuntu users really have it easy as far as this goes. So here’s how to do this. Obviously, insert the commands without the quotes.

        • Do the above, except inside of “backup.sh” put "~/ipod-read-sysinfo-extended /dev/path/to/device /media/mountpoint && your-favorite-music-player"
        • Type "ln -s /usr/bin/consolehelper ~/ipod-read-sysinfo-extended"
        • Sign in as root.
        • Create a new file in /etc/security/console.apps/ called ipod-read-sysinfo-extended and insert the following inside:
          
          PROGRAM=/usr/bin/ipod-read-sysinfo-extended
          SESSION=true
          . config-util
        • Create a new file in /etc/pam.d/ called ipod-read-sysinfo-extended and insert the following inside:
          
          #%PAM-1.0
          auth        include     config-util
          account     include     config-util
          session     include     config-util
        • Double check to make sure that the command in your custom application launcher points to the symbolic link in your home directory at ~/ipod-read-sysinfo-extended and not at the one in /usr/bin.

          That should do it. Good luck, and be glad you didn’t have to do this the hard way.

          This is actually in Gnome; if you’re using KDE you’re out scout. This is one of those features that’s really easy to set and really annoying to un-set.

          I recently got an iPod and when I plugged it in to my desktop I was greeted with this lovely dialog:

          annoying_dialogOK, well, that’s kind of nice and user-friendly I guess but it was damn annoying so I chose ‘Open Rhythmbox Media Player’ and checked ‘Always perform this action’ and went on with my business.

          Well as you can see from my screenshot, I’ve recently started using Banshee, largely for the Mirage project which I’ll probably post on at some point or another. Well dammit, I’d checked ‘Always perform this action’ so now Rhythmbox opened whenever I plugged in my iPod. That is annoying. And it took me way too long to figure out how to disable this so I’ll save you the hassle.

          Open Nautilus. (On your taskbar Places->Home) Choose ‘Edit->Preferences.’ Choose the ‘Media’ tab.

          hiddenwellenough

          I figured the pepper brush was getting lonely in the GIMP.

          There. There it is. I know that the ‘always do this’ option is for ease of use or convenience or something but geeze they made the opt-out hard to find.

          I have a friend who is studying to be an Industrial Designer. As I spent quite some time in an Engineering School I have always been irritated at some of the designs I saw when I walked into his studio. In the Age of Apple, many of the designs strive to be simple, or “elegant,” and lose sight of what the object’s original function was. Today, he sent me this link. The following picture is the centerpiece of the page:

          There isn't even a mouse.

          There isn't even a mouse.

          This desk illustrates everything that is wrong with many Industrial Designers. It’s a cute little desk, and look, it has a useful shelf. The keyboard stows to save space. It’s simple and an eye-pleasing light wood and pictured in our Apple White background (which looks just like my home office). Oh but wait, there’s no mouse, or even a mousing area. And that chair looks like the punishment chair they give you in the 3rd grade when you won’t quit spinning in the chair during “computer lab time.” The desk is an ergonomic nightmare placing the user way below the monitor looking up and getting the crick in his neck of his life. And the only computer that could ever fit there is an iMac, and there isn’t even a hole in the back for its single cord.

          This desk is simple, elegant, and fails at being a competant desk. Someone needs to go back to school.

          screenshot1

          screenshot2

          Redressed my Tablet today. The htop and syslog are live on the desktop, “embedded” into it using the Tombuntu tutorial. The background was generated with the GIMP. Also shown is xchat, an IRC client, and Guake is at the top, which is a Quake-style pop-down terminal. It’s pretty neat; I’ve set it to be permanently translucent with Compiz…

          I haven’t ever done one of these themes with the system info on the desktop so I thought it’d be fun. We’ll see how long it lasts.. :P

          This was going to be a long post. It’s a complicated subject.

          But for now… http://www.studentsforacademicfreedom.org/news/2664/professors-indoctrinating-students-not-in-our-university

          I find that this article sums it up pretty well. Maybe it’s not apolitical enough or something but I think that it’s got the gist of the situation.

          Today the United States swore in a new president. There were celebrations that were lavish beyond all previous occasions and for about 24 hours before the inauguration there was hardly a channel on TV that wasn’t celebrating the end of the Bush regime and the beginning of the Obama Age.

          There was no longer any pretense of nonbias; it was a blatant celebration. Bush was undoubtedly the worst thing that had ever happened, a war criminal, and a delusional leader, and now Obama was coming to save us from ourselves. This is despite the fact that all of the aforementioned assumptions are opinions and not fact and hardly taken as a general consensus by the large part of the American public.

          This is combined with a general expression of hate and discontent for those who disagree, especially in academia. I know from personal experience that when someone said “I’m a Republican” they were met with looks and statements of disbelief and disgust. How could anyone be so stupid as to be a conservative?

          This is because Academia is liberal, and the reasons of that go far beyond what liberals assume. Liberals want us to believe that Academia is liberal because smart people are liberal. But Academia is liberal because of a much more complicated reason (I’ll write about that at some other time) and because of the browbeating that takes place.

          It is much harder to defend a conservative position than a liberal position. If a liberal says “should anyone have to sleep on the street?” and a conservative says “no,” and the liberal interjects “then we should provide welfare!” in order to defend the conservative position, the conservative has to launch into an extended explanation including market economics and always ends up sounding callous and uncaring despite the belief that fewer people will sleep on the street through his approach than through his opponents.

          Most of those picking a fight like this don’t have the desire to learn or the attention span required to understand, much less consider, the conservative’s line of thought. So they blank out. They stop thinking, they stop arguing, and move on with their lives.

          Now I don’t care what your political beliefs are. I don’t care if you love Obama or you hate him. If you love him, please, by all means, enjoy your victory. But know WHY you like him, know WHAT you voted for, and THINK about every issue you support or attack long and hard. Because there is no greater sin than the refusal to think.

          Maybe a racing stripe would look good? I’m not sure…

          toworkwith31