Thursday, December 6, 2012

Divorcing Apple, trying WIndows 7 and Ubuntu on Dell XPS 13 Ultrabook


Divorcing Apple

Dear Apple, I'm very sorry, but after quite a few years through thick and thin, poorer for me and richer, much richer, for you, I want a divorce. I remember the dark days before Jobs returned, when many including me thought you would go bust, when Microsoft invested some money to keep you going. I’ve been with you through CPU architecture changes and software architecture changes, when you were the alternative to the corporate behemoths like IBM and Microsoft. Back then, you were the plucky upstart challenger. Today, you are the establishment. You are the one protecting your turf, those rectangles with the rounded corners. Yes, you’ve changed.

I want a divorce.

The thing is, I need a computing companion, I need to start ‘dating’ again. To get back out there again, I decided to buy a Dell XPS 13 Ultrabook. It was for 4 keys reasons:

  1. I want to try Windows 7 Home Premium because I need Photoshop which doesn't run on Linux.
  2. Dell and Canonical have created an Ubuntu distro "Sputnik" which has hardware specific capabilities. Based on 12.04 Long Term Support version it’ll be here for a while.
  3. I do happen to like Apple design (just not their business practices and attitude towards customers) so an Ultrabook was a good option. But I’m not going to buy a MacAir to run Ubuntu just so I don’t have to run OSX. Although MacBook Pros do run Ubuntu very well.
  4. A local reseller had acquired some 2nd generation XPS Ultrabooks and was selling them at a very good price.

So, after over 10 years away from Dell, here I am again. Lets see how the ‘date’ went.

First off, the un-boxing. Its clear that Dell have learnt from the Apple school of design and user experience, and how to make a product feel cared for and loved during the design and production process.

Although the supplied power lead supplied is too short, nice to see Dell still use the 'clover leaf' so I fetch a longer one from the garage. Same lead as my ChromeBook takes (though not power brick of course)

Then its the first boot into Windows 7. Fairly pleasant OOBE, as the UX folks call it, though it takes an age to go past data entry to a desktop.

And this, to be honest, is the end of the pleasant part of the journey with Windows 7. After this the road is rocky:

  1. I need a huge number of updates, including BIOS. Fair enough, but having the user work out each on an individual basis compares poorly to Apple Software Update experience. Dell and Microsoft have been partners for how many years? Why no Dell version of Software Update that just works?
  2. Windows Update goes OK, if slowly
  3. MacAfee gets an iron grip wanting to interfere with everything. Uninstall it
  4. Uninstall Flash as well while I'm at it
  5. And Skype too

We already know I’m here because I want a divorce from Apple. So is Windows a good alternative date? Well, no. Its really like mutton dressed as lamb, or if you prefer, like an old lady pretending to some youth by buying at great expense huge amount of make-up, or as we say where I come from, slap. I cannot, to be honest, see any innovation after Windows XP. What did they do with the 10 years? And the billions of dollars?

Rather than have an end to end consistent experience, its a hodge podge of windows 2000 and xp and a thin layer of ‘we won’t trust the user’. Why just a recycle bin on the desktop? Why the random and arbitrary selection of apps under the Windows menu?

An example: I have a home network, so I’d like the XPS to join my workgroup. The setup process says its detecting networks etc, but doesn’t ask to join my workgroup. How do I set the workgroup? Well with WinXp I would use the classic desktop, right click the computer and set the properties there. But in Win 7 there is no “Computer” on the desktop. To get there I have to click the Windows menu, computer, then right click and select properties. Extra steps for no good reason.

So how about Ubuntu 12.04, fresh out of finishing school?

First boot after install takes me to the GRUB boot menu where I can choose what to boot ie Ubuntu or Windows, which is good. Getting to GRUB takes about 2 or 3 seconds. I can choose to boot Ubuntu, or the default is to boot after only a few seconds anyway.

From boot menu to logon screen takes only 6 or 7 seconds, which is quite quick I think. I login and get the Unity interface, which is a little like a cross between OSX and iOS. You’ll either like it or loathe it. If you’re moving from one OS to another you’ve got some adjustments to make anyway.

