Torchure for Android

Ever found yourself in need of a torch, but only had your phone handy?  Look no further!

Torchure (for Android) is a pretty simple application.  It turns the screen white and, as default, whacks up the backlight to maximum.  I did say simple, didn’t I?

However, it also lets you change that backlight brightness (useful if, say, you’ve been to a particularly wild party and you need to step over some people without waking/blinding them) and lock it so you don’t go accidentally changing it.  Torchure is designed to work for you, not make you work for it!

It marks my first release on to the Android Market, and it requires no permissions whatsoever — it is a torch, after all.

Even though Google is telling me this link will not work, go check out Torchure on the market now!

And if you’re not using an Android handset, AndroidZoom has you covered until Google release their updated Market.

NB: The link does work (on Android 2.2). Guess they forgot to update the documentation.

Desperate Struggle

Update 16:41: Re-uploaded the photo as I’d stripped the EXIF data by accident.

This is less a super-amazing photo I’m proud of, and more just here for the duckling factor.

Can you argue with that?  Really?

Anyway, here’s a photo of some ducklings (naw) climbing over a sleeper on the River Thames trying to get back to their mother.  You’ll be glad to know that they all made it!

That reminds me, I should get around to completing No More Heroes

For once, the photo has been edited with increased contrast, saturation, and a big crop!  Fancy that.

BeetleSpider

Nature’s accumulated too many costs recently, so it’s consolidating many of its species in an attempt to rein in expenditure.  First up is this BeetleSpider, with the legs and spinnerets of a spider, plus the body of a beetle!

…  Otherwise known as a Walnut Orb Spider, commonly found outdoors in the UK.  Not that I can remember seeing one!

As always, unedited except for a resize for your internet viewing pleasure.  I probably should have changed the white balance, but you can call me Crazy.

My Personal Ninite Installer

This is basically for my own future reference, but the last few Windows installs I’ve done I’ve used Ninite to install most of my favourite software — easily and quickly!

If you’ve yet to discover it, check it out!  Or if you’d rather just install software other people recommend wihout thinking, you can install my particular favourite software loadout.

Update 15:42 UTC+0100: Just a couple of things that I should mention about the Ninite installer:

  • All programs install with a desktop shortcut, which I don’t use.
    • They’re very easy to delete, mind.
  • Skype is set to start on Windows start up.
    • This is easy to change on Skype’s log in screen, or using Autoruns below.
  • Steam is also set to start on Windows start up.
    • Change this by logging in and disabling it in the Interface tab of the Steam > Settings window, or using Autoruns below.
  • Java constantly runs its update scheduler (jusched.exe).
    • Use Autoruns for this one.

The latter three can be easily fixed by downloading Autoruns and deleting their start up entries from the list.  Just don’t go too crazy in Autoruns, as you could cause Windows to stop booting etc. etc.

Update 2010-07-30: My new personal Ninite installer, to reflect new software being added to Ninite!

Supreme Commander 2 Hidden Objectives List

Update 2010-03-26: Missed “Master of Pawns” hidden objective off of Cybran mission 6.  Added it.

Trying to find and complete all the secret missions in SupCom 2?  Here’s a quick and dirty list of them all!

This information is copied from the map files within the SupCom 2 directory.

Feel free to copy and paste — a link back to this page would be appreciated!

The List

UEF

  • 1 – Prime Target
    • Survivor
      • Survive the initial wave of Cybran attackers without losing any units.
  • 2 – Off Base
    • Economic Opportunist
      • Build at least two Mass Extractors in enemy territory.
  • 3 – Strike While Cold
    • Master of the Seas
      • Build an Atlantis II Experimental Aircraft Carrier.
  • 4 – Titans of Industry
    • Brutal Conqueror
      • Defeat Coleman without the aid of the Fatboys.
  • 5 – Factions or Family Plan
    • Experimenter
      • Build at least four Experimental units
  • 6 – End of an Alliance
    • Nuke King
      • Launch your first nuke.
    • None Shall Pass!
      • Prevent any enemy King Kriptors from crossing the main fortress bridge.

Illuminate

  • 1 – Delta Force
    • Blockhead
      • Prevent the blockade from taking more than 25% damage.
  • 2 – Lethal Weapons
    • Master Tactician
      • Complete the operation by constructing fewer than 30 mobile units.
  • 3 – Back on the Chain Gang
    • Not the Bees!
      • You have successfully taken over the enemy air defenses.
    • Pro Anti-Air
      • You have successfully taken over the prison’s defensive structures.
    • Agent Provocateur
      • Capture all of the Security Stations.
  • 4 – Steamed
    • Experimental Fanatic
      • Build at least eight Experimental units.
  • 5 – Cliff Diving
    • Supremest Commander
      • Reach the highest level of veterancy with your ACU.
  • 6 – Prime Time
    • Bot Lord
      • Complete the operation with an army made up entirely of Assault Bots.
    • A Czar is Born
      • Build your first Darkenoid.

