<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://www.nelug.org.uk/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.nelug.org.uk/" rel="alternate" type="text/html" hreflang="en-GB" /><updated>2026-11-28T15:07:34+00:00</updated><id>https://www.nelug.org.uk/feed.xml</id><title type="html">NELUG - Durham Linux User Group</title><subtitle>Also known as the North East Linux User Group</subtitle><entry><title type="html">The many uses of authorized_keys</title><link href="https://www.nelug.org.uk/the-many-uses-of-authorized-keys/" rel="alternate" type="text/html" title="The many uses of authorized_keys" /><published>2026-11-28T12:00:00+00:00</published><updated>2026-11-28T12:00:00+00:00</updated><id>https://www.nelug.org.uk/the-many-uses-of-authorized-keys</id><content type="html" xml:base="https://www.nelug.org.uk/the-many-uses-of-authorized-keys/"><![CDATA[<h1>The many uses of authorized_keys</h1>
<p>Most of us meet <code>~/.ssh/authorized_keys</code> on the day we stop typing passwords into SSH. You generate a key pair, run <code>ssh-copy-id</code>, and from then on your laptop is trusted by the server. For many people that is where the story ends: the file is just a list of public keys that are allowed to log in.</p>
<p>In fact each line of <code>authorized_keys</code> can carry a set of options that change what that particular key is allowed to do. A key can be limited to a single command, to connections from one address, to opening one tunnel, or to working only until a certain date. Used well, this lets you hand out keys for backups, deployments and monitoring without handing out a shell.</p>
<p>This article walks through those options, with practical examples. It assumes OpenSSH, which is what nearly every Linux distribution ships. Some options are fairly recent, so the OpenSSH version that introduced them is noted where it matters; run <code>ssh -V</code> to check yours.</p>
<p>
<!--more-->
</p>
<h2>The format of a line</h2>
<p>Each non-blank line that does not start with <code>#</code> describes one key, in this form:</p>
<pre>
[options] keytype base64-key [comment]
</pre>
<p>A plain entry with no options looks like this (keys are shortened here and throughout):</p>
<pre>
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGx...Qk richard@laptop
</pre>
<p>Options go at the front, separated by commas, with no spaces between them except inside double quotes:</p>
<pre>
from="192.0.2.0/24",no-pty,command="/usr/bin/uptime" ssh-ed25519 AAAAC3...Qk monitoring
</pre>
<p>The comment at the end is ignored by <code>sshd</code>, but it is worth filling in. When you come back to the file in two years, <code>backup from nas01, added 2026-11</code> is much more useful than <code>root@localhost</code>.</p>
<h3>Permissions and location</h3>
<p>By default <code>sshd</code> reads <code>.ssh/authorized_keys</code> in the user's home directory. With <code>StrictModes yes</code> (the default) it will silently ignore the file if it, the <code>.ssh</code> directory or the home directory is writable by anyone other than the user. If a key mysteriously does not work, this is the first thing to check:</p>
<pre>
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
</pre>
<p>The location is set by <code>AuthorizedKeysFile</code> in <code>/etc/ssh/sshd_config</code>. We will come back to why you might want to change it.</p>

<h2>Locking a key to one command: command=</h2>
<p>The most powerful option is <code>command="..."</code>. When a key with this option is used, <code>sshd</code> runs the given command instead of whatever the client asked for. The client cannot get a shell, cannot run a different program, and cannot start an <code>sftp</code> or <code>scp</code> session, because all of those requests are replaced by the forced command.</p>
<pre>
command="/usr/bin/uptime" ssh-ed25519 AAAAC3...Qk uptime-check
</pre>
<p>Now this works, and is all the key can do:</p>
<pre>
$ ssh -i ~/.ssh/uptime_key server.example.org
 14:02:11 up 31 days,  2:17,  0 users,  load average: 0.04, 0.03, 0.00
$ ssh -i ~/.ssh/uptime_key server.example.org rm -rf /
 14:02:15 up 31 days,  2:17,  0 users,  load average: 0.04, 0.03, 0.00
</pre>
<p>Whatever command the client did ask for is not thrown away. It is put in the environment variable <code>SSH_ORIGINAL_COMMAND</code>, which lets the forced command act as a gatekeeper.</p>
<h3>A small gatekeeper script</h3>
<p>Suppose a monitoring server needs to run a handful of read-only commands. Rather than one key per command, point the key at a script that checks <code>SSH_ORIGINAL_COMMAND</code> against a list:</p>
<pre>
#!/bin/sh
# /usr/local/bin/ssh-monitor-only
# Allow a short list of exact commands, refuse everything else.

logger -t ssh-monitor "requested: ${SSH_ORIGINAL_COMMAND:-(none)}"

case "$SSH_ORIGINAL_COMMAND" in
    "uptime")        exec /usr/bin/uptime ;;
    "df")            exec /bin/df -h ;;
    "free")          exec /usr/bin/free -m ;;
    "check-updates") exec /usr/bin/apt list --upgradable ;;
    *)
        echo "Sorry, that command is not allowed." &gt;&amp;2
        exit 1
        ;;
esac
</pre>
<pre>
command="/usr/local/bin/ssh-monitor-only",restrict ssh-ed25519 AAAAC3...Qk nagios@monitor
</pre>
<p>Two points about writing scripts like this. First, match whole commands exactly, as the <code>case</code> above does, and never pass <code>SSH_ORIGINAL_COMMAND</code> to <code>sh -c</code> or <code>eval</code>: the client controls that string, and a check like "starts with <code>df</code>" is defeated by <code>df; rm -rf ~</code>. Second, run the real programs by full path so the result does not depend on <code>PATH</code>.</p>
<p>The <code>logger</code> line is optional but handy. It records every request in the system log, which is a good way to find out what a new tool actually runs over SSH before you write the allow list.</p>
<p>If you want this behaviour for every key of a user, or for a group of users, the same thing can be done in <code>sshd_config</code> with <code>ForceCommand</code> inside a <code>Match</code> block. The <code>authorized_keys</code> version has the advantage that one account can have an unrestricted key for you and restricted keys for machines.</p>

<h2>Switching things off: restrict and the no-* options</h2>
<p>Even when a key is locked to one command, the client can still ask for other things: a pseudo-terminal, agent forwarding, X11 forwarding and TCP port forwarding. A backup key that can also open a tunnel into your internal network is not much of a restriction. There are individual options to turn each of these off:</p>
<ul>
<li><code>no-pty</code>: do not allocate a terminal</li>
<li><code>no-port-forwarding</code>: refuse <code>-L</code>, <code>-R</code> and <code>-D</code> forwarding</li>
<li><code>no-agent-forwarding</code>: refuse <code>-A</code></li>
<li><code>no-X11-forwarding</code>: refuse <code>-X</code> and <code>-Y</code></li>
<li><code>no-user-rc</code>: do not run <code>~/.ssh/rc</code> on login</li>
</ul>
<p>Since OpenSSH 7.2 there is a much better way: <code>restrict</code>. It turns all of the above off in one word, and, importantly, it will also turn off any new capability added to future versions of OpenSSH. With the long list of <code>no-*</code> options you are only protected against the features you knew about when you wrote the line.</p>
<p>You can then switch individual features back on after <code>restrict</code>. The positive options are <code>pty</code>, <code>port-forwarding</code>, <code>agent-forwarding</code>, <code>X11-forwarding</code> and <code>user-rc</code>:</p>
<pre>
# A forced command that needs a terminal (for example an interactive menu)
restrict,pty,command="/usr/local/bin/console-menu" ssh-ed25519 AAAAC3...Qk helpdesk
</pre>
<p>A good habit is to start every restricted key with <code>restrict</code> and add back only what it needs.</p>

<h2>Limiting where a key can be used from: from=</h2>
<p><code>from="pattern-list"</code> means the key is only accepted from matching client addresses. The list is comma-separated, takes CIDR ranges and <code>*</code> and <code>?</code> wildcards, and an entry starting with <code>!</code> excludes a match:</p>
<pre>
from="192.0.2.10" ssh-ed25519 AAAAC3...Qk backup@nas01
from="192.0.2.0/24,2001:db8::/32,!192.0.2.13" ssh-ed25519 AAAAC3...Qk office-machines
</pre>
<p>The point of <code>from=</code> is that a stolen key is far less useful. If the private key for the backup server leaks, the thief also has to be connecting from the backup server's address.</p>
<p>Hostnames are allowed too, but be careful. Matching a name needs a reverse DNS lookup of the client, and current OpenSSH does not do that unless <code>UseDNS yes</code> is set in <code>sshd_config</code>. It also means trusting whoever controls the reverse DNS for the client's address. Addresses are the safer choice.</p>

<h2>Tunnels only: permitopen= and permitlisten=</h2>
<p>Sometimes a key exists only to carry a tunnel, for example to reach a database that is not exposed to the internet, or to let a machine behind NAT phone home. Rather than allowing all port forwarding, you can name exactly which forwards are allowed.</p>
<h3>Local forwarding (-L) and jump hosts</h3>
<p><code>permitopen="host:port"</code> limits the destinations a key may connect to with <code>ssh -L</code>, or with <code>ssh -W</code>, which is what <code>ProxyJump</code> uses. You can give the option more than once, and the port can be <code>*</code>:</p>
<pre>
restrict,port-forwarding,permitopen="db.internal:5432",command="/bin/false" ssh-ed25519 AAAAC3...Qk reporting-laptop
</pre>
<p>The holder of this key can run</p>
<pre>
ssh -N -L 5432:db.internal:5432 gateway.example.org
</pre>
<p>and nothing else: no shell (the forced command is <code>/bin/false</code>), and no tunnel to anything except port 5432 on <code>db.internal</code>. Note that <code>port-forwarding</code> has to be switched back on after <code>restrict</code>.</p>
<p>The same idea makes a tidy bastion host. A key with <code>restrict,port-forwarding,permitopen="10.0.0.*:22"</code> can be used as a <code>ProxyJump</code> to reach SSH on the internal machines, but cannot log in to the bastion itself.</p>
<h3>Remote forwarding (-R)</h3>
<p><code>permitlisten="[host:]port"</code> (OpenSSH 7.8 and later) does the same for remote forwards, limiting which ports the client may ask the server to listen on. This is the classic "reverse tunnel" for a Raspberry Pi on a home broadband line that you want to reach from outside:</p>
<pre>
restrict,port-forwarding,permitlisten="localhost:2222",command="/bin/false" ssh-ed25519 AAAAC3...Qk pi@home
</pre>
<p>On the Pi (perhaps under <code>autossh</code> or a systemd service):</p>
<pre>
ssh -N -R 2222:localhost:22 tunnel@server.example.org
</pre>
<p>Logged in to the server, you can now reach the Pi with <code>ssh -p 2222 localhost</code>, while the Pi's key cannot do anything on the server except hold that one port open.</p>

<h2>Keys that expire: expiry-time=</h2>
<p>Since OpenSSH 7.7 a key can be given an end date. After it passes, the key is refused:</p>
<pre>
expiry-time="20261231" ssh-ed25519 AAAAC3...Qk contractor
expiry-time="202612011800Z" ssh-ed25519 AAAAC3...Qk workshop-demo
</pre>
<p>The format is <code>YYYYMMDD</code> or <code>YYYYMMDDHHMM[SS]</code>. Times are in the server's local time zone unless they end in <code>Z</code>, which means UTC.</p>
<p>This is ideal for temporary access: a contractor for the length of a job, a friend helping fix a server for a weekend, or the demo machine at a LUG workshop. The access closes itself even if nobody remembers to remove the line, though you should still tidy the file up afterwards.</p>

<h2>Setting variables: environment=</h2>
<p><code>environment="NAME=value"</code> sets an environment variable for sessions using that key, and can be given several times. One use is to tell a shared script who is calling it:</p>
<pre>
restrict,environment="DEPLOY_TARGET=staging",command="/usr/local/bin/deploy" ssh-ed25519 AAAAC3...Qk ci-staging
restrict,environment="DEPLOY_TARGET=production",command="/usr/local/bin/deploy" ssh-ed25519 AAAAC3...Qk ci-production
</pre>
<p>There is a catch. This option is ignored unless the server has <code>PermitUserEnvironment</code> enabled, and it is off by default for good reason: a user who can set variables such as <code>LD_PRELOAD</code> may be able to get around restrictions. Since OpenSSH 7.8 you can give <code>PermitUserEnvironment</code> a list of allowed variable names instead of <code>yes</code>, which is much safer:</p>
<pre>
# /etc/ssh/sshd_config
PermitUserEnvironment DEPLOY_TARGET
</pre>
<p>Often it is simpler to avoid the option altogether and pass an argument in the forced command instead, for example <code>command="/usr/local/bin/deploy staging"</code>.</p>