As it happens I don’t like Unity, so I installed Gnome from Ubuntu Software Centre.

Then log out, select the environment, and log back in. And thats about it.

By default you get applications such as:

Shotwell - iPhoto a-like
Firefox
Movie Player
Disc burning apps
Music players

Pretty much everything else you could ever need is available through the Ubuntu Software Centre. My list is:
GIMP - not really like Photoshop though still quite powerful
AVIDemux - movie editor, CODEC changer
InkScape - Illustrator a-like
Scribus - InDesign a-like
Audacity - audio record and edit
TrueCrypt - encrypt disks
Digikam - Aperture a-like, and handily the best EXIF editor and geo-locator for photos and GPS tracks
LibreOffice - just like Microsoft Office 2003 and before, and free
VLC - plays just about every video format in existence

Don’t forget Chrome from www.google.com/chrome of course, and when you sign in you get all your bookmarks, extensions and what your other devices have open.


If you like OSX quick view ie press the spacebar to quickly view known files, then install Sushi

If you want to get down and dirty then you probably want to install Synaptic, again from the Software Center.

And thats about it! Gets you a pretty much full-featured system, and takes easily less than an hour. Ubuntu Software Centre has loads of applications.

Oh yeah, lets compare the user experience:

  1. Update Manager kicked in automatically, and installed what was required.
  2. Update Manager was nicely speedy
  3. There’s no MacAfee
  4. Or Flash
  5. And no Skype either
  6. Super easy install of new stuff

If you really like OSX, then you can make Ubuntu look just like it. Look for Cairo in Ubuntu Software Centre which replaces all your icons and gives you a dock.

So to answer the question: what should I get to replace my 2010 MacBook Pro? Which is the better computing companion? The Dell as a windows device, or as an Ubuntu device?. Its not really even a fair question: its Ubuntu all the way. Ubuntu is so much fresher and easier to use. With the Sputnik add-ons everything works right away (small note below).

In the spirit of disclosure, I should mention:

  1. First that the keyboard layout is not quite right for this laptop - I can’t find how to do things like ‘euro’ or ‘pound’ keys.
  2. I haven’t gotten MTP working yet so I cannot transfer files to/from my Galaxy Nexus or Nexus 7

Secondly that I’ve run Ubuntu 11.04 on old non-Unibody 15” MacBook Pro and found it to be great, actually runs better than OSX, right up until the MacBook died, as well as having a 12 core beast running 12.04 at work, which really flies.

Ummmm and thats it.

But what about Ubuntu and the XPS versus my 13” MacBook Pro and OSX. Can I really leave all my Mac OSX apps behind?

Well it turns out I can, with the exception of Photoshop, and for that, see above. Since Apple have weaned me off Dashboard, I don’t even miss that very much. And if you do like the Dashboard and Widgets, Gnome has them.

I’ve worked through the list of what I use, and the thing is that today with Cloud Computing and so much being web based, that I don’t actually use that many programmes, and those I do mostly have Linux version or at least very near equivalents and alternatives. Here’s my list.

One last thing: we really need Google Drive to be available on Linux! In the meantime Insync is really very good, and mutli-user aware.

So whats it take to get Ubuntu 12.04 up and running?

Stay tuned for part 2! Here's part 2, of 3.

Wednesday, August 8, 2012

Firefox Sync: a bit of a fail

So I was setting up Firefox Sync, having used Google Sync for a while its nice.


On the first device no problem, then I move to the second device, which is not with me.


Fire up sync, and I see the best option is "I Don't Have the Device with Me"




So I click it, and then....



What? I need the recovery key? From the other device? But if I have the other device, then why would I click "I Don't Have the Device with Me"???

So I have to click "lost my other device"?


FAIL!

Sunday, August 5, 2012

Mac OSX Mountain Lion removes "battery time"

If like me you prefer to have a time based estimate of how long your Mac's battery has left, or how until its charged, you won't like Mountain Lion so much, since that feature has been removed.