Cybran

  • 1 – Fact Finder
    • Survival Expert
      • Survive Gauge’s onslaught after the download completes.
  • 2 – The Trouble With Technology
    • Master Thief
      • Capture a Rogue Engineer.
    • Great Escapist
      • Complete the operation without a unit being captured by the enemy.
  • 3 – The Great Leap Forward
    • Cache and Carry
      • Collect all of the Technology Caches.
  • 4 – Gatekeeper
    • Sultan of Soul
      • Build at least four Soul Ripper Experimentals.
  • 5 – Surface Tension
    • Master of the Deep
      • Build a Kraken Experimental Submarine.
  • 6 – The Final Countdown
    • Research Savant
      • Complete all available research.
    • Master of Pawns
      • Win the operation without the aid of any Experimentals.

Gnome Power Manager Hides Do Nothing

Found this rather handy post that tells you what to do in newer versions of Gnome Power Manager, which for some reason hide the Do Nothing options as default.

Personally I find it irritating as the battery readout in all the distros of Linux I’ve used on my Eee report the battery at 0% over half an hour before the battery is actually dead.  No amount of conditioning or software modification seems to fix it, so I’m living with it.

However, with the newer versions of Gnome Power Manager, Do Nothing is hidden!  So my machine would go to sleep, despite the fact I know there’s at least 30 more minutes of battery life going to waste.  So annoying!

To fix it (albeit temporarily), you need to edit the gconf values for the settings you’re interested in to “nothing”.

The easiest way to do this is to use an application like gconf-editor and edit the values through that:

  1. Run gconf-editor.
    • If you don’t have it installed, go to your favourite package manager and install it through that.
  2. Using the column on the left side, navigate to apps > gnome-power-manager.
  3. In my case, I wanted to change the critical battery behaviour to Do Nothing.  So I navigated in to actions and set the value of critical_battery to nothing.
    • If you want to change, say, the behaviour of a power button press, navigate to **buttons **instead of actions.
    • Repeat this step for each value you want to change.
  4. Close gconf-editor.

That’s it!  One thing you need to keep in mind is that if you later change the setting away from Do Nothing to something else, the Do Nothing option will disappear.

Hope this works for you as it has me.

(I’m typing this post with 0% battery left!  What I crazy daredevil I am.)

Update 19:58: Forgot to mention that Do Nothing will disappear if deselected.  Fixed.

Introducing BitButcher — An Open-Source NDS ROM Trimmer

I’ve always wanted to make a software headline like that.  Eee!

Welcome to BitButcher, a small program designed to do one thing and one thing well: trim Nintendo DS ROMs.

I got a bit fed up of the ones already out there, most because they were either closed-source or they had bad GUI design combined with clashing backgrounds.  Search as I may, I couldn’t find anything that fit my demands.

So I did what any self-respecting programmer would do — code my own!

This program is rather simple, but it’s designed to be just that.  Oh, and fast.  Very fast.

Trimming the excess fat off of DS ROMs isn’t exactly a hardest task in the world, but I figured that people would still be interested in what I have made.  As such, I have made the code entirely open-source under GPLv3.

It’s coded in Java, meaning I get cross-platform support for free!  It is however command-line only, so don’t expect any amazing GUI.

If you want to get hold of the program, or would like to help contribute to a better trimmer, then just head over to GitHub:

http://github.com/XanderXAJ/BitButcher

Any help improving the program would be welcome and awesome.  In addition, you can also report any issues you have at GitHub, on the Issues tab.

That’s it for this time — hope you manage to shave off some bytes!

Take Control of Your Settings: Configuring Synaptics Touchpads and Making GNOME Respect Them

Update 2010-05-28: If you’re using Fedora 13, then the configuration for synaptics touchpads is done through what is practically the old xorg.conf method. (This is as udev now handles devices instead of HAL.)  Check out the Fedora Wiki for more information.

The Problem

Today I’ve been trying to configure the touchpad on my Eee PC 901 to my liking.  It’s a Synaptics touchpad, and supports tracking multiple fingers, and I wanted to take more advantage of that.

GNOME does have support for configuring multiple finger gestures out of the box, with gnome-mouse-properties (or System » Preferences » Mouse) and then selecting the Touchpad tab.  This is all good and works fine — if you’re satisfied with what GNOME gives you.

Unfortunately I wasn’t.  When you enable clicking on the touchpad, GNOME sets one finger taps to left-click, two to right, and three to middle.  I tend to use middle-click more often than right-click, thanks to browsing the web and liking making new tabs, plus I already have a dedicated right-click button.

So I set off to change it.  After reading material courteousy of Arch Linux’s wiki, I found (and remembered from attempting the same thing ages ago) that configuration is done through the HAL using fdi policies, which are just specifically formatted XML files.  (The old xorg.conf way is deprecated and isn’t as flexible, not that it matters for configuring the trackpad.)

It sounds scary and involves more typing, but in the end it’s just as simple a process as it used to be, even if it involves jumping through an extra hoop or two.

Configuration