<h2>Practical recipes</h2>
<p>Putting the options together, here are some patterns that come up again and again.</p>
<h3>A backup key with rsync: rrsync</h3>
<p>rsync over SSH runs a command of the form <code>rsync --server ...</code> on the remote end, with arguments that vary, so it is awkward to allow with a plain <code>case</code> script. The rsync project ships a helper called <code>rrsync</code> ("restricted rsync") for exactly this job. It checks the rsync request and confines it to one directory. On Debian and Ubuntu it is installed as <code>/usr/bin/rrsync</code> by recent rsync packages; on older systems you will find it among rsync's documentation as <code>scripts/rrsync</code>.</p>
<p>On a machine to be backed up, give the backup server a read-only key limited to <code>/home</code>:</p>
<pre>
from="192.0.2.10",restrict,command="/usr/bin/rrsync -ro /home/" ssh-ed25519 AAAAC3...Qk backup@nas01
</pre>
<p>The backup server then pulls with an ordinary rsync command. Paths are relative to the directory given to <code>rrsync</code>:</p>
<pre>
rsync -a -e "ssh -i ~/.ssh/backup_key" root@desktop.example.org:/ /srv/backups/desktop/home/
</pre>
<p>Use <code>-wo</code> instead of <code>-ro</code> for a key that may only upload, which suits machines that push their backups to a central server.</p>
<h3>A backup key with Borg or restic</h3>
<p>Modern backup tools have their own server mode designed for this. With BorgBackup, each client's key on the backup server can be confined to its own repository, and with <code>--append-only</code> a compromised client cannot delete its old backups:</p>
<pre>
restrict,command="borg serve --restrict-to-path /srv/borg/laptop --append-only" ssh-ed25519 AAAAC3...Qk borg@laptop
</pre>
<p>restic can work the same way: its <code>rest-server</code> also has an <code>--append-only</code> mode, or you can point restic at an SFTP-only key like the one below.</p>
<h3>An SFTP-only key</h3>
<p>To let a key transfer files but never get a shell, force the built-in SFTP server:</p>
<pre>
restrict,command="internal-sftp" ssh-ed25519 AAAAC3...Qk website-uploads
</pre>
<p>Plain <code>sftp</code> clients (and <code>scp</code> in OpenSSH 9.0 and later, which uses the SFTP protocol by default) will work; asking for a shell or a command will fail. If you also want to lock the user into one directory, use <code>ChrootDirectory</code> in a <code>Match</code> block in <code>sshd_config</code>.</p>
<h3>A push-button key</h3>
<p>A key that does exactly one thing is a simple and safe way to let one machine trigger an action on another: restart a service after a deployment, rebuild a website when a Git push arrives, or turn on a machine with wake-on-LAN.</p>
<pre>
restrict,command="/usr/bin/sudo /usr/bin/systemctl restart myapp" ssh-ed25519 AAAAC3...Qk ci-restart
</pre>
<p>Pair it with a <code>sudoers</code> rule that allows only that exact command, for example <code>deploy ALL=(root) NOPASSWD: /usr/bin/systemctl restart myapp</code>. The CI system can restart the application, but if its key is stolen, the worst anyone can do with it is restart the application.</p>
<h3>One account, many people: Git hosting</h3>
<p>Self-hosted Git services such as Gitolite and Gitea use this mechanism to let many people share a single <code>git</code> account. Every user's key is added with a forced command that says who the key belongs to. With Gitolite it looks like this:</p>
<pre>
command="/usr/share/gitolite3/gitolite-shell alice",restrict ssh-ed25519 AAAAC3...Qk alice
command="/usr/share/gitolite3/gitolite-shell bob",restrict ssh-ed25519 AAAAC3...Qk bob
</pre>
<p>When someone runs <code>git push git@server:project.git</code>, <code>sshd</code> knows which key was used and so which line matched, and <code>gitolite-shell</code> is told who is pushing. It reads <code>SSH_ORIGINAL_COMMAND</code> to see which repository is wanted and checks that person's permissions. This is how one Unix account can serve hundreds of users with different rights.</p>

<h2>Beyond single keys: certificates</h2>
<p>Copying public keys onto every server works for a handful of machines but becomes a chore as things grow. OpenSSH has its own lightweight certificate system (not X.509), and <code>authorized_keys</code> can take part in it too.</p>
<h3>cert-authority</h3>
<p>The <code>cert-authority</code> option says that this line is not a user's key but the key of a certificate authority (CA). Any user certificate signed by that CA is then accepted, without each user's key being listed:</p>
<pre>
cert-authority,principals="richard" ssh-ed25519 AAAAC3...Qk NELUG user CA
</pre>
<p>Making a CA is just making another key pair, which you then keep somewhere safe:</p>
<pre>
ssh-keygen -t ed25519 -f nelug_user_ca -C "NELUG user CA"
</pre>
<p>To give someone access, sign their public key. The <code>-n</code> option sets the principals (the names the certificate is valid for) and <code>-V</code> sets how long it lasts:</p>
<pre>
ssh-keygen -s nelug_user_ca -I "richard laptop" -n richard -V +52w id_ed25519.pub
</pre>
<p>This writes <code>id_ed25519-cert.pub</code> next to the user's key, and <code>ssh</code> picks it up automatically. You can inspect a certificate with <code>ssh-keygen -L -f id_ed25519-cert.pub</code>.</p>
<h3>principals=</h3>
<p>On a <code>cert-authority</code> line, <code>principals="name1,name2"</code> says which principals are acceptable. Without it, a certificate is accepted if one of its principals matches the name of the account being logged in to. With it, you can let several people into a shared account, for example <code>principals="richard,olly"</code> on the <code>www</code> account.</p>
<p>The other <code>authorized_keys</code> options still apply to a <code>cert-authority</code> line, so you can combine a CA with <code>from=</code>, <code>restrict</code> and so on. Certificates can also carry restrictions of their own when they are signed: <code>ssh-keygen -O force-command=...</code> and <code>-O source-address=...</code> do the job of <code>command=</code> and <code>from=</code>, but are baked into the certificate itself.</p>
<p>For larger setups, the CA is usually configured server-wide with <code>TrustedUserCAKeys</code> in <code>sshd_config</code> instead, but the <code>authorized_keys</code> form is a gentle way to try certificates on one account first.</p>

<h2>Odds and ends</h2>
<h3>Hardware security keys</h3>
<p>OpenSSH 8.2 added keys held on FIDO security keys such as YubiKeys (the <code>sk-ssh-ed25519@openssh.com</code> and <code>sk-ecdsa-sha2-nistp256@openssh.com</code> types). By default the user must touch the key for each login. Two options adjust this: <code>no-touch-required</code> drops the touch requirement (useful for automation, but it throws away much of the benefit), and <code>verify-required</code> (OpenSSH 8.9) insists that the key also checked the user's PIN or fingerprint.</p>
<h3>VPN tunnels: tunnel=</h3>
<p>OpenSSH can carry a layer 2 or layer 3 VPN with <code>ssh -w</code>, if <code>PermitTunnel</code> is enabled. <code>tunnel="n"</code> forces a key to use tun device number <code>n</code> on the server. This is rarely used now that WireGuard exists, but it is there.</p>
<h3>Keeping the user out of their own file</h3>
<p>All of these restrictions have one weakness: if the account can write to its own <code>authorized_keys</code>, a restricted key could be used to edit the file and remove its own restrictions. A good forced command makes that impossible in practice, but for accounts that only exist to be restricted (backup, deployment, tunnels) it is better to move the file somewhere the user cannot change. In <code>sshd_config</code>:</p>
<pre>
AuthorizedKeysFile /etc/ssh/authorized_keys/%u .ssh/authorized_keys
</pre>
<p>Files under <code>/etc/ssh/authorized_keys/</code> are owned by root and readable by the user. <code>%u</code> is replaced with the user name, and <code>%h</code> with the home directory. Keeping <code>.ssh/authorized_keys</code> as a second entry means normal users carry on as before. For full central management, <code>AuthorizedKeysCommand</code> can fetch keys from a program instead (from LDAP, for example).</p>
<h3>Debugging</h3>
<p>When a key does not behave as you expect:</p>
<ul>
<li>Run the client with <code>ssh -v</code>. It shows whether the key was offered and accepted, and the server sends back which options were applied, as <code>debug1: Remote: ...</code> lines.</li>
<li>Read the server log (<code>journalctl -u ssh</code> on Debian and Ubuntu, <code>journalctl -u sshd</code> on Fedora and others). Permission problems and bad option syntax are reported there, not to the client.</li>
<li><code>ssh-keygen -lf ~/.ssh/authorized_keys</code> lists the fingerprint of every key in the file. Compare these with the fingerprint in the log to see which line was used.</li>
<li>A typo in the options usually makes <code>sshd</code> ignore the whole line, so the key simply stops working. Check for stray spaces, and for curly quotes if you pasted the line from a web page or a word processor.</li>
</ul>