What you can do instead, is to use Slim Battery Monitor which works really well, and takes up much less menu bar space.




Monday, July 30, 2012

Making a Time Lapse movie and dragging the shutter in post production

Since the release of Android Ice Cream Sandwich and the camera's timelapse feature, I've been having fun. Examples:







The only problem is that you cannot drag the shutter because there's no shutter speed control.


So I decided to see if I can do this from a regular movie. Tools needed: avidemux, imagicmagick, QuickTime,


1.  Take the movie and turn into individual images. This will create a LOT of files! AT 25 frames per second, an hour of video will be 90,000 frames!


For this I use avidemux. Open the video file, and move the slider to where you want to start, then click Edit > Set Marker A.





Then move to the end of where you want, and click Edit > Select Marker B.




and now you see how much of the movie you've selected



You can estimate how many frames that'll be.


Then go to File > Save > Save Selection as JPEG Images




Its best to create a new folder for the images, then you have to have a start character. This will give a naming scheme like f0001.jpg f0002.jpg etc







Here's the folder



2.  We need to remove the 'f', and then the extra zeroes.


To remove the 'f' we can use the command


    for f in *; do mv "$f" "${f#?}"; done
each ? in the {} is one character, so the above command removes one leading character.








Then we need to remove the leading zeroes. We can use the command


    for FILE in *; do mv $FILE `echo $FILE | sed -e 's:^0*::'`; done


and that gets us



3.  Simulate dragging the shutter.


Going to use ImageMagick. On OSX you can get a pre-compiled version here, or compile it yourself.


So what you need to do is create a script that averages a number of images, to simulate dragging the shutter. With help from folks on the ImageMagick forum:



        #! /bin/bash
        totnum=500
        seqnum=10
        num=$((totnum-seqnum))
        i=1
        while [ $i -le $num ]; do
        i1=$i
        i2=$((i+1))
        i3=$((i+2))
        i4=$((i+3))
        i5=$((i+4))
        i6=$((i+5))
        i7=$((i+6))
        i8=$((i+7))
        i9=$((i+8))
        i10=$((i+9))
        /usr/local/ImageMagick/bin/convert $i1.jpg $i2.jpg $i3.jpg $i4.jpg $i5.jpg $i6.jpg $i7.jpg $i8.jpg $i9.jpg $i10.jpg -evaluate-sequence mean /path/to/output/result$i.jpg
        i=$((i+1))
        done


You can extend this as much as you want.


What does this mean?

  1. totnum is the total number of frames to be processed, which I got from running avidemux above
  2. segnum is the number of images to be averaged into one image ie the duration of the "drag"
  3. In the example above I have 500 frames, and I average 1 to 10, then 2 to 11, 3 to 12 and so on.
  4. The "i=$((i+1))" at the end is critically important: it sets the advance for each averaging cycle, and is in essence the time lapse period you'd set on the camera.



The result is that you can have a drag duration greater than the time lapse interval, which is not possible on a camera.


4.  Join the frames back into a movie. I use Quicktime Pro, version 7. Click File > Open Image Sequence




navigate to the folder with the processed images






Click one and select "Open"




Then your framerate for the movie, 25 would be PAL standard, and after a few seconds, depending on the number of frames the movie appears. Here it uploaded to YouTube.


dragging 100 frames, timelapse 25


Some interesting aspects to this.





Basically you can drag / blend over one period / duration, and time lapse over a different one.


ImageMagick can hold up to 999 images in RAM, so the maximum drag would be 40 seconds at PAL fps. Bear in mind that "dragging" ie averaging lots of images can takes a long time, and if you have 1hr of original movie, thats 90,000 frames to process. You may need to run the script overnight.


Here's another example where I've blended over 500 frames ie 20 seconds, and timelapsed at one frame per second.


drag = 500, timelapse = 25


drag = 500, timelapse = 500


Just to mention that I'm a novice at this, so my terminology may be incorrect and my techniques rudimentary. Certainly I think someone could  make a plugin for Final Cut, or Adobe Premier, or even iMovie.

