More changes to my i3 config file

I had my new computer delivered this week. It was good to install it from my own scripts, copy across my dotfiles, and just carry on working.

Going through this process I did note that my i3 configuration file looks a lot different than when I last blogged about it, so I thought I’d make a note of the things I’ve changed from the defaults.

First up is screen locking. My muscle memory expects to use the same keyboard shortcut as Windows, so I’ve just configured that in:

set $i3lockwall i3lock -i /home/andy/Dropbox/lock.png -t
bindsym mod4+l exec --no-startup-id $i3lockwall

I’ve also set up something to randomise my wallpaper each time I log in (with a different one on each screen if I’m using multiple monitors):

exec --no-startup-id feh --randomize --bg-scale /home/andy/Dropbox/Wallpaper/current/*

I just keep a small folder of images in Dropbox that acts as a repository to pick from, and then add/remove occasionally to keep things fresh.

And then I’ve picked applications that don’t make sense in tiled mode and make the windows float (so they appear on top of everything else and can be moved around):

for_window [class="Gimp"] floating enable
for_window [class="vlc"] floating enable
for_window [class="zoom"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [class="Arandr"] floating enable
for_window [class="XTerm"] floating enable

I think that’s about it for now. I’ve also made fairly significant changes to my installation and update scripts, but that’s a topic for another day.

Adding a new repository to Oracle Linux

When I first install Oracle Linux 8 a lot of software I want to use isn’t available. But we can fix this by adding another repository.

First of all, create a new file in /etc/yum.repos.d:

sudo nano /etc/yum.repos.d/ol8-epel.repo

Then add the following to the file:

[ol8_developer_EPEL]
name= Oracle Linux $releasever EPEL ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Issue the following command to start using the new repository:

sudo dnf makecache

Then try and install some software that wasn’t previously available:

sudo dnf install -y byobu neofetch

This gives me access to a lot of software that makes computers feel like my computers.

Building a private cloud with LXD

I’ve been doing some experiments with LXD on Ubuntu and I thought it was worth publishing some of the notes I made myself so that when I come back to this at a later date I can remember what I did.

LXD is described as:

LXD (pronounced lex-dee) is the lightervisor, or lightweight container hypervisor. LXC (lex-see) is a program which creates and administers “containers” on a local system. It also provides an API to allow higher level managers, such as LXD, to administer containers. In a sense, one could compare LXC to QEMU, while comparing LXD to libvirt.

(from https://ubuntu.com/server/docs/containers-lxd)

To install:

sudo snap install lxd
sudo lxd init

Then answer some questions about where you want to store things and what file system to use.

Finding images

For Ubuntu, the syntax is:

lxc image list ubuntu:focal

(replace focal with the name of the version you are interested in)

For non-Ubuntu images, you’ll need to search https://uk.images.linuxcontainers.org/. This shortens to images So for an Oracle Linux 8 image we would type:

lxc image list images:oracle/8

Creating containers

To do this we need to tell LXC which image to build the container from and what to call it. For an Oracle Linux 8 container with the name oracle-01 we would type:

lxc launch images:oracle/8 oracle-01

Once it’s built (it shouldn’t take long) we can connect to it by using the following command:

lxc exec oracle-01 -- bash

The containers are very minimal, and I found myself having to install aditional software before I could set them up to work in the way I like (nano and wget were both missing for example).

Stopping and starting containers

I’m very used to working with Multipass, so the commands for LXD are very similar.

Start a container:

lxc start <container_name>

Stop a container:

lxd stop <container_name>

Delete a container:

lxd delete <container_name>

Viewing your current containers

The command to issue is:

lxc list

You will get to see which containers are running (with their IP address) and which containers you have that have been built but are not running.

That’s about as far as I’ve got with building the latest part of my private cloud. I’ve also been working on using Oracle’s cloud as a location for my backups, but I’ll write about that another day.

Albums of the year 2020

2020 has been a strange year. We all know that. Live music hasn’t really been a thing since March, and so many more people get to listen to music throughout the day thanks to working from home being much more common than it was before March. I think both of these things have probably influenced my list of favourite albums this year, and so I’m going to split it into two lists – one of traditional albums that are best listened to in sequence, and one of the music that soundtracked my working days during those rare few moments when I was not in Zoom or Teams meetings.

Looking down the lists I can see I’ve very much been influenced by the live music I did get to encounter this year (at the 6 Music Festival mainly), and also by the 130+ listening parties I did since live music dried up in March (which I wrote about here and here). I do hope I’ll be able to experience live music again next year, but I also very much hope that listening parties are still something that artists see as a valuable way of connecting with their fans.

In all cases the links below are to somewhere you can listen to and/or buy the record in question (Bandcamp or the artist’s own website). There’s a lot of music here, but hopefully some of it will appeal to someone.

First off we have my list of albums. It’s quite an angry list but I think that’s a fair comment on this year:

And then the list of compilations, soundtracks, live albums, instrumentals and other things that kept me soothed during this turbulant year:

Notes on my experiments with Oracle Cloud

This Christmas I set up two small VMs in Oracle’s cloud; one running Oracle Linux 8 (which I’m trying to learn at the moment), and one running Ubuntu (with my standard VM/container build). I’ve written these notes largely for me, but maybe someone else might find them useful too.

Registering for Oracle Cloud

To sign up for Oracle Cloud go to https://www.oracle.com/cloud/free/.

You’ll need a credit card, but it won’t be charged providing you only use things marked as always free. This gets you two VMs, with 1 GB of RAM each and 100 GB of storage. That’s more than enough for what I need to do here so it’s all good. You also get signed up for a trial which allows you to build much bigger machines and access more services. I’ve not tried this out yet, but it’s possible to go all the way up to VMs with 64 GB of RAM or bare metal machines with a lot more (which is basically what I want to build at home at some point soon).

See here for exactly what the free tier gets you.

Using Oracle Cloud

To build VMs and generally interact with the service log in at Oracle Cloud. The first time you create a VM you’ll be asked to generate an SSH key (or provide one). Download the private key and save it somewhere, and then chmod it to 500 (otherwise it won’t let you log in). The key can be used for more than one VM, so you should only need to go through this process once.

You can see all your instances at https://console.uk-london-1.oraclecloud.com/compute/instances – This works for anything in the London data centre but would need to be amended for other data centres.

Logging in to a VM

To log in open up a terminal and SSH to the VM. The syntax is:

ssh -i /path/to/key/ username@ip_address

Where /path/to/key/ is the location you saved your private key. Username and IP address will be in the Instance Access section of the Instance Details for the specific VM.

Full instructions are available on the Oracle Cloud website.

First thoughts

The Ubuntu VM was indistinguishable from what I’m used to, and all my usual software and scripts worked fine. I’m less familiar with Oracle Linux, but installing and updating software works as expected so I have no reason to believe that the experience will be that different from a locally installed server. I still don’t find Oracle Linux anywhere near as easy to use as Ubuntu, but I suspect that’s as much down to 15 years less experience as anything else.

My year of #TimsTwitterListeningParty

A few months ago I wrote about how I had started attending a few listening parties to replace the lack of live music in my life. As I’ve got an automation (via IFTTT) that outputs everything from my calendar to a spreadsheet then it’s fairly easy for me to know how many “a few” actually is.

  1. Open Season (British Sea Power)
  2. The 3 EPs (The Beta Band)
  3. Different Class (Pulp)
  4. Power Corruption & Lies (New Order)
  5. Boat to Bolivia (Martin Stephenson & The Daintees)
  6. Dog Man Star (Suede)
  7. Architecture and Morality (OMD)
  8. 1977 (Ash)
  9. Divide & Exit (Sleeper)
  10. Dogrel (Fontaines DC)
  11. Do You Like Rock Music? (British Sea Power)
  12. Rattlesnakes (Lloyd Cole & The Commotions)
  13. IT WON/T BE LIKE THIS ALL THE TIME LIVE (The Twilight Sad)
  14. Figure 8 (Elliott Smith)
  15. I Should Coco (Supergrass)
  16. The Coral (The Coral)
  17. Love (The Cult)
  18. Real life (Joan As Policewoman)
  19. Before Today (Ariel Pink)
  20. Rum, Sodomy & The Lash (The Pogues)
  21. Hand. Cannot. Erase. (Steven Wilson)
  22. Be Here Now (Oasis)
  23. Infected (The The)
  24. Man of Aran (British Sea Power)
  25. Dig Your Own Hole (Chemical Brothers)
  26. Revel in the Drama (Ren Harvieu)
  27. Trials of Van Occupanther (Midlake)
  28. Last Splash (The Breeders)
  29. The Boy with the Arab Strap (Belle & Sebastian)
  30. Shortly After Takeoff (BC Camplight)
  31. Cafe Bleu (The Style Council)
  32. A Maximum High (Shed Seven)
  33. Bandwagonesque (Teenage Fanclub)
  34. Low Life (New Order)
  35. Machineries of Joy (British Sea Power)
  36. Boat (Pip Blom)
  37. Foolish Loving Spaces (Blossoms)
  38. Up to Our Hips (Charlatans)
  39. West Kirby County Primary (Bill Ryder Jones)
  40. When I Have Fears (The Murder Capital)
  41. The It Girl (Sleeper)
  42. High Land, Hard Rain (Aztec Camera)
  43. Moonshine Freeze (This is the Kit)
  44. Glasvegas (Glasvegas)
  45. I’ve Seen Everything (Trashcan Sinatras)
  46. Attack of the Grey Lantern (Mansun)
  47. I Believe (Tim Burgess)
  48. Eton Alive (Tim Burgess)
  49. Six (Mansun)
  50. Valhalla Dancehall (British Sea Power)
  51. Brutalism (IDLES)
  52. The Raven (The Stranglers)
  53. Joy as an Act of Resistance (IDLES)
  54. Separation Sunday (The Hold Steady)
  55. Source Tags & Codes (…And You Will Know Us By The Trail Of Dead)
  56. Sea of Brass (British Sea Power)
  57. University (Throwing Muses)
  58. Let the Dancers Inherit the Party (British Sea Power)
  59. Magic & Medicine (The Coral)
  60. Unknown Pleasures (Joy Division)
  61. Pale Green Ghosts (John Grant)
  62. Oh, Inverted World (The Shins)
  63. Nixon (Lambchop)
  64. Feast of Wire (Calexico)
  65. Don’t Get Weird On Me, Babe (Lloyd Cole)
  66. Deserter’s Songs (Mercury Rev)
  67. Want One (Rufus Wainwright)
  68. I Love The New Sky (Tim Burgess)
  69. Giant Steps (The Boo Radleys)
  70. From the Sea to the Land Beyond (British Sea Power)
  71. Faith (The Cure)
  72. Fibs (Anna Meredith)
  73. Force (A Certain Ratio)
  74. Insurgentes (Steven Wilson)
  75. Holiday Destination (Nadine Shah)
  76. The Decline of British Sea Power (British Sea Power)
  77. Let’s get out of this Country (Camera Obscura)
  78. Harcore Can Never Die But You Will (Mogwai)
  79. Stranger (Our Girl)
  80. Seamosters (The Wedding Present)
  81. The Crackdown (Caberet Voltaire)
  82. Dazzle Ships (OMD)
  83. Philophobia (The Arab Strap)
  84. Source Tags & Codes (..And You Will Know Us By The Trail Of Dead)
  85. Costello Music (The Fratellis)
  86. Aviary (Julia Holter)
  87. Leave Me Alone (Hinds)
  88. Beauty Stab (ABC)
  89. A Certain Trigger (Maximo Park)
  90. Red Roses For Me (The Pogues)
  91. Aladdin Sane (David Bowie)
  92. Fisherman’s Blues (Waterboys)
  93. Underwater Moonlight (The Soft Boys)
  94. Kitchen Sink (Nadine Shah)
  95. Levelling the Land (The Levellers)
  96. If I Should Fall From Grace With God (The Pogues)
  97. Diamond Dogs (David Bowie)
  98. Troublegum (Therapy?)
  99. Thirteen Tales from Urban Bohemia (The Dandy Warhols)
  100. All Things Being Equal (Sonic Boom)
  101. 101 Damnations (Carter The Unstoppable Sex Machine)
  102. Grand Prix (Teenage Fanclub)
  103. Fear Of Music (Talking Heads)
  104. Closer (Joy Division)
  105. Young Americans (David Bowie)
  106. This Is The Sea (The Waterboys)
  107. Soul Mining (The The)
  108. Yuck (Yuck)
  109. All Is Dream (Mercury Rev)
  110. Technique (New Order)
  111. Pin Ups (David Bowie)
  112. Have You In My Wilderness (Julia Holter)
  113. Kaleidoscope (Siouxsie and the Banshees)
  114. A Pagan Place (The Waterboys)
  115. The Don of Diamond Dreams (Shabazz Palaces)
  116. Mind Bomb (The The)
  117. Bizarro (The Wedding Present)
  118. Doolittle (Pixies)
  119. Good Luck, Seeker (The Waterboys)
  120. Movement (New Order)
  121. Fibs (Anna Meredith)
  122. Hours (David Bowie)
  123. Surfer Rosa (Pixies)
  124. Dusk (The The)
  125. Fourteen Autumns & Fifteen Winters (Twilight Sad)
  126. The Queen Is Dead (The Smiths)
  127. Mainstream (Lloyd Cole and the Commotions)
  128. Seventeen Seconds (The Cure)
  129. Strangeways Here We Come (The Smiths)
  130. ACR Loco (A Certain Ratio)
  131. Pornography (The Cure)
  132. Jet Plane and Oxbow (Shearwater)
  133. Hex Enduction Hour (The Fall)
  134. Grotesque (After The Gramme) (The Fall)
  135. Slates (The Fall)
  136. Four-Calendar Café (The Cocteau Twins)
  137. New Facts Emerge (The Fall)
  138. All Blessed (Faithless)
  139. Nobody Wants to Be Here & Nobody Wants to Leave (Twilight Sad)
  140. Songs From Northern Britain (Teenage Fanclub)
  141. Gladsome, Humour & Blue (Martin Stephenson And The Daintees)
  142. Room To Roam (The Waterboys)
  143. Music In A Foreign Language (Lloyd Cole)
  144. Heaven Is Whenever (The Hold Steady)
  145. Songs From The Big Chair (Tears For Fears)
  146. Kiss Ass, Godhead! (Membranes)
  147. This Is the Day…This Is the Hour…This Is This! (Pop Will Eat Itself)

This is everything I’ve listened to that I actually put in my calendar. There may be a few more ad-hoc ones that I didn’t record, but it’s still quite a lot. One day I might go through them and work out how many were new-to-me albums, but that day is not today.

Deploying Multipass Containers

I’ve been running a lot of experiments using Multipass, which is a (fairly) new application for deploying and working with containers on various operating systems (including all the ones I use). I’ve now set up a script to deploy these containers on any Ubuntu machine I install, and thought it might be worth sharing the script that I use.

#!/bin/bash

# Script to set up multipass and then deploy a load of containers for various things
echo "---------------------------------------------"
echo "Multipass Deployment Script - v0.1, June 2020"
echo "---------------------------------------------"

# Changelog:
# 28/6/20 - Created script to deploy 5 containers (POC)

# First off, install multipass:

sudo snap install multipass --classic

# What we're going to do next is:
# 1. Deploy a container for the current LTS version of Ubuntu
# 2. Run my usual post-deployment and update scripts inside that container
# 3. Shut the container down

multipass launch focal --name ubuntu-lts
multipass exec ubuntu-lts -- wget https://www.dropbox.com/s/p5jjsbvuuskeotl/deploy_ubuntu_wsl.sh
multipass exec ubuntu-lts -- sudo mv deploy_ubuntu_wsl.sh /usr/local/bin/
multipass exec ubuntu-lts -- sudo chmod 755 /usr/local/bin/deploy_ubuntu_wsl.sh
multipass exec ubuntu-lts -- deploy_ubuntu_wsl.sh
multipass stop ubuntu-lts

# We will then do the same for the LTS before

multipass launch bionic --name ubuntu-lts-old
multipass exec ubuntu-lts-old -- wget https://www.dropbox.com/s/p5jjsbvuuskeotl/deploy_ubuntu_wsl.sh
multipass exec ubuntu-lts-old -- sudo mv deploy_ubuntu_wsl.sh /usr/local/bin/
multipass exec ubuntu-lts-old -- sudo chmod 755 /usr/local/bin/deploy_ubuntu_wsl.sh
multipass exec ubuntu-lts-old -- deploy_ubuntu_wsl.sh
multipass stop ubuntu-lts-old

# Then we will follow the same process for the latest build of the next version of Ubuntu

multipass launch daily:20.10 --name ubuntu-devel
# TODO: investigate why the devel alias doesn't work for this
multipass exec ubuntu-devel -- wget https://www.dropbox.com/s/p5jjsbvuuskeotl/deploy_ubuntu_wsl.sh
multipass exec ubuntu-devel -- sudo mv deploy_ubuntu_wsl.sh /usr/local/bin/
multipass exec ubuntu-devel -- sudo chmod 755 /usr/local/bin/deploy_ubuntu_wsl.sh
multipass exec ubuntu-devel -- deploy_ubuntu_wsl.sh
multipass stop ubuntu-devel

# Do the same for any other versions of Ubuntu you want but this is probably enough for a POC

# Next up let's try a snapcraft development and test environment. This bit needs work once I know more about it

multipass launch snapcraft:core18  --name snapcraft-build
multipass stop snapcraft-build
multipass launch core18 --name snapcraft-test
multipass stop snapcraft-test

# Finally let's see what we now have:

multipass list

A few words on why I still listen to albums (and how)

I’ve been talking and writing about music a lot over the last week, and am part way through writing up my thoughts on what live music might look like when we all emerge from lock down. In the meantime, my response to Jehnny Beth on how I listen to albums. Jehnny’s question was:

What’s your favourite way of listening to an album? Do you still take time to immerse yourself? What do you think an album represents in 2020? I’d love to read your thoughts.

My response was:

I love to immerse myself in it. I tend to buy albums I really love on vinyl and listen to them when I can fully concentrate on the music. I also prefer to listen to them in the order they were sequenced. I also have playlists on shuffle, but that’s a different type of listening.

I think there is still a place for the album in the world of streaming. A proper album is as different to a load of songs in a playlist as a novel is to a tweet or a short blog post, and I think we still have room for both.

Using the i3 window manager

i3 is a window manager for Linux that I’ve been using for the last few weeks. It’s a fairly steep learning curve, but definitely brings some productivity gains. i3 is a tiling window manager, and by default will fill up the whole screen with applications. So if you have one application open it’s full screen, if you have two open then they each take up 50% of the screen, etc.

Installing i3

A excerpt from my installation script:

# Install the i3 window manager and some basic utilities

sudo apt install -y i3 feh arandr byobu htop

# Download some wallpaper and set it as default when using i3

wget https://www.dropbox.com/s/n5o7jjg4qpuebjn/2017-12-27-13.38.44.jpg
mv 2017-12-27-13.38.44.jpg  default_wallpaper.jpg
echo "feh --bg-scale default_wallpaper.jpg" >> .profile

## Add some aliases

echo alias ls="ls -l" >> .bashrc
echo alias top="htop" >> .bashrc

Using i3

When you log in for the first time you’ll be asked to choose a modifier key (I chose ALT). The keyboard shortcuts below use $mod to refer to that modifier.

  • Open a terminal window – $mod + Enter
  • Open a different application – $mod + d then type the application name (eg firefox)
  • Open (or go to) a second desktop – $mod + 2
  • Send the focused application to that desktop – $mod + Shift + 2
  • Split a container vertically – $mod + v
  • Split a container horizontally – $mod + h
  • Move between containers – $mod + arrow keys
  • Switch to a tabbed layout – $mod + w
  • Switch to a stacked layout – $mod + s
  • Close a window – $mod + Shift + q
  • Exit i3 – $mod + Shift + e

For multiple monitors it’s possible to enable/define them using xrandr. The sysntax is something like:

`xrandr --output HDMI-2 --auto --right-of HDMI-1`

As I have three monitors I find arandr to be a better way to set them up though. It’s a graphical wrapper to xrandr and lets me see the layout of my monitors which I find much more useful.

More information about i3 can be found at https://i3wm.org/docs/userguide.html.

Life During Lockdown

I’ve been maintaining a lock down blog since the start of April. Reading through it I note with interest that there is very little there that I wouldn’t want on the public internet, and that a slightly redacted version might serve as a decent record of these difficult times. I could just dump these into my regular blog, but as with my cycling blog and my micro-KB I thought it was worth keeping it separate (because containers are still important to me). I think this might be the one that aggregates to Twitter (for now) though, as I’m hardly prolific enough anywhere else to make copying and pasting links into Buffer a particularly time consuming task.

https://andy.teknostatik.co.uk/lockdown/ is where it lives. It’s live now, and should be updated most days until we reach whatever the new normal looks like. I will still write here about music and technology, but probably at my usually sporadic rate.