All posts by David Binney

Useful Mac Shortcuts

Taking screenshots

Command-Shift-3:                    Take a screenshot of the screen, and save it as a file on the desktop
Command-Shift-4,                    then select an area: Take a screenshot of an area and save it as a file on the desktop
Command-Shift-4,                    then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
Command-Control-Shift-3:    Take a screenshot of the screen, and save it to the clipboard
Command-Control-Shift-4,    then select an area: Take a screenshot of an area and save it to the clipboard
Command-Control-Shift-4,    then space, then click a window: Take a screenshot of a window and save it to the clipboard

Will add more as I discover them 😉

Viewing HSQLDB In Grails App

I have been looking over the net for a simple way to visualise the in memory data “hsqldb” of a grails app without moving to a real db to solve it. It turns out that grails has always had a built in visualizer/manager that can easily be started when you run up the dev environment. All you have to do is add these lines to the init function in your bootstrap.groovy file:

import org.codehaus.groovy.grails.commons.GrailsApplication
import grails.util.GrailsUtil
import grails.util.Environment

class BootStrap {

    def fixtureLoader

    def init = { servletContext ->

        String[] databaseManagerOptions = ['--url', 'jdbc:hsqldb:mem:devDB'];

        if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {

        if (GrailsUtil.environment == GrailsApplication.ENV_TEST) {

     def destroy = {

The difference is only really the import or environment and the two lines for the database manager swing component. After you do this you app will then load up the manager tool every time you run your app in development mode.

Ubuntu and Wireless Dropout

It had been a while since I had messed with wireless. But since I just brought a fancy new antenna, it was time to investigate some exciting new stuff. Well, as with most things I find exciting they usually end up costing me heaps of time :( .

Once I had setup the new antenna I wanted to have a look at the performance difference, which is a bit flaky from the network manager. But I noticed as I started messing with some commands something happened which was unexpected. I started getting the dreaded “wireless dropout” that occurs infrequently at about 20 second intervals just to piss me off. I tried to retrace my steps to find out what I had changed and ended up spending a whole day looking for the solution. It turns out that with the “cool” new commands that I had learned to do things like:

  • restart the network interfaces
  • lift the interfaces up and down
  • list other networks in my area and
  • finally, one to show the status of my own network

Even though it was nice to be able to type a few words and have the interfaces restart afresh I was leaning toward this being the problem. Then, I remembered that orignally when I was having these sorts of problems in the begining, I downloaded an app called Wicd! This was the solution for my problems orignally and funnily enough did the same again 😉 .

Well, there were some good things to come from this “journey”?? Not sure what they were, but here is a list of the commands that I found and are pretty handy! Also, remember Wicd might also be a simple solution for you?

Show status of “my” wireless interface: ‘iwconfig ath0

xxxxxxxx@HAL:~$ iwconfig ath0
ath0    IEEE 802.11g  ESSID:"xxxxx"  Nickname:""
          Mode:Managed  Frequency:2.442 GHz  Access Point: 00:xx:xx:xx:xx:8B
          Bit Rate:36 Mb/s   Tx-Power:18 dBm   Sensitivity=1/1
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=58/70  Signal level=-36 dBm  Noise level=-94 dBm
          Rx invalid nwid:52311  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Show list of all wireless broadcasts within range: ‘iwlist ath0 scan

xxxxxxxx@HAL:~$ iwlist ath0 scan
ath0      Scan completed :
          Cell 01 - Address: 00:xx:xx:xx:xx:8B
                    Frequency:2.442 GHz (Channel 7)
                    Quality=59/70  Signal level=-36 dBm  Noise level=-95 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    IE: IEEE 802.11i/Encryption here :)
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
          Cell 02 - Address: 00:xx:xx:xx:xx:78
                    Frequency:2.442 GHz (Channel 7)
                    Quality=28/70  Signal level=-67 dBm  Noise level=-95 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    IE: IEEE 802.11i/Encryption here :)
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK

Restart all network interfaces

xxxxxxxx@HAL:~$ sudo /etc/init.d/networking restart

Vpn setup using PPTP

A client I have been working on recently asked me to setup a Vpn for them to work remotely and still maintain security. Now I knew the definition of Vpn connections but had never needed to implement one. What I did know was that there are two main configurations: Microsofts PPTP and IpSec but that was about as far as it went 😛 . So I did some reading and it turns out that the fastest and most used is PPTP for remote connections. However, IpSec seems to be the obvious choice for bridging locations such as office_1 to office_2. The security features of PPTP are not that strong, due to the high level of abstraction before the encryption takes place. IpSec is a much lower and “raw” layer which has much stronger security features, but suffers on speed because of this.

In this case I will be only using remote connections, so PPTP “seems” the way to go?? Anyway, it seemed a sinch to setup the user connections on the “Billion 7404 Vgp(M)” having only to select username, pass and some default configuration settings like: Encryption type; session mode and timeout. At this stage I was thinking how easy 😉 . To my suprise it was not this easy!

In this case I was not connecting to the vpn using Win pc’s but Mac’s instead. Mac’s have a built in Vpn client that supports PPTP and IpSec connections under “Internet Connections”. This made it a lot easier since I did not have to install a client. So I opened the vpn client and tried to connect to the network and found that it would not connect?? This is due to a bug in the mac vpn client which does not support “statefull” connections ( Bug ID# 4581573).

So with this new info i went back to the configuration settings for the vpn and made sure the settings were :

  • Encryption Enabled
  • Force 128bit
  • Force Stateless

When I tried the connection again all was good and I was connected. However, there still remains some strange behavior. Once connected I cannot access the internet using the Vpn and I also cannot connect to the servers using names, but only IP’s. This is not a show stopper but it is a little annoying as the clients will only be able to do work without accessing the internet. To me this looks like a simple dns problem but I have no idea how to correct it. I have submitted a post to the billion forum and hope they will resolve the problem for me, but I will keep playing in the meantime to see what is going on.

I am also wondering if this is the same problem that I am having with my linux box? I can make the connection to the vpn network and ping/connect to the server, but I have no access to anything else on the network. I cannot ping any machines and connect to the smb shares. So basically I can do nothing when connected unless i use a mac. I have not had a chance to try a pc but will see if i can have a go next week to see what happens?

So my current status is: I got the vpn setup relativly easy and can connect using my mac but not my linux box; when connected I can access the shares using the mac but cannot access the internet and the linux box cannot do anything. So, hopefully billion lends a hand and tells me what I need to do to get this working sweet?

Skinning Ubuntu 7.10 Gutsy

This will just be a short topic on how to skin ubuntu and get it looking a little sweeter than the standard orange look. Basically, will find all that you ever need, including heaps of themes, wallpapers and icon sets at on gnome-look.

However, if you are like me and just download a theme for, in my case GTK 2.., and expect it to install, then get ready for a suprise 😛 . In most cases it was just a matter of opening “Appearance” under System -> Preferences -> Appearance, then dragging the theme tar-ball onto the theme section and away it goes. But if you are like me, then you may also want the icons that go with the theme to be applied as well? Some of the doco that I read suggested to copy the icon folder to /home/you/.icons. Then they would just show up in the appearance app under Customize -> icons. But every time I tried that nothing happened :( .

What i ended up finding was a few short commands that will get you started, at the very least:

    sudo apt-get install gnome-themes-extras

    sudo apt-get install gnome-extra-icons

    sudo apt-get install gdm-themes

Between these three commands you will be automatically provided with a new list of themes, icon sets and even login pages.

I can really take no credit for this find, as the instructions came straight from Kris at Geekybits. So a big thanks to chris for putting this together for us 😉

Strange Lurching In Defender

Well this seems to be an ongoing process and will probably end up making me replace everything! Just kidding, my current status for this problem is that I have already replaced the balljoint and bushes in the rear Aframe which has removed a lot of the backlash I was getting when changing gears. It also seems to have removed a little of the lurching when I slow then speed up again. A perfect example is when going over a speed bump it is real bad.

Anyway, continuing on, I have asked a lot of questions on forums for advice on this problem and it seems to be leading me to the next fix which will be the rear trailing arms. Supposedly, when these are worn it will allow the diff to rotate in the direction of the wear which will give a sensation of lurching. Well this sounds like a perfectly valid explanation so this is where I might go next. However, they do look new but how would I know 😉

I will keep you appraised of my progress!

Land Rover Diagnostics

I will start by telling you about the landy. I have a 1994 Land Rover Defender which was brought second hand about 1 year ago and I have trying to get it running sweet ever since.

The things that I would like to do are:

  • Give it a bit of sound proofing without being too pretty
  • Track down the reason for a strange lurching when getting off then on the “gass” again.
  • Remove the slight clunking that runs through the drive train when not being gentle with the clutch.
  • Upgrate the diffs to some soft of lockers :)

I have been using Land Rover Owner(AULRO) quite a bit for finding my information, or at the very least a starting point for my investigation. I will not include answers to these posts in this one to make it easier for people to find what they are after, so have a look at the answers to these posts by clicking the links in the dotpoints 😉

Mac’s serving Windows software

Recently I was asked to set up and network using OSX Server. This sounded like a fun challange considering I have never administered, and barely used mac’s before :).

Just to clear up the situation, the mac is file serving the quicken data file. The clients are using pc’s and the client install for Quickbooks to connect to the mac share.

Anyway, I will try to stick to the topic! I wanted to talk about something which appeared yesterday, when the Quickbooks Premier install/file share sitting on the mac server started to give the customer headaches. It started with the Quickbooks clients locking up and not allowing the users to log. Well, I went about checking the perms on the data file and access rights on the clients but could find nothing wrong. So, I started googling, then discovered that Quickbooks uses the client “service” to manage user connections. This meant that I would have to install Quickbooks on the mac server :(.. At first I thought that was bullshit/sucked but then I had the idea to try “VmWare Fusion”.

What I ended up doing was installing vmware fusion on the server and a fully patched install of xpsp2. It was set up in bridged mode to allow the pc’s in the workgroup to see shares and connect to it via ip/name. Then I just preceded to move the quickbooks data files to the vmware instance of xp and created sim links on the server, so the clients would be transparently redirected to the new vmware files. Then somthing amazing happened.. it actually worked…weee

Well, now that has enlightened me to other prospects that you could use this same methodology on any non windows server for any software. The only downside would be a little performance lag, but that is better than not working at all 😉

Running Scribes as root

For a little while I had a painful time in getting the text editor scribes to run as root. You are probably wondering why i would want to run the text editor as root, but when you cant be bothered using vi or gedit and would like some pretty code highlighting then that is what you need to do. Anyway, as you may know I am running Ubuntu 7.10 Gusty and it is going “pretty” well for the most part. So the objective i wanted was to be able to launch scribes from the shell then have it edit my “whatever” configuration files. The problem that i was having looked somthing like the following :

binneyd@HAL:~$ sudo scribes /etc/fstab[sudo] password for binneyd:Traceback (most recent call last):  File "/usr/bin/scribes", line 38, in    main(argv[1:])  File "/usr/lib/python2.5/site-packages/SCRIBES/", line 45, in main    __open(uris)  File "/usr/lib/python2.5/site-packages/SCRIBES/", line 58, in __open    __open_via_dbus(uris)  File "/usr/lib/python2.5/site-packages/SCRIBES/", line 76, in __open_via_dbus    dbus_service = __get_dbus_service()  File "/usr/lib/python2.5/site-packages/SCRIBES/", line 109, in __get_dbus_service    from info import dbus_iface, session_bus  File "/usr/lib/python2.5/site-packages/SCRIBES/", line 34, in    session_bus = SessionBus()  File "/var/lib/python-support/python2.5/dbus/", line 218, in __new__    mainloop=mainloop)  File "/var/lib/python-support/python2.5/dbus/", line 107, in __new__    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)  File "/var/lib/python-support/python2.5/dbus/", line 121, in __new__    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

After quite a bit of searching i found out that the Scribes application does not like to be run as root and will, not very gracefully, fail if you try to do it. So, you need to bypass this problem by using the dbus launch and away you go eg. :sudo dbus-launch scribes /etc/fstabThis was a little ugly of a solution so i just cleaned it up with an alias and that is about it.alias suscribes=’sudo dbus-launch scribes’So hope this helps and saves you some time as well 😉

CD ripping with ubuntu – fiesty

At the moment i am attempting to rip a cd to mp3 format. As a new user of Ubuntu i am not that familiar with all of the apps and packages that you need to effectively use this system but for some simple tasks like this, it does seem a little more difficult than it should be.

Anyway, i have tried a few apps so far like soundjuicer, songbird and amarok. i am trying to make it work with amarok because i would like to not have to use multiple apps to do common tasks like audio. When using amarok and trying to import the cd tracks into the library via right click, all i get is some grayed out options which is not much help. However, I will keep looking for a solution to the amarok problem and will provide an update when i find one??

Well after some messing around with packages and other crap like that, i have given up on the idea of using amaroK to do the ripping and moved to soundjuicer. It does seem to do the job but is extremely slow to the point of sleep, and does not seem to have even gotten track names or any of the correct information. Uuuumm, it turns out that there is more to track information than i originally thought.

What seems to happen when you insert a disk, is that the track lengths and number of tracks are sent to one of many online directories eg. cdda and there the cd information is compared against a database to see if there is a similar cd available. Now, considering that there will not be a similar cd, because this is a custom one, it will find no results. This will leave you with a cd full of songs and no associated information, which sucks. Anyway, it turns out that you can upload the newly created cd, using iTunes to the appropriate online directory and then move to the new computer where the track information will be grabbed. Definitely, not an ideal solution but it is late and i am getting annoyed. Another alternative is: If you have a friend who has a mac, you can use a script CD Text to CD Info v1.2″ to apply the tag information to the songs before they are burnt or imported. This means that when you go to import/record the disk you will be able to grab the track information automatically which is a lot better of a solution.I know that this is not a solution for ubuntu but i have given up for the moment in hope that someone else can shed some light on a better alternative.