Wednesday, July 25, 2012

How fast is AES-NI on a Mac?

Previously I looked at the then new Apple Mac laptops with Core i CPUs and their AES-NI hardware extensions. Since then I've learnt that the openssl shipping with Mac OSX Lion has not been compiled with AES-NI support.

Here's an easy way to tell. From the command line run "openssl engine"

$ openssl engine
(aesni) Intel AES-NI engine
(dynamic) Dynamic engine loading support(dynamic) Dynamic engine loading support

See the line "(aesni) Intel AES-NI engine"? if its not there, then its not happening.

And thats how I know openssl on Mac OSX Lion 10.7.4 doesn't have it.

So how to benchmark? Turns out that Truecrypt has a benchmarking engine.

1.  Launch Truecrypt and click "Create Volume"



2.  Then click "create an encrypted file container"



3.  Give it a name, doesn't matter what and where, we'll never save it



4.  Then Benchmark



5.  When this screen loads, select a buffer size and press Benchmark. Try not to have any other processes eg browsers running since this will skew the results.


Here's an example - this is a Core 2 Duo at 2.26GHz


and Core i5 at 1.6 GHz with AES-NI



As you'd expect, huge difference!

Some more here


Friday, July 6, 2012

Howto Connect to Mac OSX Client VPN from iPad

Howto connect to Mac OSX Client VPN from iPad.


Mac OSX Server has the VPN GUI, but what if you have the client / desktop version of Lion or Snow Leopard.


Fortunately, help is at hand, from netputing.com, where there ther is an app called vpn-activator.


Download, drop it into the Applications folder, put in some details, and click 'start'. Easy as.


image from netputing.com


You'll need to setup your firewall / NAT device to forward UDP ports 500, 1701 and 4500 to the machine you want to connect to:



Also, if the VPN server has Little Snitch or other local traffic blocker, you'll need to allow RACOON service to connect to the Internet.

Tuesday, June 26, 2012

Use qt-sync to change a movie's framerate without re-coding

QT-Sync for Mac OSX is one of the programs you look for when you have a specific need. In my case I wanted to adjust the framerate of a timelapse movie with re-encoding. Get it from here.



Friday, June 22, 2012

Replicate folder structure without files on Mac OSX

I was needing to replicate a directory and folder structure, without moving or copying files.


The following rsync command the the job nicely

rsync -a /path/from/ /path/to/ --include \*/ --exclude \*

It basically copies everything, but excludes the actual files ie just the folders. Thanks to user Paul R on superuser

Thursday, June 14, 2012

Fixing duplicate 'open with' items in Mac OSX Lion

This happens now and again, ie I get duplicate 'open with' items in Mac OSX Lion, or it has old apps in there that are long gone.


Run this command in Terminal

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user


then quit and restart the Finder

Wednesday, June 6, 2012

Howto: replace Time Capsule HD and retain the old backup

My Time Capsule is now pretty old at 3 years, and the 500GB just isn't cutting it. Got myself a shiny 2TB which I figure should be enough for a while.


You can find instructions for the physical swap lots of places on the Internet, most assume you want to start afresh with your backups. For some of my machines I do, some I do not.

If I want to keep and retain the old backups to be able to restore from them, then I need to copy over the data.

  1. Go to each machine that uses the Time Capsule, and turn Time Machine off

  2. Swap the hard drive in the Time Capsule and re-assemble

  3. After turning the Time Capsule on, use Airport Utility to format the new HD

  4. Take the old HD and use a SATA to USB adapter to connect to a Mac laptop

  5. Make sure this machine is connected by wired ethernet to the Time Capsule, gigabit is best: there's a heap of data to copy!

  6. Mount the (new) Time Capsule drive in finder



    We need to copy the data into the folder called 'Airport Disk'

  7. On the old HD look for the volume called 'Data' and in there 'ShareRoot' and in there you'll find the disk images with all the old backups. Copy what you need from here into the 'Airport Disk' mentioned above



  8. It'll take a while, so be patient

  9. On the machine whose backup image you just copied, restart Time Machine, you may need to reselect the Time Capsule, and the first backup may take slightly longer than usual.

  10. For bonus points, remember that all your data is on that old disk totally unencrypted. If you think you might need it, and you have Mac OSX Lion, then use FileVault 2 to encrypt it on the fly ie not loss of data.

