My travel setup

My travel kit (for non-work travel) now consists of:

If I’m working I’ll also have my Surface Pro 4 with me, but apart from that I rarely travel with a laptop these days.

A few thoughts on Macs and iPads

I went in to the new Apple Store in Birmingham today. I’ve been meaning to go for ages, but as I’m not really in the market for anything new then I’ve not seen it as a pressing task. My main reason for going was to try out the keyboards on the new MacBook Pro to see if it’s something I could live with if I end up getting one at some point in the future. It’s very different to the keyboards I’m used to (the previous generation of MacBook Pro/Air, and also the Apple bluetooth keyboard and my Logitech solar powered keyboard). There is definitely less movement of the keys as I type, but my accuracy didn’t take a hit, and I think I could grow to accept it as a keyboard for everyday use. I also thought the screen was gorgeous, and that 8GB of RAM would be enough for most of what I use a laptop for these days, especially as the SSD is so fast. I’m not going to rush out and buy one, but I wouldn’t rule it out at some point in the future (although the touch bar still leaves me cold).

I also looked at the MacBook (small, similar keyboard, would make a decent MacBook Air replacement in a year or two), and the larger iPad Pro (huge, beautiful screen, surprisingly good typing experience with the Smart Keyboard). Neither of these are things I need, but I would happily use as my main portable device if the opportunity presented itself, and actually touching the iPad made me realise why so many people are saying they can use it as their main computer. I use my smaller iPad Air 2 for a lot of what I do online outside of work, and I can see how twice the memory and a much larger screen would help me leave my laptop behind forever (although I also want to wait and see what the next iteration of the device might look like).

I’m still hoping Apple bring out a desktop computer that excites me this year (because that is something I’ll need to buy soon as I fear my 2011 Mac Mini will be obsolete within a year or so). I would use anything they currently have on the market (with the right upgrades), but as I’ve not actually bought any of them then it suggests that there is nothing currently out there that is suitable enough for me to consider an upgrade at this point in time.

Using an iPad as a primary computer

There’s been a lot of talk on the internet over the last couple of weeks from people who were planning on buying a new Macbook Pro who have instead decided to move most (or all) of their workflow over to some sort of tablet (usually an iPad Pro). While I’m not quite there yet, I do find myself using my computer less and my iPad more, and I thought it was worth exploring exactly what it is that would stop me making this sort of switch.

As far as I can work out, the things I still need a computer for are downloading and managing music, ripping/converting CDs/DVDs, converting markdown into .docx (and possibly some other formats, although I have solutions for html and pdf now), and web development/Wordpress work.

Of these, the first one requires macOS/Windows because of the integration with iOS (and only because of that). I don’t want to stop using my iPhone/iPad though, and I buy new music very regularly, and want to be able to listen to it on the move.

The second one can be done on any computer that can be connected to a USB CD drive (which I already own), will run handbrake and that has enough storage space. I probably wouldn’t try this on a Raspberry Pi, but anything else would work.

The third one I can do on anything that can run Pandoc, so any computer that can handle the first two tasks will handle the third.

The fourth one I can do on any Mac/Linux computer. I already have a Linux solution working, and could even use a Raspberry Pi at a push (I’ve already set up a basic environment on a Pi II).

That’s actually not a lot. All my writing, blogging and social media works fine (in some cases better) on my iPad, and Microsoft Office also works well (and integrates nicely with both Sharepoint and Dropbox).

Right now my two most utilised computers are the iPad and the Pi that I use for watching TV shows. Nothing else comes close, and my desktop computers only really get any sort of serious use during weekends/holidays. Maybe there is more milage in this than I thought.

Getting up and running with a CHIP

Tonight I finally received two CHIP boards (sort of a cross between a Raspberry Pi and a Pi Zero). I’d kickstarted these about a year ago and totally forgotten about it, so it was a nice surprise. Whenever I get my hands on something like this the first challenge is to power it up, boot an operating system, and see what it will do.

What follows is one way to get one of these devices powered up, connected to a wifi network, and with access to a graphical desktop. These instructions will work on macOS and Linux, for Windows there may be a need to consult the manual to get the relevant type of terminal access.

The only thing you’ll need (apart from the CHIP itself) is a microUSB cable. As an avid Raspberry Pi enthusiast I have quite a few of these lying about so there was no additional expense. Plug the small end of the cable into the relevant slot on the CHIP and the other end into a spare USB port on your computer. You’ll then need to see what device name your computer has assigned your CHIP by issuing the following command in a terminal window:

ls /dev/tty*

Find the output that looks something like /dev/tty.usbmodemFD1223 and make a note of it. Then issue the following command (replacing my device name with whatever yours is):

screen /dev/tty.usbmodemFD1223 115200

At that point you should get a login prompt. Log in as user chip with password chip (yes, I know). At that point you should find yourself logged into a fairly minimal Debian installation.

As yet there is no network, but as the CHIP has wifi then we can set this up fairly easily. In the logged in terminal session enter the following:

sudo nmcli device wifi connect '(your wifi network name/SSID)' password '(your wifi password)' ifname wlan0

The output should be something like:

Connection with UUID 'e9e45ce8-9961-4116-a7eb-d526e60af3ee' created and activated on device 'wlan0'

At this point you should have a network connection. Test it by doing some software updates:

sudo apt-get update && sudo apt-get upgrade

When you’re done (it might take a while) install xrdp to allow you to initiate remote desktop connections to the CHIP:

sudo apt-get install xrdp

Once that is done, create a new RDP connection using your client of choice. Find out the IP address using ifconfig or just use the name chip.local, enter the username and password, and you should see a graphical desktop with an application menu and a fair few applications.

I’ve also had some success plugging an ethernet adaptor into the CHIP’s USB port and connecting via ssh, but on most occasions the device powered down before I could do anything useful with it. This is the same setup I use with my Raspberry Pi Zero, so I know it theoretically works, but I need to investigate how much power the adaptor is drawing as it looks like the device is struggling to power it.

Musings on hardware

My next work machine will be a Surface Pro. I could have gone with a very nice looking Acer, but as I’m keeping my old Macbook Pro for a little while I thought portability should win out. I’m also spending a lot of time using my iPad, and I’m finding myself missing a touch screen interface when I don’t have one, and I’ll need to use enough Windows-only software in my new job to make using anything else an exercise in frustration.

The way I use computers is certainly changing. I’ll get the Surface Pro 4 in a few weeks, and whilst I love the look of the new Macbook Pro I don’t think I can justify buying one right now, which suggests I’ll not be using a Mac for most of my day-to-day computing for the first time since 2010. What I really need to go with the Surface and the iPad is some sort of desktop to manage all my music and do any non-work tasks that require heavy lifting. I’m disappointed that Apple didn’t announce anything in their recent broadcast, but I’ll definitely be keeping my eye on the refurb store to see if anything looks affordable (which of course they don’t right now because all the prices have gone up). My Mac Mini will do for now, but it’s 5 years old and everything else I use feels snappier, despite the Mac having 16Gb of Ram and a fairly new SSD.

I’ve written this blog post on my iPad using a full sized bluetooth keyboard (which I used as my main keyboard for a number of years). It’s even easier than using the tiny keyboard I carry around everywhere, and I think that with this keyboard and my iPad (or maybe the larger iPad Pro) then I could easily do the vast majority of my work-away-from-work without access to another computer. I’m typing this whilst sitting at my coffee table, so my posture isn’t great, but I think that once I’ve cleaned the keyboard up a little then I’ll look at trying this combo out at a proper desk as it’s certainly worth further exploration as my main writing device.

Whatever happens next, I’m already using a lot of different kit than I was a year ago, and I think I’m only half way through a fairly major change in the way I work. I start my new job on 1st December and I’m sure that will bring even more change.

Simple CCTV setup using a Raspberry Pi

This weekend I’ve been setting up my latest Raspberry Pi (a version III, in a blue lego case, running Ubuntu) to display a video stream of what’s going on outside my house so I can watch out for deliveries etc.

It’s something I’ve done before on different hardware, but I thought it was worth documenting as it’s a good project for any model of Raspberry Pi, and requires nothing more than the Pi, a USB webcam (or camera module), and 15 minutes of your time. I’m using a piece of software called motion which is available in the Debian/Raspian/Ubuntu repositories.

Install motion:

sudo apt-get install motion

Enable motion to start at boot:

sudo nano /etc/default/motion

Find the line that says start_motion_daemon=no and change it to start_motion_daemon=yes.

Enable the stream to be viewed from other computers on the local network, and also make the output a little bigger:

sudo nano /etc/motion/motion.conf

Change the following values:

daemon on    
width 640     
height 480     
framerate 100     
stream_localhost off    

Reboot, and then browse to port 8081 on the computer you’ve set it up on.

An updated guide to using Pandoc for document conversion

I wrote about Pandoc last year, but I’m using it more and more and I’ve found myself editing the original post a fair few times. This is the updated 2016 version that gathers together useful commands I’ve learned so far.

Last year I found myself needing to do a lot of document conversion, and maintaining documentation that needs to be available in a variety of formats (HTML, Word documents, Markdown and PDF). My tool of choice for this sort of thing is Pandoc, which is available for Windows, Mac OS X and Linux, although most of my usage so far has been on Linux and Mac OS X (it’s a command line package that can output to Dropbox, so it doesn’t matter where it runs really).

There are instructions for installing Pandoc on quite a few platforms. I’ve found that following these is generally enough, although it’s worth installing the latest version of the .deb packages rather than the one in the repositories.

On Debian/Ubuntu I also add the texlive-latex-extra package, but that’s largely because it gives me a specific Beamer theme I like to use.

If you’re using Pandoc on Mac OS X there is one more command you’ll need to issue prior to the first time you want to create a PDF file:

sudo ln -s /Library/TeX/texbin/pdflatex /usr/local/bin/

This will ensure Pandoc knows where to find pdflatex. If this step isn’t followed then you’ll likely get an error message along the lines of pandoc: pdflatex not found. pdflatex is needed for pdf output.

Pandoc works for me because I write everything in markdown, and Pandoc is great at taking markdown and converting it into almost anything else. It’s also good if you need to create a PDF, a Word document and a slide show from the same document. The syntax is fairly simple for most document types:

For example:

pandoc input.md -s -o output.docx
pandoc input.md -s -o output.html
pandoc input.md -s -o output.epub

Conversion to PDF works the same, although I’m not a fan of wide margins, so I tweak it slightly:

pandoc -V geometry:margin=1in input.md -s -o output.pdf

For a Beamer slide show you’ll need something like:

pandoc -t beamer input.md -V theme:metropolis -o output.pdf

Pandoc does a lot more, but the documentation is great, and the commands above should be enough to get you started. If you want to try out the functionality in a web browser then http://pandoc.org/try/ should be able to handle most types of conversions.

Setting up new Ubuntu machines

I’ve had to set up a few Ubuntu desktop machines recently (for my own use), and I thought it was worth documenting what I install on each one, and how I automate those installations as much as possible.

Add a script to make updating software easier

Create a new file called updateall

#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get clean -y
sudo apt-get autoclean -y
sudo apt-get autoremove -y
sudo purge-old-kernels -y

Move it to /usr/local/bin/ then make it executable with sudo chmod -X updateall.

Add some software from the Ubuntu repositories

updateall
sudo apt-get install git gimp byobu vlc ubuntu-restricted-extras build-essential hexchat openssh-server unity-tweak-tool youtube-dl

Install Spotify

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

Install atom

cd Downloads
wget https://github.com/atom/atom/releases/download/v1.7.3/atom-amd64.deb
sudo dpkg -i atom-amd64.deb

The version number may be different – get the latest version from https://github.com/atom/atom/releases/.

Install dropbox

wget https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2015.10.28_amd64.deb
sudo dpkg -i dropbox_2015.10.28_amd64.deb

The version number will be different, but hit tab after typing dropbox and it should autocomplete. If that doesn’t work, download the latest version from https://www.dropbox.com/install?os=lnx.

Install tails-installer

wget --continue http://dl.amnesia.boum.org/tails/stable/tails-i386-2.3/tails-i386-2.3.iso
sudo add-apt-repository ppa:tails-team/tails-installer
sudo apt update
sudo apt install tails-installer   

Install pandoc

wget https://github.com/jgm/pandoc/releases/download/1.17.0.2/pandoc-1.17.0.2-1-amd64.deb
sudo dpkg -i pandoc-1.17.0.2-1-amd64.deb
sudo apt-get install texlive

See here for more on how I configure and use Pandoc, and also for a fix for a Mac OS X related bug to do with rendering PDFs.

Cosmetic tweaks

Go to System Settings --> Appearance
Change theme from Ambience –> Radiance
Reduce Launcher size to 24
Change desktop wallpaper
Enable workspaces

Open Unity Tweak Tool and configure so that hot corners work, with the top left and right corner doing a window spread (largely because that’s how my Macs are set up, and also how Gnome 3 works).

Go to System Settings --> Security and Privacy and turn off all “phone home” functionality.

Building a media centre with a Raspberry Pi and OpenELEC

My project for the Easter vacation has been to build a media player using a Raspberry Pi and Open ELEC. Setup was fairly straightforward, but I thought it was worth writing up anyway – especially as I’m probably going to make further changes to the setup as I find new features to add.

Hardware

I went with the new Raspberry Pi III, which is plenty powerful enough for this project. I also used a 16Gb SD card (the largest unused one I currently have), and a case that looked like it would handle being jostled around in my bag. The device also requires power and HDMI cables (which I already had), and a keyboard/mouse/monitor/ethernet cable for setup.

Software

OpenELEC is one of the installation options on the NOOBS image, so I simply downloaded that, copied it to the SD card, and installed it from there. It requires a network connection to install, but is a lot easier than having to copy the image using dd. I went with the default options in all cases, although it’s worth noting that if you enabled ssh access then it’s not possible to change the root password at all, so you’ll need to disable it after setup (not that setup, or anything else, requires shell access).

Once installation had finished the device booted into the default Kodi interface. A web-based remote could be accessed by browsing to the device’s IP address, and it could be accessed as network based storage from all of my computers. Then it was simply a case of dropping some media files (movies and music) into the respective folders and testing that content could be played. I copied across some MP3, MP4 and AVI files, all of which played fine.

Addons

The original plan for this project was that I’d end up with something that could play movies and music on my TV, and that could handle storing a small amount of content locally so that when I end up in a hotel room with a few hours to kill I have something interesting to watch. The solution I’ve built ticks all those boxes, but I was curious to explore what else OpenELEC could handle.

After exploring the interface and available software for a little while I found channels for Last.fm scrobbles, BBC iPlayer and TED talks. All of these installed and worked fine. Adding iPlayer started me thinking about other free to view TV channels, and at this point I remembered that the last edition of Linux Format had an article on using a Pi Mini for a similar project, and that there were instructions for adding a whole host of other services. Their instructions for adding ITV player were as follows:

Navigate to System > File Manager. Select ‘Add Source’ followed by ‘’, enter http://www.xunitytalk.me/xfinity and select ‘Done’ followed by ‘OK’. Hit Esc then choose System > Settings > Add-ons > Install from ZIP file. Select xfinity from the list of locations, select ‘XunityTalk_Repository.zip’, hit Enter and wait for it to be installed. Now select ‘Install from repository’ followed by .XunityTalk Repository > Video add-ons, scroll down and select ITV. Choose Install and it should quickly download, install and enable itself.

This worked fine, and also gave me access to a lot of other channels that I could add.

There are a lot of things I’ve not explored on this device yet, but at the time of writing I’ve got BBC and ITV channels (live and catchup), TED talks, and a variety of locally stored media. Music I play scrobbles to Last.fm, and I can drop new media onto the device from my computer. I figure that all I’ll need to travel with is a power cable, a HDMI cable and a small mouse (all of which I already have), and I should be sorted. I also tested a trick I’ve used before which involves sharing a wifi connection via ethernet on my laptop to get the two devices to talk to each other long enough to add/remove media, which might also prove useful.

Software I use

Software I use that I feel is somewhat noteworthy includes:

  • Evernote – I use this on every device I own, mostly to take notes in meetings and training sessions, and then to revise/reflect later. A lot of my notes are now photographs of whiteboards, which Evernote handles very well.
  • Atom – A text editor that handles Markdown well, and can preview and export to PDF. This pretty much handles all of my writing/blogging work within one application. I’m currently writing this post in Atom. I also use Pandoc to convert to PDF, HTML and/or .docx if required.
  • Trello – I’ve just started using this for my to do list, and it’s a good way to visualise the planning and execution of any task based work.
  • Keynote – For presentations. I wouldn’t say I’m a power user, but I can throw together a half decent presentation now.
  • Dropbox – Cloud storage and synching software to ensure I can access everything everywhere.
  • IFTTT and Buffer – To automate as much as possible. Between them they handle a lot of the seemingly clever things in my digital life, and explain why I seem to be able to post to social media sites at times when I appear to be elsewhere.
  • NVivo – As a lot of the data I work with is words rather than numbers this is proving somewhat invaluable. I use the Mac version, but should get round to exploring the Windows version soon as I understand it has some different features.
  • Virtualbox – Because no-one needs as many physical computers as I had before virtualisation was a thing.

I’m always happy to talk about any of this software and how I use it to be productive.