Thursday, May 23, 2013

Move the window controls to the left in Chrome on Ubuntu

I regularly switch between using Mac's and Linux machines at home and at work and as such I like to keep my window controls consistent across machines.

My home machine is a Mac running OSX 10.08 and my work Laptop runs Ubuntu Linux 13.04 with Gnome Shell. Both of these desktops have their window controls on the left in the same order:

OSX 10.8

Ubuntu 13.04 + Gnome Shell

This is all nice and harmonious until I install my preferred browser, Google Chrome, on Ubuntu. Chrome places its window controls on the right as per the MS Windows layout. 

Google Chrome + Ubuntu 13.04 + Gnome Shell (Default)

To resolve this you can change the default configuration exposed by Chrome by entering the following command at the terminal:

$ gconftool-2 --set /apps/metacity/general/button_layout --type string "close,minimize,maximize:"

To re-load the configuration you'll need to start a new desktop session (log out or restart). Once this is done your chrome window controls will fit in with the rest of your system.

Google Chrome + Ubuntu 13.04 + Gnome Shell (Modified)

I know I'll want to do this again some time and am writing this here for my own reference, hopefully someone else finds it useful also.

Friday, March 1, 2013

Discover how much memory is installed in OSX from the terminal

Today I was sitting SSHed into an OSX box and needed to know how much RAM was physically installed in the machine. Top of course told me how much RAM was in use however finding the installed RAM took me a few minutes longer than I would have liked.

So this is a note to myself for next time, use the following:

trastle$ system_profiler |  grep -A 9 "BANK [0-9]/DIMM[0-9]"
        BANK 0/DIMM0:

          Size: 2 GB
          Type: DDR3
          Speed: 1333 MHz
          Status: OK
          Manufacturer: 0x80AD
          Part Number: 0x484D54333235533642465238432D48392020
          Serial Number: 0xDEADBEEF

        BANK 1/DIMM0:

          Size: 2 GB
          Type: DDR3
          Speed: 1333 MHz
          Status: OK
          Manufacturer: 0x80AD
          Part Number: 0x484D54333235533642465238432D48392020
          Serial Number: 0xDEADBEEF

Have fun!

Wednesday, February 27, 2013

Raspberry Pi + Weather Station = A bit of fun

Over the past six months or so I have been working on a new release of the UK Met Office's WOW service. It's been a fun project so when my Dad's birthday rolled around earlier in the year I decided the best way to show him what I was working on was to give him a weather station and hook it up to WOW.

In the end I bought him a USB weather station and a Raspberry Pi and hooked the two together to upload data to the web. I have finally gotten around to writing up some instructions for the project and have posted them on github along with a couple of bash and udev files to make the process easier.

For anyone who is interested in using a Raspberry Pi to upload data from their USB weather station the instructions are here: http://trastle.github.com/rpi-weather/



Enjoy.