Letter to my MP on UK government assassination of British Citizens in Syria

Below is a copy of the letter I sent to my MP this morning (via writetothem.com). Feel free to re-use and adapt it if you want to send a similar letter.

Update: follow-up letter.

Dear Philip Hammond,

I was extremely concerned to hear of the assassination of two British citizens by the UK armed forces [1].

The Prime Minister and Defence Secretary justified the attack on the basis of self-defence, which I believe is a reference to Article 51 of the UN Charter [2]. I consider the use of this article to cover action against individuals who are suspected of planning domestic terrorism to be wholly inappropriate. I support those who are calling for a legal challenge against this action.

Please pass on my concerns to the Prime Minister and Defence Secretary, and use your considerable influence in this area to make government policy focus on the use of criminal law to prevent domestic terrorism.

Please work to ensure the government abides by the decision of the UK parliament not to participate in military action in Syria, and thus not to treat this situation as a war in which the UK is participating. As you said on 2nd September 2013, “The House of Commons has ruled out military participation in any such response” (referring to our response to the use of chemical weapons).

Yours sincerely,

Andy Balaam

[1] http://www.bbc.co.uk/news/uk-34181475
[2] https://en.wikisource.org/wiki/Charter_of_the_United_Nations#Article_51
[3] http://www.publications.parliament.uk/pa/cm201314/cmhansrd/cm130902/debtext/130902-0001.htm#1309025000394

Changing the Docker daemon options in systemd on Ubuntu 15.04

Update: now documenting the better way, as described in issue 14513.

Update 2: I think this way is even better (works in Ubuntu 16.04, Docker 1.12.2, Reference: dockerd command line):

sudo -s -H
echo '{"insecure-registries":["myreg.example.com:5000"]}' > /etc/docker/daemon.json
exit
sudo service docker restart

End of update 2

On earlier versions of Ubuntu (14.04 and before), changing the command line options to the Docker daemon (e.g. to allow using an insecure private registry) was just a matter of editing /etc/default/docker and uncommenting the line starting with #DOCKER_OPTS=.

On Ubuntu 15.04, even though that file still exists, editing it does not have any effect, and I found it quite tricky to work out how to change Docker’s command line, so I wrote it up here.

I wanted to use an insecure private docker registry for Docker on Ubuntu 15.04, which uses systemd.

Under systemd, we must create a config file that overrides the default Docker command line by typing sudo systemctl edit docker. In the editor which pops up, type:

[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry=myreg.example.com:5000

Note: the first “ExecStart=” line is necessary.

The second “ExecStart=” line should contain whatever command line options you want to include.

Note: for docker versions before 1.10, replace “daemon” with “-d”.

With this config in place, restart the Docker service:

$ sudo systemctl restart docker

Check everything looks right for the Docker service:

$ systemctl status docker

And confirm the command line arguments have been applied with:

$ ps axwww | grep /usr/bin/docker

The instructions here: Control and configure Docker with systemd and issues: 14513 and 15859 suggest that the Docker team are not planning to make this any easier in the short term.

Docker fails to start on Ubuntu 15.04

I installed Docker on Ubuntu 15.04 using:

wget -qO- https://get.docker.com/ | sh

as described at Install Docker on Ubuntu.

I added myself to the docker group:

sudo usermod -aG docker balaaman

Then I logged out and logged in again, and ran:

docker run hello-world

and saw this:

Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

When I tried to start the Docker daemon like this:

sudo service docker start

I got this error:

Failed to start docker.service: Unit docker.service is masked.

Thanks to Yannick Lizzi on this thread I found this fix:

systemctl unmask docker.service
systemctl unmask docker.socket
systemctl start docker.service

After this, I logged out and logged in again (again) and “docker run hello-world” worked fine, and all was well.

Preventing Audacity from crashing when using PulseAudio

I found that Audacity would crash whenever the Playback Device in the Devices section of Preferences was set to “pulse” or “default”.

This can be fixed by launching Audacity like this:

Exec=env PULSE_LATENCY_MSEC=100 audacity

I fixed it “permanently” by modifying my Audacity launcher file, which is in /usr/share/applications/audacity.desktop.

I changed the line starting “Exec=” to:

Exec=env PULSE_LATENCY_MSEC=100 audacity %F

More info is on the Audacity forum.