Monday, June 4, 2012

Howto clean up OSX Launchpad's Apps

If you've got a lot of non-existent or deleted Apps showing in Mac OSX Snow Leopard or Mac OSX Lion's Launchpad, you can start afresh by delete the Launchpad database, and that will make it rebuild a new one.


  1. Navigate to ~/Library/Application Support/Dock
  2. Drag all the .db files to the trash
  3. Restart Dock
$ sudo killall Dock


Or, wholely from the command line


$  rm ~/Library/Application\ Support/Dock/*.db


and then kill the Dock


You may need to make your ~/Library folder visible first by doing


$ chflags nohidden ~/Library

Friday, June 1, 2012

avidemux crash on OSX Lion and Mountain Lion

I upgraded to an SSD (Crucial M4 256GB since you ask) and its great. As part of that I did a clean install of Mac OSX Lion and Mountain Lion, and then copied over a bunch of Apps, including Avidemux.

But it crashes on launch, and looking in the logs I see

Dyld Error Message:
  Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /Applications/avidemux2.app/Contents/Resources/lib/libxml2.2.dylib
  Reason: Incompatible library version: libxml2.2.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

The easiest way to fix this is copy a new version over from the downloaded disk image, and then delete these two files: libxml.2.dylib and libiconv.2.dylib

Thursday, May 31, 2012

Copy all EXIF data from one file to another

Sometimes I come across an old photo where the date and time stamp are all wrong, and then looking at the EXIF data, there's nothing there. It seems this happens mostly with old panographs where the software does not copy EXIF from source to destination.


EXIFTool can fix this for you:


exiftool -tagsfromfile source.jpg -all:all destination.jpg


The original is rename to .original, you can then use jhead to fix up date and time.

Tuesday, May 29, 2012

Howto view Fuji 3D video on 3D TV

When in movie mode, the Fuji Film Real 3D W3 makes 3D AVIs, and the question is how to display them on my Samsung 3D TV.



There are two methods:

  1. Connect the Fuji camera to the TV using a micro-HDMI to HDMI lead. You can get them on Ebay for less than about $10. Then play the movie.

    The thing with this method is that not everyone wants to keep all their movies on the camera / SD card.
  2. If you want to play movies from USB or other storage eg DVD, you need to convert the 3D AVI into something more useful.

    If you have Mac OSX - requires QuicktTime Pro

  3. If you have Mac OSX then use StereoSplicer to split into left and right movies by dragging the AVI onto StereoSplicer, and say where you want the Left and Right movies

    Then open each movie.

    Select all (apple-a) of the Left movie

    Select all (apple-a) of the Right movie and copy.

    Then with the Left movie selected, you should get an option "Add to Selection & Scale".



    What this does is create two new tracks in the one movie file ie we've layered the Right hand movie onto the left hand movie.

    Then, open the movie properties (apple-J), select the second video track



    and set the 'offset' to be width of the movie, with a W3D that'll be 1280 pixels.


    This creates a side by side movie.



    You can then export as .mp4 or H264. Bonus points for deleting the extra sound track first.

    If you are using Windows:

  4. I found the best / easiest / cheapest ( as in free) is to use StereoMovie maker from stereo.jpn.org/eng/stvmkr/, and create a side-by-side, or SBS video. You'll need the MJPEG codec, the lightest weight one I found is www.free-codecs.com/motion_jpeg_codec_download.htm. When creating the SBS video you are asked what encoding to use. On my seldom used WinXP box I didn't have any other codecs, so I just used the same MJPEG. Then use say QuickTIme Pro eg on my Mac and re-code as H264.

You can then place the encoded file onto a USB stick and play that.


Couple of tips:


  1. When converting to H264 / mp4 you need to use a much higher bit rate than usual because otherwise you'll get artefacts that are different in each frame, which is visually displeasing
  2. To quickly switch the TV into 3D mode, the Samsung has a 3D button on the remote - press it and select side-by-side





Saturday, May 26, 2012

com.google.GoogleDrive: SystemError: store to keychain failed: 100013

After updating my OSX Lion from 10.7.3 to 10.7.4, Google Drive kept asking me to login, but it kept failing. Looking in the logs I saw


com.google.GoogleDrive: SystemError: store to keychain failed: 100013


Nothing showing on the Internet for that, decide to delete the application, and re-install, which fixed the problem.

Friday, May 25, 2012

OSX: Finding when I took photos, or, Howto List all Files Recursively

Set myself a little project. I was wondering if during the time I've been doing digital photography I've now taken pictures on every day of the year, including Feb 29th.


My photos are arranged in one of two methods:
  1. If I've been on a trip, I create a 'collection' called eg "NZ_Sept_2011" and in there sub-folders for each camera eg "D300" and the sub-folders eg "NEFs" and "JPGs".
  2. For regular day to day stuff, I create numerical based folders eg "Nikon_01200" which would contain Nikon photos from 01201 to 01300.
Also, I use tools such as jhead to change the time stamp of processed files to match the EXIF date/time. This means:
  1. Creating a listing of all my photos with their modification date, so in theory I can just recursively list all files.
  2. Then I need to process the results, shedding extraneous data, and the year, so I'm left with just Day and Month and full path of the file

Here's what I came up with:


  1. First off is to run the command
    $ find /dir/ -ls > all-photos.list

    which creates a (large file), with details such as

    3538871      232 -rwxrwxrwx    1 user            staff              116581 15 Oct  2008 /path/to/photo/John/IMG_7048.jpg

  2. This list brings back everything including Photoshop, Autopano and other files so we need to remove all the extra entries

    $ cat all-photos.txt | grep -i jpg | grep -v -i ".pano" | grep -v -i ".pld" | grep -v -i ".psd" | grep -v -i ".plb" > all-photos-jpg.txt

  3. Now, print only the fields needed. Can do this by inclusion
    $ awk '{print $8,$9,$11,$12,$13,$14,$15,$16;}' all-photos-jpg.txt > all-photos-jpg-fields.txt

    or exclusion

    awk '{ $1=""; $2=""; $3=""; $4="";$5="";$6="";$7="";$10="";print $0 }' all-photos-jpg.txt > all-photos-jpg-fields.txt

  4. Finally, change the separator to a comma so we can import into a spreadsheet and create a pivot table

    $ sed s:" /":,/:g all-photos-jpg-fields.txt > all-photos-jpg-fields.csv

  5. Import into Google Docs, and then add a row at the top. You need the first column to be called say 'Date' and the Second 'Photo'



  6. Select both columns, then click Data > Pivot table report. When it loads:

    row - "date"
    values - "photo" - counta




  7. And here we are:



  8. And even better, by using filtering you can easily see what photos you took on what date





Tuesday, May 22, 2012

Coloured icons in OSX Lion's sidebar

Let's face it, OSX Lion's sidebar is rather drab. Wouldn't it be good to have a bit more colour?


Well you can, and here's how.


  1. Download and theninstall SIMBL.
  2. You need the SIMBL plugin.
  3. Add the ColorfulSidebar.bundle to this SIMBL plugin folder:

    /Library/Application Support/SIMBL/Plugins/ or

    ~/Library/Application Support/SIMBL/Plugins/
  4. You need to restart the Finder by one of the following

    a - Logout / Login

    or

    b - Use the terminal kill the Finder and relaunch it: "killall Finder"

    or

    c - If you have turned on "Finder Quit', then just quit and relaunch the Finder, which is my preferred way


Then you get your nice icons

 
before                                              after


Interestingly, looking through the plugin and plist, it looks like all the nicely coloured icons are there already, just not being used. Have a look through /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources