Tag Archives: linux


>Been around the distributions recently and currently loving PinguyOS. As an aide memoir to myself, if you want to remove the notifications when pressing the caps lock key (which I do, as I’ve mapped that key to control), rm /bin/lock_keys

Thanks to the helpers on #pinguyos on freenode for the advice.



Why is it so hard to print? I have a bog standard HP Photosmart C4180 here running on an XP machine. It is shared as a windows printer.

  • Jaunty works 95% of the time. Sometimes it just stops and wants a restart before coming back to life.
  • Windows 7. Works about 50% of the time. Sometimes just nothing happens. The Windows 7 machine will sometimes think everything is fine but nothing appears on the XP machine. Sometimes it will just hang. Sometimes it will print. Usually a reboot will help.
  • Mac OS X Snow Leopard. Had to resort to the CUPS interface (http://localhost:631) just to get it to see the printer. Now seems to be working. Seems to be.
  • Son’s XP machine. Prints around 70% of the time. Same symptoms as the Windows 7 machine when it doesn’t print.

If you want to blame the XP machine, last week it was being driven off a Samba machine instead with the same issues. Everywhere I go I have the same experience. Just walking into our office and hitting the print button and having something print out feels like an extraordinary experience. I have no idea how it feels if you manage it two days in a row.

>Welcome from the MacBook Pro

>It arrived a day late and is looking pretty cool so far.

So I’m typing this with MarsEdit first of all to see how I get on what that.

What have I noticed about the new machine. Some random comments made in no particular order. Here’s the low down on the specs of the Machine.

Model Name: MacBook Pro
Model Identifier: MacBookPro4,1

Processor Name: Intel Core 2 Duo

Processor Speed: 2.4 GHz

Number Of Processors: 1

Total Number Of Cores: 2

L2 Cache: 3 MB

Memory: 4 GB

Bus Speed: 800 MHz

It has a 250GB hard drive, 5400 RPM

I’ve been through a number of laptops in the last couple of years. I had the MacBook which replaced my old iBook and died a horrible death. Which was replaced by a Sony Vaio VGN-FE41Z. And I’ve also been running the Dell Inspiron 630m which I think become my second favorite laptop ever, just behind the 12″ iBook before it too popped it’s clogs. So maybe over three years I’ve had five major laptops – running a mixture of OS X, Linux and Windows (XP and Vista).

I had a bit of a epiphany regarding laptops a short time ago. Because even though I was loving Hardy Heron on the Dell I realised that linux laptop compatibility is a lottery – unless you get one with Ubuntu preinstalled which limits somewhat your choice of machines, trying to get all your laptop features running can become something of a fulltime job. Even on the Dell resume/suspend didn’t work (although it did under Gutsy 95% of the time – I suspect I tweaked something in the past which I’ve since forgotten). So upgrades are exciting times with new treats and old ones sometimes taken from you. The Dell 630m was great but even it was showing it’s age. I was plotting what to replace it with and was thinking of something like my last week’s Vista setup but on a much nicer spec machine. You have all the drivers provided, suspend works, you can buy some crappy bargain bit of hardware not wondering if you’ll ever be able to use it. So if the “X Server, VMWare” trick works and you can use Ubuntu easily within a windows environment it makes sense to go the Windows route.

Because the only other option is the Apple route and I swore to the gods I wouldn’t give them my money again until they sorted out their production process … i.e. I won’t buy a MacBook until they start making them reliable and resilient. We’ve bought so many of them and had so many problems and the Apple Care they provided wasn’t much use either because you have to sit there arguing that, no, you didn’t crack the front casing of it and this is a problem that thousands of others have suffered from. And they still don’t believe you. And why don’t we just buy Dell’s instead because you can get cheap accidental damage cover with that. And actually Vista is not that ugly. It’s quite nice. But it’s slow. And not very reliable. And 3GB of RAM is about your max. Oh and Steve Balmer.

Apple are evil. Microsoft are evil. Ubuntu are not evil (or at least, if they are, they’re keeping it quiet so we don’t feel bad about using an evil os). But we have to use evil hardware with the good software and maybe something won’t work properly. Hmmm … Apple.

Am I rambling?

Anyway, on the spur of a moment decision I went back to Apple. I bought a MacBook Pro because I was not aware of them suffering the same monumental build quality issues as the MacBook. It’s a Unix based laptop. It has a great screen and a great keyboard. It has good battery life. It’s fast. I was in Japan when the other laptop died and I could easily get a US keyboard and a worldwide warranty. I love OS X.

I’ll blog a bit shortly when I have my same Ubuntu VMWare setup up and running. I’ll blog a little bit later, maybe in a couple of months, when I’ve worked out whether this is really changing my life. If it can and I can reduce my laptops to one again, I’ll be a happy man.

>Ubuntu / Vista / VMware / Xming

OK, I’ve been using this setup for over a week. I’m a developer /sys admin who needs a Linux environment and who is stuck with just a Vista laptop. So here’s my solution. Certainly not a perfect solution but a lot better than some I’ve used in the past.

The idea is that we run Ubuntu (or any Linux disto) within a VMware machine (I assume the free VMware player would work for this, but i’m using VMware workstation). We then install the free X server Xming and use that to start X applications from the Ubuntu machine. In reality I use this for two main reasons – running Emacs with a Linux backend and controlling ssh tunnels. I can do both of these things natively in Windows or using Cygwin but both are painful in real life. And if all your live deployments have Ubuntu at the backend, you really want the same for your development environment.

First thing you need to do is install Linux on your Vmware machine. I use the Hardy Heron server install as it’s a lot lighter than the desktop and we don’t want to run a linux desktop anyway. Yes, a desktop inside a desktop could be construed as cool for the first day or so if you have never done it before but it soon becomes a pain in the arse. There are some other versions of Ubuntu which are even more stripped down but we use Ubuntu Server for our normal server installs so I went with that.

My Vista laptop has 2GB of RAM and is dual core. In the VM I assign both processors and 512MB of memory. I also preallocated the disk to try and eek some more performance out of it (60GB in this case). See my comments later on performance. For networking I used Host. If you are moving your laptop around a lot this may be a small pain as you’ll need to keep an eye on the ip address your VM is given each time. Probably better solutions for this.

Make sure you install the ssh server. On Gutsy and Hardy it’s an option you get at the end of the install process. Otherwise “apt-get install openssh-server”.

On Hardy Heron default server install, once it’s up and running, the important setting to change is


add the entry

   X11UserLocalhost yes

and then do

   apt-get install xauth

Now install Xming and Putty. We’ll use Putty to ssh into VMware and launch our apps. The settings you need in Putty are wonderfully described here along with other useful troubleshooting tips which may be of use if you are not going the Ubuntu route. On Ubuntu I just needed to do what I’ve described above.

Start up Xming. Now, using Putty, log into your VM. The first time you log in, if you’ve done what I’ve outlined, you’ll see a message saying words to the effect that .Xauthority is being created. Now launch an X app. You might want to “apt-get install x11-apps” and launch xclock as a test. Revel in it’s minimalistic glory. If you don’t see xclock appear then check if Xming is trying to tell you something – check if the Xming window is flashing at the bottom of the screen for example.

If that doesn’t work, check out the Xming web site or post a question here.

Now you can install anything you want to run. In practice, for me, that’s meant

  • emacs
  • Firefox
  • gSTM

I have Firefox installed, as I sometimes need to browse sites through the tunnels I create with gSTM. gSTM is a Gnome app. Here it is running, on my Vista desktop. On the right hand screen you can see the obligatory x apps running which are of little use at all. The putty session on the right screen lower is running top on the VM. The upper putty session is connected to a remote system behind a remote system via the tunnel manager.

It’s not without it’s problems. The screen shot at the start of this post shows me running Emacs and running some unit tests within Emacs which are doing a lot of python and postgres processing. Check out the cpu and RAM usage in the sidebar widget at the right. At that stage the machine was somewhat sluggish although useable. Certainly after a day of heavy development I found a good reboot of the whole setup (from Vista downwards) would help. Having more RAM in the laptop would also benefit although having a 3GB limit with 32bit Vista sucks. In short, you’re using a VM and you’ll be taking a slice (maybe I should say ‘a chunk’) off your performance compared to just running Linux directly.

Two other issues. Not major but to be kept in mind. I find that over the course of a day I end up with a lot of Putty sessions open. I might be able to manage these better if I spent some time looking at it – and it doesn’t help that I launch my X apps from Putty as well. Xming goes with a launcher program which I haven’t tried yet. That might be useful.

Final issue is copying and pasting. Sometimes this seems hit and miss but frankly that’s not a lot different from what I experience in native Ubuntu. Ctrl-Insert and Shift-Insert sometimes had to be done a few times before something would wake up to what I was doing. This is something I could improve if I had the time (so you can see it wasn’t that big a deal).

I’ve been laughed at once already today for saying this, but I’ll say it again. I like the look of Vista and I’ve grown really attached to that sidebar (can somebody recommend a Mac solution to give me similar functionality). But Ubuntu is damn pretty as well. More importantly, if you’re running Vista natively then you don’t have to sit there for HOURS on end loading up drivers to get your audio working with your webcam and – oh – that makes the wireless drop out. Hang on, I’ll recompile the wireless module – that’s better. Oh, the webcam’s gone again – and where did the memory card support go to? And don’t even BEGIN to talk to me about hibernation. God that drives me mad. Dual boot is a pain in the arse as well. I just want to sit in one environment working.

So if I need native Vista to get the most out of my laptop my two current options are Cygwin and this. Cygwin is great if all the stuff you need is available in it. It sucks like a hoover if you start having to compile stuff natively under cygwin. Does for me anyway.

Having the VM as your development environment also makes it a lot easier to move it around to new machines. We’ll see how that pans out later today when the new MacBook Pro is due to arrive.

This time last week I was wondering whether I could make this environment my full time environment. I nearly can. In the end the problems are not so much with the solution as with the laptop. It needs a bit more power and it needs more RAM (and I can only go up one more GB easily). Also (this is a Sony Vaio VGN-FE41Z) the fan is bloody loud. I usually sleep with the laptop next to my head. The noise is getting annoying.

So the MacBook Pro is arriving today. I’ll gain more power, illuminated keyboard, Mac loveliness and maybe (maybe) a quieter fan. We’ll see. But I’m intending on trying a similar setup on the Mac as well. I’ll let you know how I get on. If anybody else is running a similar setup as this on their Windows system let me know how I can improve performance.