First you have to create a file with the fdi extension in /etc/hal/fdi/policy/.  I’ve named my file 99-synaptics.fdi, following example from /usr/share/hal/fdi/policy/10osvendor/, but you can name yours whatever you like.

Note: You need root permissions to be able to create and edit this file.  If you run Ubuntu (or are in the /etc/sudoers file), this can be accomplished using the sudo command as shown above. You can use whatever editor you like, too. vi, emacs, nano, kate

Once the file is created, it’s time to get messy!  The fdi file contains a match rule, which tells HAL which device you want to configure, and then a series of merge rules which apply your desired configuration into the HAL.  The easiest way to show this is by example, so here’s my prospective configuration:

`

synaptics true true 1 2 3 1 3 2 `
Starting from the top, here’s a quick description of each part:

  • The <?xml part is the XML declaration required in any valid XML file.  Nothing interesting here.
  • The and <device> are just boilerplate code that tell the HAL to expect rules relating to devices. Again, nothing interesting here.
  • Now things start getting good!  The line describes how to find the device you want to configure:
    • Simply put, the HAL searches for the contains string inside the key field.  Whatever matches that search it’ll apply the merge rules to.
    • There are other ways to match aside from contains, but this is all you need to know to get things working.
  • The lines are the meat of the file, describing each and every configuration change you want to make.

You’re probably thinking this is all good and well, but how did I come up with this stuff in the first place?  Well, the answer lies in the HAL itself.

The lshal command lists all the devices the HAL can detect (that’s “ls hal”, get it?).  You might want to pipe the contents to less, to be able to scroll and search through the large amount of text that’s returned:

In less, type /synaptics to search for the string “synaptics”.  less should automatically scroll to the point we’re interested in; your touchpad.  If it cannot be found, you either don’t have a Synaptics touchpad or the synaptics driver isn’t being loaded.  Try **searching for Touchpad **or similar words, but anything more than that is beyond the scope of this article.

Once you have found the device on your list, you’ll be able to see a list of keys and their values.  You want to pick one of these fields that will not change between boots to place as the match rule inside your fdi file.  I chose info.product, but you can choose something else like input.product if it strikes your fancy.  Either way, fill in the <match> line with the key that you chose and the string that’ll match it.  Ideally this search will only match your touchpad and nothing else.

Next is the fun part — configuration. To do this simply open up the man page for synaptics:

This’ll give a detailed list of everything that can be changed within the synaptics driver.  For each value that you want to change, find its name on the manpage, and add a new merge rule with the appropriate key.  Note that every key in the fdi begins with “input.x11_options.” followed by the synaptics key you want to change.  (The exception to this in my file is the first merge rule, which just makes sure that the synaptics driver has been loaded for my touchpad.)

If you want to test an option before making it permanent, use the synclient key=value command, filling in key and value with the option you want to change.

Once you’ve added all the merge rules you like, close all the tags and save the file.  Now just restart the HAL (or your computer) and your settings will be applied.  Almost.

GNOME Respect

Now that you have your configuration all set up, you need to stop GNOME from changing your carefully crafted settings to ones of its choosing.

To do this, simply run the following command:

If you get cold feet and want to enable GNOME’s control over mouse and trackpad settings, run this command:

That’s really it.  Thanks to jan for finding this value.

I’ve written this to be as generalised as possible, so it should work for many different distros so long as they are using the latest HAL/Xorg/kernel.  I’m running Fedora 11 and have added my name to the /etc/sudoers file, allowing me to run sudo.

If you have any questions or just want to say thanks, feel free to leave a comment or contact me!

Stop Exact Audio Copy Crashing on Windows 7

When I tried to rip a disc using Exact Audio Copy on Windows 7 x64, I found it kept crashing as soon as the rip tried to start.  Bummer.

Remembering the previous times I’ve used EAC, when you click a button to start a rip, it asks you where you want to save the ripped files.

Turns out if you set EAC to save into a predetermined location instead of asking, EAC manages to rip perfectly fine!

So, here’s a step-by-step guide to stop it crashing:

  1. Open Exact Audio Copy.

  2. Go to File > EAC Options.

  3. Click the Directories tab.

  4. Instead of “Ask every time”, choose Use this Directory, and pick a directory of your choosing.

    • I personally use:
  5. Click OK.

That’s it!  Good luck.

Delete Songs From Smart Playlists in iTunes

Update 2009-11-23: Corrected Mac keyboard keys.  I don’t own a Mac myself, but a friend of mine tells me that iTunes defies the normal behaviour of many other Apple applications. Probably because it’s ancient and desperately needs an update.

Made a smart playlist to find songs you want to delete, then found that the delete function no longer works?

Just hold Shift. Or Option.

Pressing Shift+Delete on Windows or Option+Delete on Mac will give you a prompt to delete songs just like any other delete operation performed in the library.

Holding Shift on Windows or Option on Mac and right-clicking on one or more songs will show “Delete” in the context menu.

As an aside, this shortcut also allows you to delete songs from static playlists as well.