<h2>Summary</h2>
<p>A quick reference for the options covered here:</p>
<ul>
<li><code>command="..."</code>: always run this command; the client's request is in <code>SSH_ORIGINAL_COMMAND</code></li>
<li><code>restrict</code>: turn off forwarding, terminals and <code>~/.ssh/rc</code>, now and in future versions</li>
<li><code>pty</code>, <code>port-forwarding</code>, <code>agent-forwarding</code>, <code>X11-forwarding</code>, <code>user-rc</code>: turn one feature back on after <code>restrict</code></li>
<li><code>no-pty</code>, <code>no-port-forwarding</code>, <code>no-agent-forwarding</code>, <code>no-X11-forwarding</code>, <code>no-user-rc</code>: turn one feature off</li>
<li><code>from="..."</code>: only accept the key from these addresses</li>
<li><code>permitopen="host:port"</code>: limit <code>-L</code> and <code>-W</code> forwarding to these destinations</li>
<li><code>permitlisten="[host:]port"</code>: limit <code>-R</code> forwarding to these listening ports</li>
<li><code>expiry-time="..."</code>: refuse the key after this date</li>
<li><code>environment="NAME=value"</code>: set a variable (needs <code>PermitUserEnvironment</code>)</li>
<li><code>cert-authority</code> and <code>principals="..."</code>: trust certificates signed by this CA</li>
<li><code>no-touch-required</code>, <code>verify-required</code>: adjust FIDO security key checks</li>
<li><code>tunnel="n"</code>: force a tun device number</li>
</ul>
<p>The full list, with all the details, is in the <code>AUTHORIZED_KEYS FILE FORMAT</code> section of the <code>sshd(8)</code> manual page, so <code>man sshd</code> is worth a read with this article in mind. The next time you are about to give a script or another machine a key to one of your servers, ask what it actually needs to do, and write a line that allows that and nothing more.</p>]]></content><author><name>Richard</name></author><summary type="html"><![CDATA[The many uses of authorized_keys Most of us meet ~/.ssh/authorized_keys on the day we stop typing passwords into SSH. You generate a key pair, run ssh-copy-id, and from then on your laptop is trusted by the server. For many people that is where the story ends: the file is just a list of public keys that are allowed to log in. In fact each line of authorized_keys can carry a set of options that change what that particular key is allowed to do. A key can be limited to a single command, to connections from one address, to opening one tunnel, or to working only until a certain date. Used well, this lets you hand out keys for backups, deployments and monitoring without handing out a shell. This article walks through those options, with practical examples. It assumes OpenSSH, which is what nearly every Linux distribution ships. Some options are fairly recent, so the OpenSSH version that introduced them is noted where it matters; run ssh -V to check yours.]]></summary></entry><entry><title type="html">Registrations on website suspended</title><link href="https://www.nelug.org.uk/registrations-on-website-suspended/" rel="alternate" type="text/html" title="Registrations on website suspended" /><published>2015-12-01T20:51:01+00:00</published><updated>2015-12-01T20:51:01+00:00</updated><id>https://www.nelug.org.uk/registrations-on-website-suspended</id><content type="html" xml:base="https://www.nelug.org.uk/registrations-on-website-suspended/"><![CDATA[<h1>New registrations on the website disabled.</h1>
<p>For the time being, I have had to disable the ability for anyone to register, due to the number of spam accounts created, etc.</p>
<p>If you would like an account on the site, let me know. (Mailing List)</p>
<p>The group is still quite active, best way to get in touch with anyone would be on the mailing list.</p>
<p> </p>]]></content><author><name>admin</name></author><summary type="html"><![CDATA[New registrations on the website disabled. For the time being, I have had to disable the ability for anyone to register, due to the number of spam accounts created, etc. If you would like an account on the site, let me know. (Mailing List) The group is still quite active, best way to get in touch with anyone would be on the mailing list.  ]]></summary></entry><entry><title type="html">CryptoParty Durham wiki snapshot</title><link href="https://www.nelug.org.uk/cryptoparty-durham-wiki-snapshot/" rel="alternate" type="text/html" title="CryptoParty Durham wiki snapshot" /><published>2014-10-20T18:07:42+01:00</published><updated>2014-10-20T18:07:42+01:00</updated><id>https://www.nelug.org.uk/cryptoparty-durham-wiki-snapshot</id><content type="html" xml:base="https://www.nelug.org.uk/cryptoparty-durham-wiki-snapshot/"><![CDATA[<div id="dokuwiki__site">
<div class="dokuwiki site mode_show hasSidebar" id="dokuwiki__top">
<div class="wrapper">
<div id="dokuwiki__content">
<div class="pad">
<div class="page">
<p class="sectionedit2"><em>Our meeting on 21st Oct 2014 is going to be a cryptoparty. This is a snapshot of the organising wiki page, taken from cryptoparty.in/durham on 20th.</em></p>
<h2 class="sectionedit2"></h2>
<h2 class="sectionedit2" id="cryptoparty_on_october_21st_2014">CryptoParty on October 21st, 2014</h2>
<div class="level2">
<hr/>
<p><strong>Welcome to the organising page for the Durham CryptoParty.</strong></p>
<p><a class="urlextern" href="https://network23.org/dfs3/events/durham-cryptoparty/" rel="nofollow" title="https://network23.org/dfs3/events/durham-cryptoparty/">Book your place now</a> ← This will not record anything about you other than what you write in the form. You can use a pseudonym.</p>
<p>Please book yourself a place if you intend to be there on the night in<br/>
any capacity, so we don’t overcrowd the room. If we get fully booked<br/>
we’ll think about putting on another event for anyone who we couldnt’<br/>
fit in.</p>
<p>There is no charge for attendance. We have been given free use of a room<br/>
on the understanding that we will be buying drinks at the bar which is<br/>
open from 7.30PM.</p>
<hr/>
</div>
<h3 class="sectionedit3" id="what_is_a_cryptoparty">What is a CryptoParty?</h3>
<div class="level3">
<p> </p>
<p>Attend this CryptoParty to learn and teach how to use basic cryptography tools. A CryptoParty is free, public and fun. People bring their computers, mobile devices, and a willingness to learn! <strong>CryptoParty</strong><br/>
is a decentralized, global initiative to introduce the most basic<br/>
cryptography software and the fundamental concepts of their operation to the general public, such as the Tor anonymity network, public key<br/>
encryption (PGP/GPG), and OTR (Off The Record messaging).</p>
<p>CryptoParties are free to attend, public, and commercially and politically non-aligned. (see the <a class="wikilink1" href="https://www.cryptoparty.in/guiding_principles" title="guiding_principles">guiding principles</a>)</p>
</div>
<h4 id="who_should_come">Who should come?</h4>
<div class="level4">
<p>Anyone who wants to learn about, or share their skills about, basic<br/>
cryptographic software. That means the kind of program that can keep<br/>
your personal information private, if you use it properly. So if you<br/>
don’t like the idea of strangers looking at your personal things, and<br/>
you use a computer, this is for you.</p>
</div>
<h4 id="who_is_organising_this">Who is organising this?</h4>
<div class="level4">
<p>The event has been instigated by some members of Durham Linux User<br/>
Group, however the event is open to users of all computer systems. We’re<br/>
offering this event as a service to the community, because we think<br/>
it’s important that people should be able to protect their privacy (it<br/>
is a human right, after all) and because it’s fun 🙂</p>
<p>We are also reaching out to some other local groups in the hope of<br/>
involving them. If you have knowledge of a non-*nix system and are able<br/>
to help people use simple encryption tools on it, please make yourself<br/>
known (use an alias if you like) in the <span class="curid"><a class="wikilink1" href="https://www.cryptoparty.in/durham#volunteers" title="durham">volunteers</a></span> section below.</p>
</div>
<h4 id="what_should_i_do_before_i_come">What should I do before I come?</h4>
<div class="level4">
<p>This website you’re reading now has loads of useful information on it. Have a look at the <a class="wikilink1" href="https://www.cryptoparty.in/documentation" title="documentation">documentation</a><br/>
and see what you make of it. If you find it easy, you can come along<br/>
and help people who didn’t find it easy. We can all learn something from<br/>
each other.</p>
</div>
<h4 id="keysigning_session">Keysigning session</h4>
<div class="level4">
<p>We will be holding a keysigning session at the cryptoparty. This helps<br/>
us to build a Web of Trust both amongst ourselves and with the wider<br/>
online community.</p>
<p>To take part you will need to:</p>
<ul>
<li class="level1">
<div class="li">before the signing (preferably before the party to streamline things on the night)</div>
<ul>
<li class="level2">
<div class="li"><a class="urlextern" href="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#prep" rel="nofollow" title="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#prep">generate a private PGP/GPG key</a> – if you do not already have one.</div>
</li>
<li class="level2">
<div class="li">send the key fingerprint to <code>richm+keysigning@oldelvet.org.uk</code>. The following GPG command outputs the information that you need to send.</div>
<ul>
<li class="level3">
<div class="li"><code>gpg –fingerprint &lt;Your_Key_ID&gt;</code></div>
</li>
</ul>
</li>
</ul>
</li>
<li class="level1">
<div class="li">At the party.</div>
<ul>
<li class="level2">
<div class="li">be prepared to identify yourself/your key.</div>
<ul>
<li class="level3">
<div class="li">Typically we suggest that you bring yourself and two forms of photo ID.</div>
</li>
<li class="level3">
<div class="li">However some people choose to only<br/>
prove that they have control of a key and not to tie this to a<br/>
government recognised form of ID.</div>
</li>
<li class="level3">
<div class="li">See the examples under <a class="urlextern" href="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#signing_policy" rel="nofollow" title="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#signing_policy">Keysigning policy</a> for what options are generally used.</div>
</li>
</ul>
</li>
<li class="level2">
<div class="li">verify the ID of others at the party. We will be using the <a class="urlextern" href="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#list_based" rel="nofollow" title="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#list_based">list based method</a>. Copies of the keysigning list will be available at the party.</div>
</li>
</ul>
</li>
<li class="level1">
<div class="li">After the party.</div>
<ul>
<li class="level2">
<div class="li"><a class="urlextern" href="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#after_keysigning_party" rel="nofollow" title="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html#after_keysigning_party">sign the keys</a> of the people whose ID you verified.</div>
</li>
</ul>
</li>
</ul>
</div>
<h3 class="sectionedit4" id="more_gpg_keysigning_reading">More GPG &amp; keysigning reading</h3>
<div class="level3">
<ul>
<li class="level1">
<div class="li"><a class="urlextern" href="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html" rel="nofollow" title="http://cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html">Keysigning party howto</a></div>
</li>
<li class="level1">
<div class="li"><a class="urlextern" href="http://mirror-de.cryptoparty.is/handbook/chapter_06_email_encryption/chapter_06_email_encryption.html" rel="nofollow" title="http://mirror-de.cryptoparty.is/handbook/chapter_06_email_encryption/chapter_06_email_encryption.html">Email encryption</a></div>
</li>
<li class="level1">
<div class="li"><a class="urlextern" href="https://help.riseup.net/pt/security/message-security/openpgp/gpg-best-practices" rel="nofollow" title="https://help.riseup.net/pt/security/message-security/openpgp/gpg-best-practices"> OpenPGP best practices</a></div>
</li>
<li class="level1">
<div class="li"><a class="urlextern" href="https://raw.githubusercontent.com/ioerror/duraconf/master/configs/gnupg/gpg.conf" rel="nofollow" title="https://raw.githubusercontent.com/ioerror/duraconf/master/configs/gnupg/gpg.conf"> Example of hardened gpg.conf</a></div>
</li>
</ul>
</div>
<div class="secedit editbutton_section editbutton_4">
<form action="/durham" class="button btn_secedit" method="post"></form>
</div>
<h3 class="sectionedit5" id="now_the_organising_section">Now the organising section…</h3>
<div class="level3">
<p>Nobody is in charge so dive in and make it happen. You see those little<br/>
gray words that say “Edit” to the right of this? They are talking to you<br/>
kid. Also the thing at the top left that say “Edit this page” is also<br/>
talking to you, the difference is that does the whole page at once.</p>
<p>Go on… if you don’t do it, maybe no one will… and if you’re not sure<br/>
just edit the Q&amp;A section and put in a question then check back<br/>
later to see if someone answered it.</p>
</div>
<h4 id="what_we_have">What we have</h4>
<div class="level4">
<p>This is what we’ve got:</p>
<ul>
<li class="level1">
<div class="li">Venue: Classroom at the <a class="urlextern" href="http://www.durham-arc.org.uk/" rel="nofollow" title="http://www.durham-arc.org.uk/">Durham Amateur Rowing Club</a></div>
</li>
<li class="level1">
<div class="li">Time: 7.30pm to 10.30pm</div>
</li>
<li class="level1">
<div class="li">Desk space and chairs for up to 30 people</div>
</li>
<li class="level1">
<div class="li">Plenty of power sockets</div>
</li>
<li class="level1">
<div class="li">wifi</div>
</li>
<li class="level1">
<div class="li">projector with VGA input if anyone wants to show stuff to the group</div>
</li>
<li class="level1">
<div class="li">“break out” space in the bar</div>
</li>
<li class="level1">
<div class="li">parking for cars and bikes. and boats for that matter.</div>
</li>
<li class="level1">
<div class="li">level access for those with mobility problems</div>
</li>
<li class="level1">
<div class="li">Real ale</div>
</li>
</ul>
</div>
<h4 id="what_we_need">What we need</h4>
<div class="level4">
<p>Can you help us source these?</p>
<ul>
<li class="level1">
<div class="li">Snacks</div>
</li>
<li class="level1">
<div class="li">Signage</div>
</li>
<li class="level1">
<div class="li"><del>Some old, cheapo USB flash<br/>
drives to give away TAILS on. Anyone know where we can get some, e.g.<br/>
some promotional ones that got overproduced?</del> [TAILS needs at least<br/>
4GB, or 8GB with a persistent volume, so old drives are likely to be<br/>
far too small. We could easily set up TAILS for anyone who brings along<br/>
their own USB drive.]</div>
</li>
<li class="level1">
<div class="li">Relevant campaign stickers</div>
</li>
</ul>
</div>
<h4 id="volunteers">Volunteers</h4>
<div class="level4"></div>
<h5 id="in_advance">In advance</h5>
<div class="level5">
<div class="table sectionedit6">
<table class="inline">
<thead>
<tr class="row0">
<th class="col0">Role</th>
<th class="col1">Volunteer</th>
</tr>
</thead>
<tbody>
<tr class="row1">
<td class="col0">Make some witty, attractive promotional materials</td>
<td class="col1"><em>who has dem skillz please?</em></td>
</tr>
<tr class="row2">
<td class="col0">Add good ideas to this wiki page</td>
<td class="col1"><em>all</em></td>
</tr>
<tr class="row3">
<td class="col0">Contact interested local groups</td>
<td class="col1"><em>all</em></td>
</tr>
<tr class="row4">
<td class="col0">Make some signs (A4 should do) to direct people to the right room</td>
<td class="col1"><em>who has access to a printer at work?</em></td>
</tr>
<tr class="row5">
<td class="col0">Bake a cake #1</td>
<td class="col1"><em>mark will make one</em></td>
</tr>
<tr class="row6">
<td class="col0">Bake <del>a cake #2</del> biscuits (session cookies?)</td>
<td class="col1"><em>olly</em></td>
</tr>
<tr class="row7">
<td class="col0">Pump out social media &amp; other links &amp; invitations pointing to this page</td>
<td class="col1"><em>all</em></td>
</tr>
</tbody>
</table>
</div>
</div>
<h5 id="publicity_and_inivitations">Publicity and Inivitations</h5>
<div class="level5">
<p>All of us should be inviting people and groups, however if one of those<br/>
people gets multiple invitations it would make us look like some dodgy<br/>
spam-lords. Which we aint. So record here when you invite someone. If<br/>
you’re thinking of inviting some people, check here first to see if<br/>
they’ve already been invited.</p>
<ul>
<li class="level1">
<div class="li">Durham Uni computer society</div>
</li>
<li class="level1">
<div class="li">Durham Uni pro-bono lawyers</div>
</li>
<li class="level1">
<div class="li">DU librarians</div>
</li>
<li class="level1">
<div class="li">Durham student union activities</div>
</li>
<li class="level1">
<div class="li">DSU LGBTA</div>
</li>
<li class="level1">
<div class="li">Durham Palestine Educational Trust</div>
</li>
<li class="level1">
<div class="li">Durham Free Software Skillshare project</div>
</li>
<li class="level1">
<div class="li">Transition Durham</div>
</li>
<li class="level1">
<div class="li">Open Rights Group</div>
</li>
</ul>
</div>
<h5 id="on_the_night">On the night</h5>
<div class="level5">
<p>I think the main plan is to hang loose and show each other cool stuff.<br/>
However if lots of people turn up needing a basic overview of a topic,<br/>
it would be cool to have a 5-minute presentation prepared, would it not?<br/>
There are <a class="wikilink1" href="https://www.cryptoparty.in/spread/slides" title="spread:slides">slides</a> already on this wiki for us to use. Could folks nominate themselves here / add your offer to the list, or take one of these:</p>
<div class="table sectionedit7">
<table class="inline">
<thead>
<tr class="row0">
<th class="col0">Role</th>
<th class="col1">Volunteer</th>
</tr>
</thead>
<tbody>
<tr class="row1">
<td class="col0">PGP basics</td>
<td class="col1"><em>Olly</em></td>
</tr>
<tr class="row2">
<td class="col0">PGP keysigning</td>
<td class="col1"><em>Rich M</em></td>
</tr>
<tr class="row3">
<td class="col0">Simple TOR usage with TBB</td>
<td class="col1"><em>mark</em></td>
</tr>
<tr class="row4">
<td class="col0">OTR</td>
<td class="col1"><em>Dan + someone else? Alice and Bob?</em></td>
</tr>
<tr class="row5">
<td class="col0">Hard disk encryption</td>
<td class="col1"><em>several of us know how to use dmcrypt?</em></td>
</tr>
<tr class="row6">
<td class="col0">Mac go-to person</td>
<td class="col1"><em>Helen</em></td>
</tr>
<tr class="row7">
<td class="col0">Windows go-to person</td>
<td class="col1"><em>Rich P</em></td>
</tr>
</tbody>
</table>
</div>
</div>
<h4 id="questions_and_answers">Questions and Answers</h4>
<div class="level4">
<p>please add Q/A depending on what you have</p>
<p><strong>Q</strong> Will the cakes be stored in a CryptoPantry?</p>
<p><strong>A</strong> No, nor will they contain keys.</p>
<p><strong>Q</strong> I have a 3D printer which can dispense solder paste. Can I use it to render my key into icing on top of a cake?</p>
<p><strong>A</strong> You should definitely do that. Use a clean syringe though.</p>
<p><strong>Q</strong> Who should attend?</p>
<p><strong>A</strong> Anyone who wants to learn or share how to use simple encryption tools</p>
<p><strong>Q</strong> What should I bring?</p>
<p><strong>A</strong> Bring a portable computing device if you want help to use it</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>]]></content><author><name>Mark</name></author><summary type="html"><![CDATA[Our meeting on 21st Oct 2014 is going to be a cryptoparty. This is a snapshot of the organising wiki page, taken from cryptoparty.in/durham on 20th. CryptoParty on October 21st, 2014 Welcome to the organising page for the Durham CryptoParty. Book your place now ← This will not record anything about you other than what you write in the form. You can use a pseudonym. Please book yourself a place if you intend to be there on the night in any capacity, so we don’t overcrowd the room. If we get fully booked we’ll think about putting on another event for anyone who we couldnt’ fit in. There is no charge for attendance. We have been given free use of a room on the understanding that we will be buying drinks at the bar which is open from 7.30PM. What is a CryptoParty?   Attend this CryptoParty to learn and teach how to use basic cryptography tools. A CryptoParty is free, public and fun. People bring their computers, mobile devices, and a willingness to learn! CryptoParty is a decentralized, global initiative to introduce the most basic cryptography software and the fundamental concepts of their operation to the general public, such as the Tor anonymity network, public key encryption (PGP/GPG), and OTR (Off The Record messaging). CryptoParties are free to attend, public, and commercially and politically non-aligned. (see the guiding principles) Who should come? Anyone who wants to learn about, or share their skills about, basic cryptographic software. That means the kind of program that can keep your personal information private, if you use it properly. So if you don’t like the idea of strangers looking at your personal things, and you use a computer, this is for you. Who is organising this? The event has been instigated by some members of Durham Linux User Group, however the event is open to users of all computer systems. We’re offering this event as a service to the community, because we think it’s important that people should be able to protect their privacy (it is a human right, after all) and because it’s fun 🙂 We are also reaching out to some other local groups in the hope of involving them. If you have knowledge of a non-*nix system and are able to help people use simple encryption tools on it, please make yourself known (use an alias if you like) in the volunteers section below. What should I do before I come? This website you’re reading now has loads of useful information on it. Have a look at the documentation and see what you make of it. If you find it easy, you can come along and help people who didn’t find it easy. We can all learn something from each other. Keysigning session We will be holding a keysigning session at the cryptoparty. This helps us to build a Web of Trust both amongst ourselves and with the wider online community. To take part you will need to: before the signing (preferably before the party to streamline things on the night) generate a private PGP/GPG key – if you do not already have one. send the key fingerprint to richm+keysigning@oldelvet.org.uk. The following GPG command outputs the information that you need to send. gpg –fingerprint &lt;Your_Key_ID&gt; At the party. be prepared to identify yourself/your key. Typically we suggest that you bring yourself and two forms of photo ID. However some people choose to only prove that they have control of a key and not to tie this to a government recognised form of ID. See the examples under Keysigning policy for what options are generally used. verify the ID of others at the party. We will be using the list based method. Copies of the keysigning list will be available at the party. After the party. sign the keys of the people whose ID you verified. More GPG &amp; keysigning reading Keysigning party howto Email encryption OpenPGP best practices Example of hardened gpg.conf Now the organising section… Nobody is in charge so dive in and make it happen. You see those little gray words that say “Edit” to the right of this? They are talking to you kid. Also the thing at the top left that say “Edit this page” is also talking to you, the difference is that does the whole page at once. Go on… if you don’t do it, maybe no one will… and if you’re not sure just edit the Q&amp;A section and put in a question then check back later to see if someone answered it. What we have This is what we’ve got: Venue: Classroom at the Durham Amateur Rowing Club Time: 7.30pm to 10.30pm Desk space and chairs for up to 30 people Plenty of power sockets wifi projector with VGA input if anyone wants to show stuff to the group “break out” space in the bar parking for cars and bikes. and boats for that matter. level access for those with mobility problems Real ale What we need Can you help us source these? Snacks Signage Some old, cheapo USB flash drives to give away TAILS on. Anyone know where we can get some, e.g. some promotional ones that got overproduced? [TAILS needs at least 4GB, or 8GB with a persistent volume, so old drives are likely to be far too small. We could easily set up TAILS for anyone who brings along their own USB drive.] Relevant campaign stickers Volunteers In advance Role Volunteer Make some witty, attractive promotional materials who has dem skillz please? Add good ideas to this wiki page all Contact interested local groups all Make some signs (A4 should do) to direct people to the right room who has access to a printer at work? Bake a cake #1 mark will make one Bake a cake #2 biscuits (session cookies?) olly Pump out social media &amp; other links &amp; invitations pointing to this page all Publicity and Inivitations All of us should be inviting people and groups, however if one of those people gets multiple invitations it would make us look like some dodgy spam-lords. Which we aint. So record here when you invite someone. If you’re thinking of inviting some people, check here first to see if they’ve already been invited. Durham Uni computer society Durham Uni pro-bono lawyers DU librarians Durham student union activities DSU LGBTA Durham Palestine Educational Trust Durham Free Software Skillshare project Transition Durham Open Rights Group On the night I think the main plan is to hang loose and show each other cool stuff. However if lots of people turn up needing a basic overview of a topic, it would be cool to have a 5-minute presentation prepared, would it not? There are slides already on this wiki for us to use. Could folks nominate themselves here / add your offer to the list, or take one of these: Role Volunteer PGP basics Olly PGP keysigning Rich M Simple TOR usage with TBB mark OTR Dan + someone else? Alice and Bob? Hard disk encryption several of us know how to use dmcrypt? Mac go-to person Helen Windows go-to person Rich P Questions and Answers please add Q/A depending on what you have Q Will the cakes be stored in a CryptoPantry? A No, nor will they contain keys. Q I have a 3D printer which can dispense solder paste. Can I use it to render my key into icing on top of a cake? A You should definitely do that. Use a clean syringe though. Q Who should attend? A Anyone who wants to learn or share how to use simple encryption tools Q What should I bring? A Bring a portable computing device if you want help to use it]]></summary></entry><entry><title type="html">The View from Durham on Software Freedom Day 2014</title><link href="https://www.nelug.org.uk/the-view-from-durham-on-software-freedom-day-2014/" rel="alternate" type="text/html" title="The View from Durham on Software Freedom Day 2014" /><published>2014-09-19T20:32:46+01:00</published><updated>2014-09-19T20:32:46+01:00</updated><id>https://www.nelug.org.uk/the-view-from-durham-on-software-freedom-day-2014</id><content type="html" xml:base="https://www.nelug.org.uk/the-view-from-durham-on-software-freedom-day-2014/"><![CDATA[<p><a href="/wp-content/uploads/2014/09/web-banner-chat-participating-h.png"><img alt="web-banner-chat-participating-h" class="alignright wp-image-361 size-full" decoding="async" height="103" src="/wp-content/uploads/2014/09/web-banner-chat-participating-h.png" width="200"/></a>This Saturday (September 20th 2014) is the tenth annual <a href="http://www.softwarefreedomday.org/">Software Freedom Day</a>. As a group of free software users, we thought this would be a good opportunity to take stock of what the FLOSS world looks like from our perspective, and celebrate the things we like about it.</p>
<p>As Linux users, we’re already users of free software by definition however we all use other pieces of free and un-free software to varying degrees, so we are a heterogeneous group. To bring together our ideas we used a collaborative text-editing tool called <a href="http://etherpad.org/">etherpad</a> and are publishing on the <a href="https://wordpress.org/">wordpress</a> platform. What with <a href="https://en.wikipedia.org/wiki/Understanding_Media:_The_Extensions_of_Man">the medium being the message</a> and all that, it seems relevant to point out these things. Oh hang on, we just relied on a page on the <a href="https://www.mediawiki.org/wiki/Developer_hub">MediaWiki</a> platform. Now can we talk about the <a href="https://stackoverflow.com/questions/10060285/what-is-a-lamp-stack">LAMP stack</a> that it sits on? And we haven’t even started yet.</p>
<p>So before we disappear up a dependency tree of what we have to mention, let’s just make the point that it is (as we are) everywhere and you don’t have to be a card-carrying member of anything in order to rely on free technology and free culture more generally. Now let’s have a run through some of our favourites.
<!--more-->
</p>
<h1>Linux Distributions</h1>
<p>Everyone has their own preference, but worthy of special mention for both its free ideological purity, and for being the mother of so many other distro’s, is <a href="https://debian.org/">Debian</a>. Having started in 1993 it has since spawned a large number of sub-projects as well as <a href="http://futurist.se/gldt/">forking into new distros</a> the best know of which is Ubuntu. Some of us feel that Ubuntu has somewhat ‘lost its way’ since it’s recent emphasis on touchscreen interfaces and sending all of your <del>base</del> <a href="https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1055766">search queries</a> to a certain tax-avoiding vectoralist corporation. Boo-buntu, boo, we say. Try <a href="http://linuxmint.com/">Mint</a> if you want easy.</p>
<p>Other more specialised Debian derivatives include <a href="http://bandshed.net/AVLinux.html">AVLinux</a>, a pre-configured media production workstation, of which Mark reflects:</p>
<blockquote><p>“I spent years – happy years –  trying to make music with GNU/Linux before. Sometimes it had worked, sometimes it hadn’t. Basically it was just a bit too hard for me at the time, or to look at it another way, tinkering with the machinery was more interesting than my musical ideas. But when I discovered AVLinux, all  of those excuses evaporated because everything was already configured to produce, from the start.”</p></blockquote>
<p>In the interests of balance, he adds,</p>
<blockquote><p>“mind you it’s a PITA to install over lvm2 or dmcrypt because remastersys-installer doesn’t play nicely with /dev/mapper/*”</p></blockquote>
<h1></h1>
<h1>Winning on Every Scale</h1>
<p>From immense databases down to chip-level support, FLOSS is a core part of our electronic lives. At one end of that spectrum, Helen is a fan of <a href="http://www.postgresql.org/">PostgreSQL</a>:</p>
<blockquote><p>“… an enterprise-class relational database management system, which gets a lot of commercial developers working on it, is very well documented, has lots of neat features and extensions. The <a href="http://www.postgis.org/">PostGIS</a> extension underpins Open Street Map by providing a scalable means of storing the map data (the points and lines).”</p></blockquote>
<p>Others are also fans of <a href="https://osm.org">Open Street Map</a> and it’s dependants, for example <a href="http://www.cyclestreets.net/">cycle streets</a> which adds bike-friendly route calculations. Not only does it take free software, but open data licenses to make these projects possible. These are legal rather than technical innovations, but they are vital for creating a sense of shared, common ownership of a resource, without which people would be less likely to maintain and contribute to it.</p>
<p>Barry is impressed by the way hardware is handled;</p>
<blockquote><p>“I like Linux’s hardware detection: how things “just work”. I like not having to spend time searching for, or updating, drivers.”</p></blockquote>
<p>Did you think we were going to say something about desktop apps? OK. <a href="http://audacity.sourceforge.net/">Audacity</a>. You can even use it on non-free OSes.</p>
<h1>We like free resources / Free resources we like</h1>
<p>Apart from mapping, there are plenty more educational and informational networked resources. <a href="http://en.flossmanuals.net/">Floss Manuals</a> are books that you can remix in order to create educational materials for specific audiences. Topic-specific resources often have a thriving community around them, for example <a href="http://www.libremusicproduction.com/">music production</a>.</p>
<p>All in all it seems that the view from Durham is of a free software ecosystem which supports us as we support it. GNU/Linux is an important part of that ecosystem, but there are lots of other bits too; the tall trees of software; the broad plains of open knowledge; the mingling streams of cultural remix; the deep caves of cypher and harvest of <a href="https://www.maidsafe.org/t/welcome-to-maidsafe-org-faq-and-introduction/6">guano</a> within; and all over, the shifting breezes of ontological flux.</p>
<div class="wp-caption alignnone" id="attachment_368" style="width: 310px"><a href="/wp-content/uploads/2014/09/640px-Rosin.jpg"><img alt="These are not the flux you are looking for" aria-describedby="caption-attachment-368" class="size-medium wp-image-368" decoding="async" height="169" sizes="(max-width: 300px) 100vw, 300px" src="/wp-content/uploads/2014/09/640px-Rosin-300x169.jpg" srcset="/wp-content/uploads/2014/09/640px-Rosin-300x169.jpg 300w, /wp-content/uploads/2014/09/640px-Rosin-500x282.jpg 500w, /wp-content/uploads/2014/09/640px-Rosin.jpg 640w" width="300"/></a><p class="wp-caption-text" id="caption-attachment-368">These are not the flux you are looking for</p></div>
<p>Onto-what? Just this. There used to be ownership, but now being owned is not a singular state. Much of that change is the result of different varieties of licensing. Many of the licenses were inspired by the <a href="https://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>. As this gets older it’s easy to forget what a critical innovation it was to consolidate the notion of copyleft, so that whatever we make openly, building on the open work of others, is held in common and shouldn’t be fenced off. The number and varieties of such licenses is a testament to their power to change the way people conceive of intellectual property: ownership hasn’t been abolished, but it’s a highly maleable thing now.</p>]]></content><author><name>admin</name></author><summary type="html"><![CDATA[This Saturday (September 20th 2014) is the tenth annual Software Freedom Day. As a group of free software users, we thought this would be a good opportunity to take stock of what the FLOSS world looks like from our perspective, and celebrate the things we like about it. As Linux users, we’re already users of free software by definition however we all use other pieces of free and un-free software to varying degrees, so we are a heterogeneous group. To bring together our ideas we used a collaborative text-editing tool called etherpad and are publishing on the wordpress platform. What with the medium being the message and all that, it seems relevant to point out these things. Oh hang on, we just relied on a page on the MediaWiki platform. Now can we talk about the LAMP stack that it sits on? And we haven’t even started yet. So before we disappear up a dependency tree of what we have to mention, let’s just make the point that it is (as we are) everywhere and you don’t have to be a card-carrying member of anything in order to rely on free technology and free culture more generally. Now let’s have a run through some of our favourites.]]></summary></entry><entry><title type="html">Learn to program the DIY way</title><link href="https://www.nelug.org.uk/learn-to-program-the-diy-way/" rel="alternate" type="text/html" title="Learn to program the DIY way" /><published>2014-09-03T18:56:54+01:00</published><updated>2014-09-03T18:56:54+01:00</updated><id>https://www.nelug.org.uk/learn-to-program-the-diy-way</id><content type="html" xml:base="https://www.nelug.org.uk/learn-to-program-the-diy-way/"><![CDATA[<p>Starting this week, some of Durham’s Free Software Skill-Sharers will be learning to program together. We’ve formed a small study group which will have face-to-face meet-ups for peer support, and we’ll be keeping in touch by email as well.</p>
<p>At the moment we’re open to more people joining in – if you’d like to give it a try, join in the conversation on our <a href="https://lists.aktivix.org/mailman/listinfo/dfs3" target="_blank">mailing list</a> (read the archives to see what’s happening, then subscribe and post a message to the list). This is completely free of charge, but comes with no guarantees; we’re just some people doing it because we want to.</p>
<p>We’re going to be learning a language called <a href="http://python.org/">Python</a>, using a book called <a href="http://learnpythonthehardway.org/book/">“Learn Python the Hard Way”</a> which is available for free on the internet. The name is inaccurate – the author is just making a point that you need to practise in order to get good at anything. It is suitable for people who have never programmed before.</p>
<p>With the new national curriculum, kids have to learn to program in school from a very young age, so this is an opportunity to be able to help your grandchildren / children / buddies / self with your homework (depending on how old you are), or just to be able to say, “Aha, let Grandma show you how I’d do that in python”.</p>
<p>People give many different reasons for learning to program (also know as learning to code) including:</p>
<ul>
<li>self-directed learning looks good on your CV</li>
<li>it could lead to higher study or employment in IT</li>
<li>it enables you to make your own programs which work just how you want</li>
<li>you learned how to program in <a href="https://en.wikibooks.org/wiki/BASIC_Programming">BASIC</a> on the <a href="http://www.computinghistory.org.uk/det/182/acorn-bbc-micro-model-b/">BBC Micro</a> and you want to know what’s changed since then</li>
<li>it teaches problem-solving</li>
<li>it provides a way in to an understanding of the world of information</li>
<li>it is a creative act that demands no other justification</li>
</ul>
<p>We’re just starting now, so it won’t take you long to catch up… just start at the beginning of the book and let’s see where it leads us…</p>]]></content><author><name>Mark</name></author><summary type="html"><![CDATA[Starting this week, some of Durham’s Free Software Skill-Sharers will be learning to program together. We’ve formed a small study group which will have face-to-face meet-ups for peer support, and we’ll be keeping in touch by email as well. At the moment we’re open to more people joining in – if you’d like to give it a try, join in the conversation on our mailing list (read the archives to see what’s happening, then subscribe and post a message to the list). This is completely free of charge, but comes with no guarantees; we’re just some people doing it because we want to. We’re going to be learning a language called Python, using a book called “Learn Python the Hard Way” which is available for free on the internet. The name is inaccurate – the author is just making a point that you need to practise in order to get good at anything. It is suitable for people who have never programmed before. With the new national curriculum, kids have to learn to program in school from a very young age, so this is an opportunity to be able to help your grandchildren / children / buddies / self with your homework (depending on how old you are), or just to be able to say, “Aha, let Grandma show you how I’d do that in python”. People give many different reasons for learning to program (also know as learning to code) including: self-directed learning looks good on your CV it could lead to higher study or employment in IT it enables you to make your own programs which work just how you want you learned how to program in BASIC on the BBC Micro and you want to know what’s changed since then it teaches problem-solving it provides a way in to an understanding of the world of information it is a creative act that demands no other justification We’re just starting now, so it won’t take you long to catch up… just start at the beginning of the book and let’s see where it leads us…]]></summary></entry><entry><title type="html">First Durham Free Software Skill-Share Reports</title><link href="https://www.nelug.org.uk/first-durham-free-software-skill-share-reports/" rel="alternate" type="text/html" title="First Durham Free Software Skill-Share Reports" /><published>2014-08-07T12:14:48+01:00</published><updated>2014-08-07T12:14:48+01:00</updated><id>https://www.nelug.org.uk/first-durham-free-software-skill-share-reports</id><content type="html" xml:base="https://www.nelug.org.uk/first-durham-free-software-skill-share-reports/"><![CDATA[<p>Here are a couple of posts about what some NELUGers have been up to recently:</p>
<p><a href="http://durhamcsc.wordpress.com/2014/08/06/durham-free-software-skill-share-project/">Durham Community Support Centre blog post</a></p>
<p><a href="https://network23.org/dfs3/2014/08/07/first-skill-share-event-a-success/">DFS3 blog post</a></p>
<p>There is still plenty more work to do, so if anyone else wants to join in, the more the merrier.</p>]]></content><author><name>Mark</name></author><summary type="html"><![CDATA[Here are a couple of posts about what some NELUGers have been up to recently: Durham Community Support Centre blog post DFS3 blog post There is still plenty more work to do, so if anyone else wants to join in, the more the merrier.]]></summary></entry><entry><title type="html">Time to share that free (software) love</title><link href="https://www.nelug.org.uk/time-to-share-that-free-software-love/" rel="alternate" type="text/html" title="Time to share that free (software) love" /><published>2014-05-13T13:01:44+01:00</published><updated>2014-05-13T13:01:44+01:00</updated><id>https://www.nelug.org.uk/time-to-share-that-free-software-love</id><content type="html" xml:base="https://www.nelug.org.uk/time-to-share-that-free-software-love/"><![CDATA[<p>In February, I met a bloke in a local bookshop who was bemoaning the fact that he couldn’t find out what was going on in his area, because he didn’t have a computer. There used to be some in his local library, but they broke down. I was surprised at first – everyone I know uses computers every day – but this man was from a generation that relied on leaflets and newspapers to find out what was going on. He couldn’t afford to buy a computer, and also he’d need some help and a few pointers to get started. So we talked about getting an unwanted computer and installing a free OS on it. And as we spoke, we figured out that the time was ripe for this sort of thing.</p>
<p>Some of us have been banging on about the merits of free software for so long that it can get to feel like we’re always going to be a minority. Perhaps we get so familiar with trying to convert skeptical users of proprietary operating systems to join us in our eccentric linuxy ways, that it just feels like it’s always going to be like this. But what if external factors coincided in such a way that fairly suddenly, it made much more sense for Windows users to switch to desktop GNU/Linux than ever before? And it became easier for volunteers to put working machines in the hands of people who otherwise wouldn’t have any? Would we be ready to push at that open door, and grow the desktop-user numbers in our communities exponentially?</p>
<p>Here are a few things that have happened recently, which I’m going to suggest conspire to create just such a moment of possibility. Firstly, consider that <a href="http://www.theguardian.com/uk-news/2014/may/10/north-east-avoid-becoming-britains-detroit" target="_blank" title="Grauniad: opens in a new window">a lot of people are seriously skint</a> at the moment, so buying a computer is going to be difficult. Secondly, there are loads of computers knocking about that used to run Windows XP, which as of last month reached <a href="https://www.microsoft.com/en-us/windows/enterprise/end-of-support.aspx" target="_blank" title="Micro$oft: opens in a new window">the end of its support life</a>, so there should be lots of people looking for a new operating system; they might even have heard that the new versions of Windows are very <a href="http://www.technologyreview.com/review/511116/windows-8-design-over-usability/" target="_blank" title="Register: opens in a new window">different</a> and unpopular with many ex-XP users; likewise, there’ll be lots of machines getting decommissioned by organisations that won’t install a new OS. Thirdly, open formats are <a href="http://www.theregister.co.uk/2014/01/30/uk_picks_open_document_format_for_all_government_files/" target="_blank" title="Register: opens in a new window">gaining acceptance</a>, so the days when people are expected to do simple tasks with proprietary formats (docx for example) could soon be over.</p>
<p>If you combine all of that with the things we’ve been talking about for years; all the social, technical and environmental benefits of running a free operating system; it starts to sound like this really could be a significant moment in the uptake of GNU/Linux by ordinary, non-technically-minded folks. I’ve talked to a lot of people over the last couple of months about how we can work together to make this happen.</p>
<p>Looking around, there are these amazing things already going on:</p>
<ol>
<li><a href="/" title="us">NELUG</a> – a great bunch of helpful, knowledgeable and highly skilled linux users</li>
<li><a href="http://www.transitiondurham.org.uk/" target="_blank" title="opens in a new window"> Transition Durham</a> – a network of people and groups who (amongst other things) are interested in re-use and recycling, planned <a href="https://en.wikipedia.org/wiki/Energy_descent" target="_blank" title="Wikipedia: opens in a new window">carbon descent </a>and building resilient communities</li>
<li><a href="http://durhamcsc.wordpress.com/" target="_blank" title="Durham Community Support Centre: opens in a new window">Durham Community Support Centre</a> – who are working with a lot of digitally excluded people, and are interested in education</li>
</ol>
<p>So, we had a meeting on April 24th 2014 to sort out how we could work together and make something good happen. Here are a few of the key points to come out of that.</p>
<ul>
<li>We agreed that the model of skill-sharing without hierarchy, as pioneered in the <a href="https://en.wikipedia.org/wiki/Escuela_Moderna" target="_blank" title="Wikipedia: opens in a new window">Escuela Moderna</a> and <a href="https://en.wikipedia.org/wiki/Free_Skool" target="_blank" title="Wikipedia: opens in a new window">subsequent practice</a> was a good fit with the ethics of free software and community education. This means that people can both learn and teach, and are encouraged to do both. The idea of a gift economy was also mentioned, as being a community-reinforcing aspect of free culture.</li>
<li>We recognised that we were a diverse group of people with some common interests but also some differences, and for that reason it was important to set up a project that was autonomous, so we can benefit from association with the three organisations listed above, without anyone feeling that they need to belong to organisation x,y or z to participate. We want to be open to all-comers.</li>
<li>We talked about who we would like to attract as participants, and decided to target beginners who needed help either getting a machine to run a free operating system, or using free software applications. We could also signpost people to other organisations, e.g. user groups, and resources, e.g. free online courses.</li>
<li>We agreed to work towards holding our first event on <strong>Saturday, July 26th 2014 from 10am to 3pm at Durham Miners’ Hall</strong>. They have wifi.</li>
<li>We’ll work up an evolving document (see this <a href="/wp-content/uploads/2014/05/skillshare-proposal.odt">skillshare proposal</a>) to introduce what we’re doing and why, and propose a loose structure for the first event.</li>
<li>D. volunteered to design some posters/fliers, with some help on the content</li>
<li>We noted that a lot of our target group won’t have regular computer access, so we’ll need to reach them through off-line means, e.g. suitably positioned posters &amp; fliers, via other groups, word of mouth, etc.</li>
</ul>
<h2>Progress since then…</h2>
<ol>
<li>M. and B. have been to the Miners’ Hall and checked out the room – it is suitable for the kind of session we have in mind. Also, we’re helping the Community Support Centre (in the same building) to get some old XP machines running Linux Mint, for use by their visitors.</li>
<li>Because we agreed to be autonomous from the three organisations above, we need our own blog, although there’ll hopefully be a lot of cross-referencing with this one you’re reading now. So M. has set one up <a href="https://network23.org/dfs3/" target="_blank" title="Durham Free Software Skill-Share: opens in a new window">provisionally</a> (domain to be discussed and mapped later)</li>
</ol>
<p> </p>]]></content><author><name>Mark</name></author><summary type="html"><![CDATA[In February, I met a bloke in a local bookshop who was bemoaning the fact that he couldn’t find out what was going on in his area, because he didn’t have a computer. There used to be some in his local library, but they broke down. I was surprised at first – everyone I know uses computers every day – but this man was from a generation that relied on leaflets and newspapers to find out what was going on. He couldn’t afford to buy a computer, and also he’d need some help and a few pointers to get started. So we talked about getting an unwanted computer and installing a free OS on it. And as we spoke, we figured out that the time was ripe for this sort of thing. Some of us have been banging on about the merits of free software for so long that it can get to feel like we’re always going to be a minority. Perhaps we get so familiar with trying to convert skeptical users of proprietary operating systems to join us in our eccentric linuxy ways, that it just feels like it’s always going to be like this. But what if external factors coincided in such a way that fairly suddenly, it made much more sense for Windows users to switch to desktop GNU/Linux than ever before? And it became easier for volunteers to put working machines in the hands of people who otherwise wouldn’t have any? Would we be ready to push at that open door, and grow the desktop-user numbers in our communities exponentially? Here are a few things that have happened recently, which I’m going to suggest conspire to create just such a moment of possibility. Firstly, consider that a lot of people are seriously skint at the moment, so buying a computer is going to be difficult. Secondly, there are loads of computers knocking about that used to run Windows XP, which as of last month reached the end of its support life, so there should be lots of people looking for a new operating system; they might even have heard that the new versions of Windows are very different and unpopular with many ex-XP users; likewise, there’ll be lots of machines getting decommissioned by organisations that won’t install a new OS. Thirdly, open formats are gaining acceptance, so the days when people are expected to do simple tasks with proprietary formats (docx for example) could soon be over. If you combine all of that with the things we’ve been talking about for years; all the social, technical and environmental benefits of running a free operating system; it starts to sound like this really could be a significant moment in the uptake of GNU/Linux by ordinary, non-technically-minded folks. I’ve talked to a lot of people over the last couple of months about how we can work together to make this happen. Looking around, there are these amazing things already going on: NELUG – a great bunch of helpful, knowledgeable and highly skilled linux users Transition Durham – a network of people and groups who (amongst other things) are interested in re-use and recycling, planned carbon descent and building resilient communities Durham Community Support Centre – who are working with a lot of digitally excluded people, and are interested in education So, we had a meeting on April 24th 2014 to sort out how we could work together and make something good happen. Here are a few of the key points to come out of that. We agreed that the model of skill-sharing without hierarchy, as pioneered in the Escuela Moderna and subsequent practice was a good fit with the ethics of free software and community education. This means that people can both learn and teach, and are encouraged to do both. The idea of a gift economy was also mentioned, as being a community-reinforcing aspect of free culture. We recognised that we were a diverse group of people with some common interests but also some differences, and for that reason it was important to set up a project that was autonomous, so we can benefit from association with the three organisations listed above, without anyone feeling that they need to belong to organisation x,y or z to participate. We want to be open to all-comers. We talked about who we would like to attract as participants, and decided to target beginners who needed help either getting a machine to run a free operating system, or using free software applications. We could also signpost people to other organisations, e.g. user groups, and resources, e.g. free online courses. We agreed to work towards holding our first event on Saturday, July 26th 2014 from 10am to 3pm at Durham Miners’ Hall. They have wifi. We’ll work up an evolving document (see this skillshare proposal) to introduce what we’re doing and why, and propose a loose structure for the first event. D. volunteered to design some posters/fliers, with some help on the content We noted that a lot of our target group won’t have regular computer access, so we’ll need to reach them through off-line means, e.g. suitably positioned posters &amp; fliers, via other groups, word of mouth, etc. Progress since then… M. and B. have been to the Miners’ Hall and checked out the room – it is suitable for the kind of session we have in mind. Also, we’re helping the Community Support Centre (in the same building) to get some old XP machines running Linux Mint, for use by their visitors. Because we agreed to be autonomous from the three organisations above, we need our own blog, although there’ll hopefully be a lot of cross-referencing with this one you’re reading now. So M. has set one up provisionally (domain to be discussed and mapped later)  ]]></summary></entry><entry><title type="html">March LUG – Kindling</title><link href="https://www.nelug.org.uk/march-lug-kindling/" rel="alternate" type="text/html" title="March LUG – Kindling" /><published>2013-03-29T22:17:10+00:00</published><updated>2013-03-29T22:17:10+00:00</updated><id>https://www.nelug.org.uk/march-lug-kindling</id><content type="html" xml:base="https://www.nelug.org.uk/march-lug-kindling/"><![CDATA[<p><a href="https://twitter.com/dougienisbet/status/312966113950588928" title="Twitter Post from DFDS Seaways Ferry to Amsterdam">Somewhere</a> out over the North Sea I took off my jacket, leaned back, and sipped on my beer. My jacket has a nice big inside pocket and, if I take the cover of my kindle, it fits perfectly in the pocket. It’s a perfect fit. I mean, you wouldn’t know it was there …</p>
<p>A few days later I dug out my kindle and noticed the display was suffering from a split personality. The bottom half was telling me to switch it on, while the top half was still showing three little birds, outside my window, singing a sweet song. Oh dear. After a visit to the University of Google it became apparent to me that this problem is not uncommon. Weird, but not uncommon. Weird because you can run your finger across the screen and feel nothing; no cracks no blemishes. But it’s clearly broke. It may be silky smooth on the outside but it hides a shattered interior.</p>
<p>The forums on Amazon buzz with feel-good stories of customers phoning Amazon and getting great trade-in deals on their ‘just out of warranty’ kindles. My Kindle was not just out of warranty, it was exceedingly, comfortably and generously out of warranty, and had been for a couple of years. Still worth a try …</p>
<p>Well that didn’t go anywhere useful. Nice chap all the same, and together across the ether we visited the Amazon website where we discussed the nice shiny new kindles and he advised me that I could ‘buy’ one, at the price shown. Apparently bears also go to the bathroom in the woods. Ok, let’s go to ebay.</p>
<p>Aha … Now we’re cooking … <a href="http://www.ebay.co.uk/itm/261183611124?ssPageName=STRK:MEWNX:IT&amp;_trksid=p3984.m1497.l2649" title="Ebay listing for replacement screen">This</a> looks just the chap. A couple of days later a huge ball of bubble-wrap arrives at work, and somewhere inside, is a shiny new kindle screen. And there’s even a link to their Youtube video, yeah, well whatever. Why watch a youtube video when it’s NELUG night, and, well, you can run linux on a kindle can’t you? <a href="http://www.turnkeylinux.org/blog/kindle-root" title="Jailbreaking your kindle">Apparently</a>.</p>
<div class="wp-caption alignright" id="attachment_311" style="width: 324px"><a href="/wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-23-04-GMT_640x480.jpg"><img alt="Durham - kindle - nelug -- Tue 19 Mar 2013 21-23-04 GMT_640x480" aria-describedby="caption-attachment-311" class="wp-image-311" decoding="async" height="240" src="/wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-23-04-GMT_640x480-300x225.jpg" title="Dissassembly" width="314"/></a><p class="wp-caption-text" id="caption-attachment-311">Richard takes the kindle to bits</p></div>
<p>That evening I turned up with a broken kindle, a new screen, and a random selection of small screwdrivers. I dumped them on the table and headed for the bar. A few minutes later I returned with my drink to find surgery was already underway. In the time it takes to say “a pint of Black Sheep please” Richard had prised open the cover, removed the battery, and was poking at various bits of the kindle’s anatomy with professional interest.</p>
<p>I made a perfunctory pretense of watching the instruction video on youtube but the Nelug hive mind was working quite well without it. With the new screen fitted re-assembly was, as they say, simply the reverse of disassembly. I stuck to the Black Sheep while Richard stuck to the screwdriver and, despite some frisky screws that had decided to go for a wander and wanted to live somewhere else for a while, it all ended well.</p>
<div class="wp-caption aligncenter" id="attachment_316" style="width: 810px"><a href="/wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-54-26-GMT_800x600.jpg"><img alt="Mission Accomplished" aria-describedby="caption-attachment-316" class="wp-image-316" decoding="async" height="600" sizes="(max-width: 800px) 100vw, 800px" src="/wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-54-26-GMT_800x600.jpg" srcset="/wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-54-26-GMT_800x600.jpg 800w, /wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-54-26-GMT_800x600-300x225.jpg 300w, /wp-content/uploads/2013/03/Durham-kindle-nelug-Tue-19-Mar-2013-21-54-26-GMT_800x600-400x300.jpg 400w" title="Mission Accomplished" width="800"/></a><p class="wp-caption-text" id="caption-attachment-316">The broken screen on the left with the repaired Kindle on the right</p></div>
<p><iframe frameborder="0" height="360" loading="lazy" scrolling="no" src="http://www.fellandforest.co.uk/zf/core/embedgallery.aspx?p=023c81ca0ff405211CCCCCC03e111111F5F5F5DDDDDD555555CCCCCC.2" style="background-color: #555555;" width="480"></iframe></p>]]></content><author><name>dougie</name></author><summary type="html"><![CDATA[Somewhere out over the North Sea I took off my jacket, leaned back, and sipped on my beer. My jacket has a nice big inside pocket and, if I take the cover of my kindle, it fits perfectly in the pocket. It’s a perfect fit. I mean, you wouldn’t know it was there … A few days later I dug out my kindle and noticed the display was suffering from a split personality. The bottom half was telling me to switch it on, while the top half was still showing three little birds, outside my window, singing a sweet song. Oh dear. After a visit to the University of Google it became apparent to me that this problem is not uncommon. Weird, but not uncommon. Weird because you can run your finger across the screen and feel nothing; no cracks no blemishes. But it’s clearly broke. It may be silky smooth on the outside but it hides a shattered interior. The forums on Amazon buzz with feel-good stories of customers phoning Amazon and getting great trade-in deals on their ‘just out of warranty’ kindles. My Kindle was not just out of warranty, it was exceedingly, comfortably and generously out of warranty, and had been for a couple of years. Still worth a try … Well that didn’t go anywhere useful. Nice chap all the same, and together across the ether we visited the Amazon website where we discussed the nice shiny new kindles and he advised me that I could ‘buy’ one, at the price shown. Apparently bears also go to the bathroom in the woods. Ok, let’s go to ebay. Aha … Now we’re cooking … This looks just the chap. A couple of days later a huge ball of bubble-wrap arrives at work, and somewhere inside, is a shiny new kindle screen. And there’s even a link to their Youtube video, yeah, well whatever. Why watch a youtube video when it’s NELUG night, and, well, you can run linux on a kindle can’t you? Apparently. Richard takes the kindle to bits That evening I turned up with a broken kindle, a new screen, and a random selection of small screwdrivers. I dumped them on the table and headed for the bar. A few minutes later I returned with my drink to find surgery was already underway. In the time it takes to say “a pint of Black Sheep please” Richard had prised open the cover, removed the battery, and was poking at various bits of the kindle’s anatomy with professional interest. I made a perfunctory pretense of watching the instruction video on youtube but the Nelug hive mind was working quite well without it. With the new screen fitted re-assembly was, as they say, simply the reverse of disassembly. I stuck to the Black Sheep while Richard stuck to the screwdriver and, despite some frisky screws that had decided to go for a wander and wanted to live somewhere else for a while, it all ended well. The broken screen on the left with the repaired Kindle on the right]]></summary></entry><entry><title type="html">LUG meeting report, 18 September 2012</title><link href="https://www.nelug.org.uk/meeting-20120918/" rel="alternate" type="text/html" title="LUG meeting report, 18 September 2012" /><published>2012-09-23T14:20:02+01:00</published><updated>2012-09-23T14:20:02+01:00</updated><id>https://www.nelug.org.uk/meeting-20120918</id><content type="html" xml:base="https://www.nelug.org.uk/meeting-20120918/"><![CDATA[<p>Much fun was had learning about the difference between BIOS and UEFI booting, with the help of a Fedora 17 live USB: booting a BIOS system with this gives you syslinux, but a UEFI laptop loaded GRUB with a broken set of configurations. A few internet searches told us this was a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=811389">known problem</a>, and we were able to fix the UEFI booting.</p>
<p>We also spent some time diagnosing CUPS and wireless driver problems, and discussing the implications of Google’s recent <a href="http://googleonlinesecurity.blogspot.co.uk/2012/09/adding-oauth-20-support-for-imapsmtp.html">announcement</a> that is supporting OAuth 2.0 authentication for several of its APIs.</p>]]></content><author><name>olly-bh</name></author><summary type="html"><![CDATA[Much fun was had learning about the difference between BIOS and UEFI booting, with the help of a Fedora 17 live USB: booting a BIOS system with this gives you syslinux, but a UEFI laptop loaded GRUB with a broken set of configurations. A few internet searches told us this was a known problem, and we were able to fix the UEFI booting. We also spent some time diagnosing CUPS and wireless driver problems, and discussing the implications of Google’s recent announcement that is supporting OAuth 2.0 authentication for several of its APIs.]]></summary></entry><entry><title type="html">A Brief Introduction To Regular Expressions</title><link href="https://www.nelug.org.uk/a-brief-introduction-to-regular-expressions/" rel="alternate" type="text/html" title="A Brief Introduction To Regular Expressions" /><published>2012-08-06T19:23:15+01:00</published><updated>2012-08-06T19:23:15+01:00</updated><id>https://www.nelug.org.uk/a-brief-introduction-to-regular-expressions</id><content type="html" xml:base="https://www.nelug.org.uk/a-brief-introduction-to-regular-expressions/"><![CDATA[<style type="text/css">
code { background-color: lightgray; }
p.list-header { margin-bottom: 0em; }
</style>
<h1 id="what-is-regexp">What is a Regular Expression?</h1>
<h2 id="regexp-purpose">Purpose</h2>
<p>A regular expression is a flexible way of defining patterns of text.  It is a formal language which is interpreted by a regular expression engine (which might be part of an application or a programming language) that parses input text and compares it to the regular expression, and then performs operations on text that matches the regular expression.</p>
<p class="list-header">Common uses of regular expressions include:</p>
<ul>
<li>Matching text</li>
<li>Substituting text</li>
<li>Extracting text</li>
</ul>
<h2 id="regexp-syntax">Syntax</h2>
<p>The basic syntax of a regular expression is <code>/pattern/flags</code>.  The main part is the text pattern description, and the flags control the behaviour of the regular expression engine.</p>
<p>Different regular expression engines support different features, and also slightly vary in their syntax.	 After a overview of general regexp syntax we will look at some common applications and languages and how they support regular expressions.</p>
<p>
<!--more-->
</p>
<h1 id="regexp-examples">Examples</h1>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">%\d\d?/\d\d?/\d\d\d?\d?%</pre></td></tr></table><p class="theCode" style="display:none;">%\d\d?/\d\d?/\d\d\d?\d?%</p></div>
<p>This will match something that looks like a date, in a format like <code>dd/mm/yyyy</code> or <code>m/d/yy</code>.  Note that it does not check that it is a valid date, a string like <code>75/33/9876</code> would match.  Also note that a percentage mark has been used as the regexp delimiter; this can be clearer when the pattern contains slashes.</p>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">/&lt;p( [^&gt;]*)?&gt;.*?&lt;/p&gt;/m</pre></td></tr></table><p class="theCode" style="display:none;">/&lt;p( [^&gt;]*)?&gt;.*?&lt;/p&gt;/m</p></div>
<p>This regular will match a paragraph element and its contents in a HTML document.</p>
<p><a id="example-complex"></a></p>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">/
  (?:
    (?:(-?\d{1,3})m {0,3}(-?\d{1,4})y (?:\(( {0,2}-?\d{1,2})\))?)
    |
    (?: {0,2} (?:(-?\d{1,3})\/(\d)|(Junct))[ ]
      - {0,2} (?:(-?\d{1,3})\/(\d)|(Junct))
    )
  )
  \s+
  (C|C&amp;A&amp;T|C &amp; [AT]|L[234]|\*L4|SD[12])?
  \s+
  (?:\(((?:[ -]\d{2})|(?:\d\.\d))\))?
  \s+
  (-?\d+)?
  \s+
  (ALIG35|AL70|GAUGE|MT70|[LR]TOP
   | TW[35]M|CYC(?:[69]_|1[38])(?:BO|[LR]T))
  \s*=?\s* (-?\d{1,3}\.\d+)mm
  (?:\(1: ?(\d{2,3})\))?
  \s+
  \[ {0,2}(\d{1,3})\]
  \s*(.*)
  (?: +&gt; :)_+ *_+:_+\/_+\/_+
  \s+
  (?:to +(?:(-?\d{1,3})m {0,3}(-?\d{1,4})y[ ]
     (?:\(( {0,2}-?\d{1,2})\))?): *(\d+)cycles)?
  \s+
  ((?:P )?(?:IN)?VALID (?: BUT OFF ROUTE)?|OFF ROUTE|UNVERIFIED)?
/gmx</pre></td></tr></table><p class="theCode" style="display:none;">/
  (?:
    (?:(-?\d{1,3})m {0,3}(-?\d{1,4})y (?:\(( {0,2}-?\d{1,2})\))?)
    |
    (?: {0,2} (?:(-?\d{1,3})\/(\d)|(Junct))[ ]
      - {0,2} (?:(-?\d{1,3})\/(\d)|(Junct))
    )
  )
  \s+
  (C|C&amp;A&amp;T|C &amp; [AT]|L[234]|\*L4|SD[12])?
  \s+
  (?:\(((?:[ -]\d{2})|(?:\d\.\d))\))?
  \s+
  (-?\d+)?
  \s+
  (ALIG35|AL70|GAUGE|MT70|[LR]TOP
   | TW[35]M|CYC(?:[69]_|1[38])(?:BO|[LR]T))
  \s*=?\s* (-?\d{1,3}\.\d+)mm
  (?:\(1: ?(\d{2,3})\))?
  \s+
  \[ {0,2}(\d{1,3})\]
  \s*(.*)
  (?: +&gt; :)_+ *_+:_+\/_+\/_+
  \s+
  (?:to +(?:(-?\d{1,3})m {0,3}(-?\d{1,4})y[ ]
     (?:\(( {0,2}-?\d{1,2})\))?): *(\d+)cycles)?
  \s+
  ((?:P )?(?:IN)?VALID (?: BUT OFF ROUTE)?|OFF ROUTE|UNVERIFIED)?
/gmx</p></div>
<p>This is a much more complex example.  It is a regular expression that was written to match text in reports produced by a legacy system.  These reports had been designed to be printed and read; by using a regular expression it was possible to parse the report and extract the important information from it.  This regular expression matches a group of lines in the report and captures the bits of data that we are interested in.  It would be possible to use other methods to parse this report, but the flexibility of regular expressions make it well suited to cope with the quirks of the report formatting produced by different versions of the legacy software; the use of alternation and variable matches means that this regexp can match all formats of the report instead of having to rewrite the parsing code for each version.</p>
<h1 id="regexp-elements">Regexp elements</h1>
<h2 id="characters">Characters</h2>
<h3 id="normal characters">Normal characters</h3>
<p>Normal characters match themselves only.</p>
<ul>
<li><code>a</code> <code>b</code> <code>c</code> <code>X</code> <code>Y</code> <code>Z</code></li>
<li><code>0</code> <code>1</code> <code>2</code> <code>3</code> <code>4</code> <code>5</code> <code>6</code> <code>7</code> <code>8</code> <code>9</code></li>
<li><code>"</code> <code>_</code> <code>=</code> <code>#</code></li>
</ul>
<h3 id="special-characters">Special characters</h3>
<p>More exoctic characters are matched using character sequences.</p>
<dl>
<dt><code>.</code></dt>
<dd>The dot character will match almost any single character.  It does not usually match line break characters, unless the <code>/g</code> flag is set.</dd>
<dt><code>\*</code> <code>\?</code> <code>\}</code> <code>\[</code> <code>\]</code> <code>\/</code> <code>\\</code> <code>\^</code> <code>\$</code></dt>
<dd>If you need to match a literal character that has a special meaning in regular expresssions then it needs to be escaped using a backslash.</dd>
<dt><code>\n</code> <code>\t</code> <code>\e</code> <code>\a</code></dt>
<dd>There are several predefined sequences for non-printable characters.  <code>\n</code> is a new line character, <code>\t</code> is a tab, <code>\e</code> is an escape character and <code>\a</code> is a bell.  These will be familiar to anyone who has used C or many other programming languages.</dd>
<dt><code>\xB0</code> <code>\u0260</code></dt>
<dd>Some regular expression engines allow arbitrary hexadecimal or Unicode code points to be represented using a <code>\x00</code> or <code>\u0000</code> syntax.</dd>
</dl>
<h2 id="character-classes">Character classes</h2>
<p>By using [square brackets] you can match any of several different characters.</p>
<h3 id="character-collections">Collections of characters</h3>
<dl>
<dt><code>[abc]</code></dt>
<dd>The simplest form is a list of characters in square brackets, this will match any one of those characters.</dd>
<dt><code>[0-9]</code></dt>
<dt><code>[a-z]</code></dt>
<dt><code>[0-9a-zA-Z]</code></dt>
<dd>To make it simpler to match a large number of possible characaters you can specify ranges.</dd>
<dt><code>[-+0-9]</code></dt>
<dd>Simple characters and ranges can be combined as shown above.  Note that, due to its special meaning for ranges, to match a literal hyphen character then you can place it at the start of a character class (alternatively you can escape it with a backslash).</dd>
<dt><code>[^abc]</code></dt>
<dd>Negation is done by having a caret at the start of a character class.  The above example will match any character apart from <code>a</code>, <code>b</code>, or <code>c</code>.</dd>
</dl>
<h3 id="predifined-character-classes">Pre-defined character classes</h3>
<p>There are many predefined shorthand sequences for commonly used character classes.</p>
<dl>
<dt><code>\d</code></dt>
<dd>Any digit.</dd>
<dt><code>\d</code></dt>
<dd>Any character other than a digit.</dd>
<dt><code>\s</code></dt>
<dd>Any space character, e.g. space, tab.</dd>
<dt><code>\S</code></dt>
<dd>Any non-space character.</dd>
<dt><code>\w</code></dt>
<dd>Any word character.  The definition of word characters can vary, but it usually means any letter, any digit, or an underscore.</dd>
<dt><code>\W</code></dt>
<dd>Any non-word character.</dd>
<dt><code>[[:alpha:]]</code></dt>
<dd>Any letter character.  This is an example of a <a href="http://en.wikipedia.org/wiki/Regular_expression#POSIX_character_classes">POSIX character class</a>.  Note the double square brackets used here; the POSIX character class is <code>[:alpha:]</code> which can only be used inside the normal square brackets for character classes.  POSIX character classes can be combined with other elements within a character class, e.g. <code>[[:alpha::]ab[:digit:]]</code>.</dd>
</dl>
<h2 id="quantifiers">Repetition</h2>
<p>Quantifiers are used to control repetetive matching.  Greedy quantifiers will try and match as much text as possible, lazy quantifiers will try and match as little as possible.  Lazy quantifiers are used much less frequently than greedy quantifiers.</p>
<h4 id="normal-quantifiers">Normal quantifiers</h4>
<dl>
<dt><code>ab?c</code></dt>
<dd>The question mark character will match either zero or one occurrence of the preceding expression.  The above example will match either <code>ac</code> or <code>abc</code>, preferring the latter if possible.</dd>
<dt><code>ab*c</code></dt>
<dd>The asterisk character matches zero or more occurrences.  The above example will match <code>ac</code>, <code>abc</code>, <code>abbc</code>, <code>abbbc</code>, …</dd>
<dt><code>ab+c</code></dt>
<dd>The plus character matches one or more occurrences.  The above example will match <code>abc</code>, <code>abbc</code>, <code>abbbc</code>, …</dd>
</dl>
<h4 id="range-quantifiers">Range quantifiers</h4>
<dl>
<dt><code>ab{3}c</code></dt>
<dd>A number inside braces indicates an exact number of occurrences.  The above only will match <code>abbbc</code>.</dd>
<dt><code>ab{2,4}c</code></dt>
<dd>Two numbers inside braces, separated by a comma, indicates a range of occurrences.  This example will match <code>abbc</code>,  <code>abbbc</code>, or  <code>abbbbc</code>.</dd>
<dt><code>ab{2,}c</code></dt>
<dd>Omitting the second number, but keeping the comma, gives a minimum number of occurrences.  This example will match <code>abbc</code>,  <code>abbbc</code>, <code>abbbbc</code>, …</dd>
<dt><code>ab{,3}c</code></dt>
<dd>Omitting the first number, gives a maximum number of occurrences.  This example will match <code>ac</code>, <code>abc</code>, <code>abbc</code>, or <code>abbbc</code>.</dd>
</dl>
<h4 id="lazy-quantifiers">Lazy quantifiers</h4>
<dl>
<dt><code>ab??c</code></dt>
<dd>Like <code>ab?c</code> this will match either <code>ac</code> or <code>abc</code>, but the double question mark will make it prefer to match the former if this is possible.</dd>
<dt><code>ab*?c</code></dt>
<dd>This will match the same set of possibilities as <code>ab*c</code>, but if there are several possible matches then it will match as few <code>b</code> characters as it can.</dd>
<dt><code>ab+?c</code></dt>
<dd>This is the lazy equivalent of <code>ab+c</code>.</dd>
<dt><code>ab{1,2}?c</code></dt>
<dd>Similarly, putting a question mark after a range quantifier makes it lazy.</dd>
</dl>
<h3 id="alternation-grouping-matching">Alternation, grouping and matching</h3>
<h4 id="alternation">Alternation</h4>
<dl>
<dt><code>a|b</code></dt>
<dd>Matching one a set of possible different is done by using the pipe operator.  This will match either <code>a</code> or <code>b</code>.</dd>
<dt><code>foo|bar</code></dt>
<dd>The alternation operator has very low precedence, in particular lower than a sequence of characters.  This means that this example will match either <code>foo</code> or <code>bar</code>, not <code>fooar</code> or <code>fobar</code>.</dd>
<dt><code>foo|bar|baz</code></dt>
<dd>Matching one of more than two possibilities is simply done by using multiple pipe operators.  This will match any one of <code>foo</code>, <code>bar</code>, or <code>baz</code>.</dd>
</dl>
<h4 id="grouping">Grouping and matching</h4>
<ul>
<dt><code>foo(bar)?</code></dt>
<dd>Parentheses group a set of characters together.  Here the <code>?</code> quantifier applies to everything inside the brackets, so this will match either <code>foo</code> or <code>foobar</code>.</dd>
<dt><code>foo(bar|foo)</code></dt>
<dd>Parentheses can be combined with other operators, such as the pipe alternation operator.  This will match either <code>foobar</code> or <code>foofoo</code>.</dd>
<dt><code>(fooba[rz])</code></dt>
<dd>As well as grouping characters together, parentheses are used to capture elements within a regular expression which can then be examined later on.  This will match either <code>foobar</code> or <code>foobaz</code> and the matching text will be captured; in <code>sed</code> it will be stored as <code>/1</code>, in <code>perl</code> in the variable <code>$1</code>.</dd>

<h4 id="non-matching">Grouping without matching</h4>
<dl>
<dt><code>(?:foo)</code></dt>
<dd>If you want to group a set of characters together without capturing them, then the <code>(?:…)</code> operator will do this.
<dd>
</dd></dd></dl>
<h3 id="positional-markers">Positional markers</h3>
<p>As well as matching text itself, you can control where the text occurs by using positional markers.  These markers do not match any text themselves, but control where the other patterns in the regular expression are able to match text.</p>
<h4 id="line-boundaries">Beginning/end of lines</h4>
<dl>
<dt><code>^foo</code></dt>
<dd><code>^</code> matches the start of a line or piece of text.  This example will only match <code>foo</code> if it is at the start of a line.</dd>
<dt><code>bar$</code></dt>
<dd><code>$</code> matches the end of a line or the end of the text.  This will match <code>bar</code> when it is at the end of a line.</dd>
</dl>
<h4 id="word-boundaries">Beginning and end of words</h4>
<dl>
<dt><code>\b</code></dt>
<dd>This batches word boundaries.  In the string <code>foo bar</code> it will match the start of the string, between the <code>o</code> and the space at the end of the word <code>foo</code>, between the space and the <code>b</code> at the start of the word <code>bar</code>, and at the end of the string.</dd>
<dt><code>\B</code></dt>
<dd>This is the opposite of <code>/b</code> and will match anywhere other than a word boundary, i.e. in the middle of words, and within sequences of non-word characters.</dd>
</dl>
<h4 id="lookaround">Lookaround</h4>
<dl>
<dt><code>foo(?=bar)</code></dt>
<dd>This is a positive lookahead: it will match if the text contains <code>foobar</code>, but will only match the <code>foo</code> part, and not the <code>bar</code> part.</dd>
<dt><code>foo(?!bar)</code></dt>
<dd>This is a negative lookahead: it will match <code>foo</code>, unless it is immediately followed by <code>bar</code>.</dd>
<dt><code>(?&lt;=foo)bar</code></dt>
<dd>This is a positive lookbehind: it will match the text <code>bar</code>, but only if it occurs as <code>foobar</code>.  The text <code>foo</code> will not be part of the match.</dd>
<dt><code>(?&lt;!foo)bar</code></dt>
<dd>This is a negative lookbehind: it will match <code>bar</code> unless it is preceded by <code>foo</code>.</dd>
</dl>
<h3 id="flags">Flags</h3>
<p>Flags controls the overall behaviour of the regular expression.</p>
<dl>
<dt><code>i</code></dt>
<dd>The <code>i</code> (insensitive) flag tells the regular expression to match in a case insensitive manner.  <code>/foo/</code> will only match <code>foo</code>, but <code>/foo/i</code> will also match <code>FOO</code>, <code>fOo</code>, and so on.</dd>
<dt><code>g</code></dt>
<dd>The <code>g</code> (global) flag tells the regexp engine to match all possible instances of the regular expression.  Normally it will stop after the first match, but if this flag is set then it will look for any further matches.</dd>
<dt><code>m</code></dt>
<dd>The <code>m</code> (multiline) flag is for regular expressions that span more than one line of text.  Normally the match has to be on a single line, but if this flag is set then the match can span several lines.  This also changes the behaviour of the dot character class; it normally does not match line end characters, but will if the <code>m</code> flag is set.</dd>
<dt><code>x</code></dt>
<dd>Unlike the other flags, this does not alter the behaviour of the regexp engine.  Instead it allows you to write more legible regular expressions by splitting them across multiple lines: the lines will be concatenated with leading and trailing white space ignored.  The <a href="#example-complex">earlier example</a> used this flag to break up a very long regular expression.</dd>
</dl>
<h1 id="programs-languages">Programs and Languages</h1>
<h2 id="grep">grep</h2>
<p>grep is a simple program usually used to extract lines from text files that match a given pattern.  It is often used to match plain character sequences, so there are very few special characters: most regular expression operators have to be preceded by a backslash to give them their normal meaning.  Exceptions to this are the <code>*</code> quantifier and the <code>^</code> and <code>$</code> anchors which work as normal.</p>
<dl>
<dt>Metacharacters</dt>
<dd><code>.</code> <code>\n</code> <code>\t</code> <code>\s</code> <code>\S</code> <code>\w</code> <code>\W</code><br/>
POSIX character classes, e.g. <code>[[:digit:]]</code></dd>
<dt>Repetition</dt>
<dd><code>\?</code> <code>*</code> <code>\+</code> <code>\{n,m\}</code></dd>
<dt>Alternation and grouping</dt>
<dd><code>\|</code> <code>\(…\)</code></dd>
<dt>Anchoring</dt>
<dd><code>^</code> <code>$</code> <code>\b</code> <code>\B</code> <code>\&lt;</code> <code>\&gt;</code></dd>
</dl>
<h3 id="examples-grep">Examples</h3>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="grep" style="font-family:monospace;">grep 'FIXME\|TODO' */*.p[lm]</pre></td></tr></table><p class="theCode" style="display:none;">grep 'FIXME\|TODO' */*.p[lm]</p></div>
<p>This will print any lines containing either <code>FIXME</code> or <code>TODO</code> from perl files.</p>
<h2 id="egrep">egrep</h2>
<p>Grep also has an extended mode which removes makes most of the operator characters behave as normal, so you do not need to prefix them with a backslash like in its basic mode.  If you are using anything other than very simple regular expressions with grep then is best to use this mode.</p>
<dl>
<dt>Metacharacters</dt>
<dd><code>.</code> <code>\n</code> <code>\t</code> <code>\s</code> <code>\S</code> <code>\w</code> <code>\W</code><br/>
POSIX character classes, e.g. <code>[[:digit:]]</code></dd>
<dt>Repetition</dt>
<dd><code>?</code> <code>*</code> <code>+</code> <code>{n,m}</code></dd>
<dt>Alternation and grouping</dt>
<dd><code>|</code> <code>(…)</code></dd>
<dt>Anchoring</dt>
<dd><code>^</code> <code>$</code> <code>\b</code> <code>\B</code> <code>\&lt;</code> <code>\&gt;</code></dd>
</dl>
<h3 id="examples-egrep">Examples</h3>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="grep" style="font-family:monospace;">grep -E 'FIXME|TODO' **/*.p[lm]</pre></td></tr></table><p class="theCode" style="display:none;">grep -E 'FIXME|TODO' **/*.p[lm]</p></div>
<h2 id="sed">sed</h2>
<p>sed performs operations on streams of characters.  The most common operation is to replace strings, but many more powerful things are possible.  Its regexp syntax is very similar to the basic mode of grep.</p>
<dl>
<dt>Metacharacters</dt>
<dd><code>.</code> <code>\n</code> <code>\t</code> <code>\s</code> <code>\S</code> <code>\w</code> <code>\W</code><br/>
POSIX character classes, e.g. <code>[[:digit:]]</code></dd>
<dt>Repetition</dt>
<dd><code>*</code> <code>\?</code> <code>\+</code> <code>\{m,n\}</code></dd>
<dt>Alternation and grouping</dt>
<dd><code>\|</code> <code>\(</code> <code>\)</code></dd>
<dt>Anchors</dt>
<dd><code>^</code> <code>$</code> <code>\b</code> <code>\B</code> <code>\`</code> <code>\'</code></dd>
</dl>
<h3 id="examples-sed">Examples</h3>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="sed" style="font-family:monospace;">sed 's%\(\d\d\)/\(\d\d\)/\(\d\d\)%20\3-\1-\2%'</pre></td></tr></table><p class="theCode" style="display:none;">sed 's%\(\d\d\)/\(\d\d\)/\(\d\d\)%20\3-\1-\2%'</p></div>
<p>This will transform dates from the format <code>mm/dd/yy</code> to the format <code>yyyy-mm-dd</code>, assuming that the date is in the 21st century.</p>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="sed" style="font-family:monospace;">sed '/^__END__$/,$d' foo.pl</pre></td></tr></table><p class="theCode" style="display:none;">sed '/^__END__$/,$d' foo.pl</p></div>
<p>This will strip the perlpod, and anything else that follows a <code>__END__</code> line, from a perl file.</p>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="sed" style="font-family:monospace;">sed 's/^\s\+//;s/\s\+$//'</pre></td></tr></table><p class="theCode" style="display:none;">sed 's/^\s\+//;s/\s\+$//'</p></div>
<p>This strips all leading and trailing spaces from text.</p>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="code"><pre class="sed" style="font-family:monospace;">sed 's/^\s*\(.*\S\)\?\s*$/\1/'</pre></td></tr></table><p class="theCode" style="display:none;">sed 's/^\s*\(.*\S\)\?\s*$/\1/'</p></div>
<p>This also strips leading and trailing spaces from text.  The previous example uses two statements, one for leading space, and one for trailing space; this one using a single statement using a backreference.  This approach is <em>much</em> less efficient and will be several order of magnitudes slower than the previous example due to the increased memory requirements from the backreference.</p>
<h2 id="perl">perl</h2>
<p>Perl has by far the most comprehensive support for regular expression features.  Many features appear first in Perl before being copied by other languages and programs.</p>
<p>The Perl regular expression syntax is used in many applications and other programming languages through the <acronym title="Perl Compatible Regular Expression">PCRE</acronym> library.  This library is used by PHP, the Apache webserver, the Exim mailserver, and many others.</p>
<dl>
<dt>Metacharacters</dt>
<dd>All metacharacters are supported.</dd>
<dt>Repetition</dt>
<dd><code>?</code> <code>*</code> <code>+</code> <code>{n,m}</code> <code>??</code> <code>*?</code> <code>+?</code> <code>{n,m}?</code></dd>
<dt>Alternation and grouping</dt>
<dd><code>|</code> <code>(…)</code> <code>(?:…)</code></dd>
<dt>Anchors</dt>
<dd><code>^</code> <code>$</code> <code>\b</code> <code>\B</code> <code>(?=…)</code> <code>(?!…)</code> <code>(?&lt;=…)</code> <code>(?&lt;!…)</code></dd>
</dl>
<h3 id="example-perl">Perl Example 1</h3>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span> <span style="color: #009966; font-style: italic;">/^ *ELR : +([A-Z]{3}\d?|[A-Z]{2}\d{2})/o</span> <span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #0000ff;">$elr</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">(</span> <span style="color: #009966; font-style: italic;">/^ *Track Id : +\d(4})/o</span> <span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #0000ff;">$tid</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">(</span> <span style="color: #009966; font-style: italic;">/^ *\d{1,3}.\d{4}/o</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@data</span> <span style="color: #339933;">=</span> <span style="color: #000066;">unpack</span><span style="color: #009900;">(</span><span style="color: #0000ff;">$template</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">for</span> <span style="color: #009900;">(</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$i</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@data</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$i</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #339933;">--</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #0000ff;">$i</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #666666; font-style: italic;"># every other element is a separator -- delete these</span>
        <span style="color: #000066;">splice</span><span style="color: #009900;">(</span><span style="color: #0000ff;">@data</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">{</span>
        <span style="color: #666666; font-style: italic;"># remove leading/trailing spaces</span>
        <span style="color: #0000ff;">$data</span><span style="color: #009900;">[</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">]</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^ +//</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$data</span><span style="color: #009900;">[</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">]</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/ +$//</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span>
    <span style="color: #000066;">print</span> <span style="color: #0000ff;">$elr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$tid</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@data</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span></pre></td></tr></table><p class="theCode" style="display:none;">if ( /^ *ELR : +([A-Z]{3}\d?|[A-Z]{2}\d{2})/o ) {
    $elr = $1;
} elsif ( /^ *Track Id : +\d(4})/o ) {
    $tid = $1;
} elsif ( /^ *\d{1,3}.\d{4}/o) {
    my @data = unpack($template, $_);
    for (my $i = @data; $i &gt;= 0; --$i) {
    if ($i % 2 == 0) {
        # every other element is a separator -- delete these
        splice(@data, $i, 1);
    } else {
        # remove leading/trailing spaces
        $data[$i] =~ s/^ +//;
        $data[$i] =~ s/ +$//;
    }
    print $elr, $tid, @data;
}</p></div>
<h3 id="example-perl2">Perl Example 2</h3>
<div class="wp_syntax" style="position:relative;"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># decodes a standard deviation value</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%errcodes</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span> NA <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> NF <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> NV <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span>
                 SS <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> ST <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">5</span> <span style="color: #009900;">)</span><span style="color: #339933;">;</span>
 
<span style="color: #000000; font-weight: bold;">sub</span> sdval <span style="color: #009900;">{</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$val</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">[</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #0000ff;">$val</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/\d\.\d/</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #000066;">return</span> <span style="color: #0000ff;">$val</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">(</span><span style="color: #0000ff;">$val</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/\*\*/</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #000066;">return</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">(</span><span style="color: #0000ff;">$val</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/($errcodes)/</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
        <span style="color: #000066;">return</span> <span style="color: #0000ff;">$errcodes</span><span style="color: #009900;">{</span><span style="color: #0000ff;">$1</span><span style="color: #009900;">}</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">{</span>
        <span style="color: #000066;">return</span> <span style="color: #ff0000;">""</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">}</span>
<span style="color: #009900;">}</span></pre></td></tr></table><p class="theCode" style="display:none;"># decodes a standard deviation value
my %errcodes = ( NA =&gt; -1, NF =&gt; -2, NV =&gt; -3,
                 SS =&gt; -4, ST =&gt; -5 );

sub sdval {
    my $val = $_[0];
    if ($val =~ m/\d\.\d/) {
        return $val;
    } elsif ($val =~ m/\*\*/) {
        return 10;
    } elsif ($val =~ m/($errcodes)/) {
        return $errcodes{$1};
    } else {
        return "";
    }
}</p></div>
<h1 id="further-reading">Further reading</h1>
<ul>
<li><code>perldoc perlretut</code></li>
<li><cite>Mastering Regular Expressions</cite> by Jeffrey E F Friedl.<br/>
2nd edition published by O'Reilly, 2002.</li>
</ul>
<hr/>
<p>Based on a talk presented by Oliver Burnett-Hall at Durham LUG on 17 February 2008.</p>
</ul>]]></content><author><name>olly-bh</name></author><summary type="html"><![CDATA[What is a Regular Expression? Purpose A regular expression is a flexible way of defining patterns of text. It is a formal language which is interpreted by a regular expression engine (which might be part of an application or a programming language) that parses input text and compares it to the regular expression, and then performs operations on text that matches the regular expression. Common uses of regular expressions include: Matching text Substituting text Extracting text Syntax The basic syntax of a regular expression is /pattern/flags. The main part is the text pattern description, and the flags control the behaviour of the regular expression engine. Different regular expression engines support different features, and also slightly vary in their syntax. After a overview of general regexp syntax we will look at some common applications and languages and how they support regular expressions.]]></summary></entry></feed>