Spain: Political censorship

Comments Off

First they came for the …

The slippery slope of censorship, surveillance and oppression expressed through variations of Martin Niemöller’s speech have become cliché by now. Over the last 16 years, authoritarian regimes have chipped away at basic freedoms, piece by piece and law by law. Still, many believed that the countries of the Western world, or at least western Europe, or at least the country where “I” live, would remain free, democratic and with legitimate governments. At the very least, the authorities would not bother me if “I had nothing to hide”, or did nothing wrong.

That fantasy bubble has now popped, as the true faces of our rulers reveal themselves more and more. In the case of Spain, perhaps it should come as little surprise, where Francisco Franco ruled as a dictator up until 1975. Ironically, making jokes about that dark past is considered “glorifying terrorism”, as one Spanish woman learnt her lesson this year, and got a one-year jail sentence for a Twitter message. In Amnesty International’s report from the beginning of this year, they urge Spain and other European countries to respect Human Rights, specifically freedom of speech and right to political expression. In February 2016, Spanish children’s puppeteers were arrested for including an ETA banner in their show. (See page 41 of the report).

Yet, even all of these events have been considered anecdotes, and the warnings have been heard as fringe voices from the sideline. In Spain, that is now changing. In the dispute between Catalonian separatists and the central government, the silk gloves are off, with thousands of police deployed. The prime minister Mariano Rajoy commands people to “stop the disobedience”.

In an unprecedented move for a European country in the last decades, the offices of the central Internet name registrar for the Catalonian .cat top level domain were raided. It is shocking, because it is such a blatant attempt at control and censorship of political speech. However, it is also concerning because it strikes at the center of the Internet infrastructure, and risks indiscriminately affecting all websites with .cat domains. Catalan leaders compare the move to Turkey, China and North Korea. In a follow up, Google was instructed by the High Court to remove an app related to the 1 October vote.

Regardless of which side of that particular conflict one stands, there is no denying that the blocking, suppression and censorship Spain’s regime is now carrying out is of political nature. It is trying to win the political argument through censorship and authoritarian control of information and communication tools normal citizens rely on. Spain’s government is using the court and police to force its political agenda, when the opposition is talking about a democratic vote.

The government which was voted in to uphold and protect a free democratic state has now failed at that task. As such, it can no longer be considered a legitimate government. If Spaniards know what’s good for them and their country, the will vote Mariano Rajoy and the Partido Popular out of office, while they still have the chance to do so.

Comments Off

Wired: Mother Earth Mother Board

Comments Off

In a blast from the past, this 1996 Wired article about the intrigues of the underwater optical fiber cable business resurfaced. It’s a real long-read about the construction of the 28000 km long FLAG cable, connecting UK to Japan, and various countries and obstacles along the way. Still, it’s well worth the journey. Enjoy!

Comments Off

Review: “Against the Fascist Creep”, Alexander Reid Ross

Comments Off

In Against the Fascist Creep (2017), Alexander Reid Ross summarizes the history of the fascist political and cultural movement from its beginnings in Italy in the early 20th century, and up to recent political developments and elections in Europe and US. He iterates the leading figures and key organizations which have influenced and developed the fascists ideology and thinking over the last hundred years in Europe and US.

A key argument in Ross’ narrative is the idea that fascists and extreme right politics and members have co-opted the left, either by borrowing its tactics or infiltrating its ranks. He provides several examples of where there have been cross-over between extreme left and right groups, and several key members who have “switched sides” either way. The problem with that argument, is that it intermingles ideology, political goals and tactical means. Fringe groups of any kind usually share at least one enemy: the establishment; as Ross also mentions. As under-powered forces, they tend to use similar tactics of asymmetrical resistance and independent loosely coupled and distributed cells as opposed to a central organization. However, the similar tactics and politics does not equate similar ideology.

Throughout the book, Ross seems to lump all and any group or opinion which might have any relation, however tangent, to fascism under the same banner. This creates a polarized view, which is unfortunate, and sometimes leaves questions-marks with some of the facts.

For especially interested only

Ross offers a well researched, thoroughly referenced summary of the fascist history. However, the narrative gets somewhat uninteresting as organization after organization, country after country, and people and relations are iterated through. What is probably lacking is the analysis into the bigger picture and political context. And where there is analysis, it comes with a hint of bias, to support the “fascist creep” argument.

The topic Ross cover is very relevant, especially given most recent events in the US. However, beyond iterating names and groups, the book does not analyze the problem let alone any solution.

If you are particularly interested in the history, organizations and key figures in fascism, this book offers a good summary. Otherwise, it’s a rather boring read, and can better be skipped.

Comments Off

DIY passive audio mixer

Comments Off

In previous posts, I’ve mentioned my TB-03 synthesizer and TR-8 drum machine. While both offer analog audio input and output to chain the sound, it gets tricky when trying to record since there are multiple volume nobs essentially daisy-chained. Adding even more devices breaks down the whole setup.

So I needed a simple audio mixer, and decided to put together something myself. The only requirement was to adjust the volume of the stereo out of each device, and mix it together into one signal. A simple solution adds a potentiometer on each input line (right and left), and combines each line down to one output. I used 10k ohm dual logarithmic rotary potentiometers (which I found at a local electronics shop – which means they’re probably quite old). The input and output connectors are all stereo mini-jack.

As the pictures show, it’s a simple small box, with four inputs, four rotary knobs, and one output. I liked the knobs, however, had wished they could be flush with the surface of the box. They were not made for the potentiometers I got, and it took some Dremel work to make them fit at all. The wiring got a bit messy, and combined dual or even three wire would have made it look better on the inside.

The mixer and volume adjustment work, however, I’m not sure if 10k ohm is enough to adjust the devices. It is not enough to mute the sound. This article suggest adding a 1k resistor in series, which I might try later. It would also be interesting to see at what resistance level the sound is completely muted. Other implementations connects the third pin of the potentiometer to ground from the input. In my box, all ground wires from all inputs and output are combined directly, which I’m not sure if is correct.

Oh, and as can be seen, there’s no scale to indicate the setting of each knob. These can all go to 11 if you like!

Comments Off

Hello World with Qt 5

Comments Off

Getting started with Qt development is rather easy. As with other C++ development discussed earlier, all tools and libraries are native in the Debian / Ubuntu repositories. The following packages should take care of the basic setup:

apt-get install gcc g++ gdb cmake make build-essential qtcreator qt5-default qtdeclarative5-dev qt5-doc qt5-doc-html qtbase5-doc-html qtbase5-examples

Once installed, this small “Hello World” example, inspired by this tutorial but updated for Qt 5, will verify that everything is setup correctly.

Notice that it is important that this file has the extension .cpp, e.g. helloworld.cpp.

#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>

int main( int argc, char **argv ) {
  QApplication a( argc, argv );

  QPushButton hello( "Hello world!", 0 );
  hello.resize( 100, 30 );;
  return a.exec();

Once this file is in place, a Qt .pro project must be generated. (This should only be executed once, to generate the file).

qmake -project

It will create a file based on the name of the current directory, with the extension .pro. Edit the file to include the following two lines:

QT += core gui
QT += widgets

If backwards compatibility with older Qt versions is a concern, change the last line to:

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

Now, the application can be compiled and linked into a binary:

qmake && make && ./helloworld

It should generate a Makefile, make or compile the source code, and start the binary. If everything works out, a new application window with a small button like below will appear.

Comments Off

Review: “The New Tsar: The Rise and Reign of Vladimir Putin”, Steven Lee Myers

Comments Off

Lee Myers’ book is a fascinating and detailed biography of Putin’s life; from early childhood in a poor family in St. Petersburg; as a low level KGB officer; a loyal adviser of the St. Petersburg major Sobchak in the early 90s; and then suddenly and unexpectedly as first prime minister and then president of Russia at the turn of the century. The story includes detailed political and personal events up until the annexation of Crimea in 2014. Lee Myers balances the personal anecdotes, which give glimpses of Putin’s character, with overall political history and background. Throughout, all is very well researched and referenced, with the list of references taking up some fifty pages of a five hundred pages book.

Although some of the sources are clearly biased, as they come from stories told by Putin himself, his wife, or other loyal to Putin, Lee Myers paints a picture of Putin as extremely hard working, determined and goal oriented. Clearly, his unquestioning loyalty was something which got him forward in his early political career in the 1990s. Later on, and especially as president, he has expected the same unquestioning loyalty and servitude from his subordinates and even business interests. Where there has been opposition and resistance, it has been crushed decisively and sometimes brutally, including assassinations and other KGB style methods.

Putin’s upbringing and early life in Soviet Russia and background in the KGB, and also briefly as director of its reincarnation FSB, is a central part of his character, and still shapes his presidency and politics today. The US and the West is still seen as the enemy or at least opposition of Russia, and the politics and wars in Eastern Europe, Yugoslavia; Chechnya; Ukraine; Crimea, as well as the Middle East; Iraq; Afghanistan; Syria must be seen in this light. Thus it becomes clear why Russia is against the Americans in Syria: It is not to support Bashar al-Assad, but rather to avoid American forces on the footsteps of Russia, and furthermore to keep their naval base in the Mediterranean sea at Tartus at the east coast of Syria.

Lee Myers’ book ends in 2014, but hints at the next milestone in Russian politics: The upcoming presidential election in 2018, where Putin legally can sit a second term (which overall would be his fourth term). If he does, it means he will rule until 2024, since he extended the presidential term from four to six years while prime minister under Medvedev in 2011.

Most interesting

As mentioned, Lee Myers’ book is fascinating and a page turner, which is a good achievement when writing about politics. The blend between political and historical events, and personal anecdotes make it entertaining, and also something to quote. Personal favorites include the story from the business meeting between Putin and US business leaders, among them Robert Kraft, owner of the New England Patriots football team. He showed Putin his Super Bowl ring, who understood it as a gift, and put it in his pocket. Mr. Kraft was forced to announce it as a gift to avoid at diplomatic embarrassment.

Understanding Putin’s Russia goes a long way to explain many key world events and decisions over the last decades. Given that it looks like he will be at the head for another seven years, for almost quarter of a century in total, his reign will shape world affairs for decades to come.

Comments Off

C++ and gtest setup

Comments Off

The neat thing about C and C++ on Linux, is that it’s very much a native language. It means that compilers, tools and libraries are part of the core repositories, and easily installed. The following includes the basic setup to get started with C++ development.

apt-get install gcc g++ gdb cmake make libgtest-dev

Unit tests are great, and the Google Test (gtest) framework makes it straight forward to write and run. The gtest Debian / Ubuntu package requires a bit of manual installation as well, as described here. The crux of it:

cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib

The following is a minimal example, which includes the test code and method under test in the same file for the sake of simplicity. Normally, the tests and code would of course be split.

#include "gtest/gtest.h"
int multiply(int a, int b) {
  return a * b;
TEST(HelloTest, Multiply) {
  EXPECT_EQ(2, multiply(1, 2));	
int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();

To compile the code above, take care to include all required arguments. The default executable binary output is “a.out” (or use the -o option to set a custom name), which can be executed, and the test result output should show.

g++ -pthread hello_test.c -lgtest_main -lgtest

Comments Off

QNAP compatible encrypted disks

Comments Off

I’ve previously written about encryption on the QNAP TS-431P NAS and basic cryptsetup usage. Since then, encryption standards and defaults have changed, and it is now easy to create an external encrypted disk which cannot be mounted by a QNAP NAS. The following shows how to work around the issues with cipher and ext4 journaling settings.

The first issue has to do with the default cipher algorithms on Ubuntu and QNAP. As of Ubuntu 16.10, the default cipher is Advanced Encryption Standard (AES) in xts-plain64 mode with a SHA256 hash. The default and supported encryption on the QNAP NAS is also AES, using “128-bit block size, with key sizes of 128, 192 or 256 bits”. However, the supported mode is cbc-essiv:sha256 with hash spec SHA1, as with older Ubuntu and Debian distributions. When trying to decrypt the drive on the NAS, you might see errors like “Failed to setup dm-crypt key mapping for device /dev/sdc1. Check that kernel supports aes-xts-plain64 cipher (check syslog for more info)” and in /var/log/storage_lib.log an error like “crypt: IV mechanism required”.

It should be noted that this is most likely not an issue with volumes created by the NAS itself on its internal drives, unless you start moving drives from one NAS box to another, which is probably not recommended in the first place.

To see the supported ciphers, both on a normal GNU/Linux distribution and the QNAP, use the following commands:

cat /proc/crypto
cryptsetup --help

Also, to see the currently used cipher and LUKS formatted volume, use the luksDump command:

cryptsetup luksDump /dev/sdX1


If you start from scratch, it’s easy to work around the incompatibility. Follow the instructions in the cryptsetup basics article, but add the following options for cipher and hash function to the luksFormat command. Note that this will format and erase all data on the partition.

cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --hash sha1 /dev/sdX1

You might also consider ext3 over ext4, since the former seems better supported by the QNAP NAS at the time of writing. See below for further details.

Changing the cipher

If on the other hand, you discover the incompatibility a bit too late, and have already filled up the external disk with a lot of content, you’re not all out of luck. You’ll just have to decide which way you’d like to waste your time: You can transfer it all over to another disk, reformat, and then transfer back. It will take a few hours, and a bit of work. Or, you can change the encryption cipher on the existing volume, using the cryptsetup-reencrypt tool. However, you’ll probably have to wait multiple days while the whole disk is re-encrypted. On a 2 TB external disk over USB 2.0, it took about 35 hours to complete.

cryptsetup-reencrypt --cipher aes-cbc-essiv:sha256 --hash sha1 --key-file /tmp/keyfile --key-slot 0 /dev/sdX1

Notice that the command uses the same cipher and hash arguments above. However, it adds arguments for the key file to unlock the volume, and which key slot that file is linked to. This is necessary to avoid being asked about each and every password for each of the key slots. Of course, if you have only added a single password based key slot, these arguments can be skipped, and you’ll have to type the password once.

ext4 journaling compatibility

Once the encrypted volume can be opened, there might still be hurdles. The default settings for the ext4 journaling might also not be compatible with the QNAP NAS. At this point, I have to admit I lost interest in researching exactly what the cause was, and fired off multiple changes at once. The error when using the mount command was “mount: wrong fs type, bad option, bad superblock on /dev/mapper/sdc1, missing codepage or other error”.

The default features set from the Ubuntu 16.10 created ext4 formatted partition was:

dumpe2fs /dev/mapper/sdc1
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

The following commands removed a few of them, changed to 32 bits, finished with a check:

tune2fs -O ^huge_file /dev/mapper/sdc1
tune2fs -O ^dir_nlink /dev/mapper/sdc1
tune2fs -O ^extra_isize /dev/mapper/sdc1
tune2fs -O ^metadata_csum /dev/mapper/sdc1
e2fsck -f /dev/mapper/sdc1
tune2fs -O ^64bit /dev/mapper/sdc1
resize2fs -s /dev/mapper/sdc1

In the end, the following features remained, and the volume mounted.

Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_bg

Comments Off

Review: “Dreaming in Code”, Scott Rosenberg

Comments Off

What makes software so hard? Why does it take so long to develop? Why is it always late, always full of bugs, always over budget? In “Dreaming in Code” by Scott Rosenberg, he explores these questions from a historical perspective, and through anecdotes from the Open Source Applications Foundation (OSAF) project “Chandler“. The story of the Chandler project, founded and funded by Mitch Kapor in 2002, serves as an anchor to which Rosenberg attaches the history of software development and management. It turned out to be an interesting choice, since the Chandler project came without a deadline, with “unlimited” funding from Kapor’s pocket, and with very enthusiastic collaborators. Nevertheless, they hit the same hurdles as pretty much any large complex software project have, including being stuck in “software time”, communication overhead, planning and time estimate problems, delayed releases, and thousands of bugs.

Between the project anecdotes, Rosenberg surveys the software development and management literature, and gives a brief glimpse into its history. He frequently comes back to Fred Brooks’ “The Mythical Man-Month” and concludes that the communication overhead grows exponentially, even with today’s online always-connected tools. And there is still no silver bullet to solve it. He touches on various methodologies and processes, including the Capability Maturity Model (CMM); Team Software Process (TSP); Rapid Application Development (RAD); Agile Software Development; Extreme Programming. All of which were supposed to assist a software project and guarantee some kind of success, but which in the end come with their own short-comings and pitfalls.

Given that Chandler is already history, it is not a spoiler for the book to mention that the project failed. It was designed and planned as a native application, right before AJAX and Web 2.0 become buzzwords, and much of the functionality it tried to deliver have now been covered by large web services like Google’s Apps suite, Microsoft’s Office365 and similar. Still, there is plenty to learn from its story.

Learn from it

Rosenberg himself, as well as authors he quote lament the fact that many developers do not take the time to read and study their own profession and history. I have no basis to say whether this is holds or not, however, if it is the case, this book is a good entertaining pick. Despite its age, it is just as relevant today.

If you are or have ever been part of a software project, either as a developer, designer, tester or manager, this book will come with a lot of deja vu moments. Every team believes to some extent that their project, their company, or their goal is special. And because it is special, conventional rules and wisdom does not hold. Usually, history tends to get the last laugh as it repeats itself over and over.

Comments Off

Ubuntu 16.10 on Asus ZenBook UX330

Comments Off

As mentioned in a previous post, I recently got the Asus ZenBook UX330 (UX330CA-FC020T, to be specific). It’s a very light weight 14″ decent spec’ed laptop which runs Ubuntu flawlessly. Here are some notes on installing, and first impressions.

UEFI boot and install

As far as I’ve seen, there are at least two versions of the BIOS around for these machines: The display model had an “old fashioned” ASCII text based BIOS, while the one which got delivered had a new UEFI based GUI. Both can boot the Ubuntu 16.10 64-bit live image, but the Secure Boot just needs some tweaking.

Before getting to boot, it’s important that the partition of the USB stick which holds the image is marked as bootable. In GParted, this can be done with the option seen below. Once that is taken care of, transferring the ISO is easily done with UNetbootin.

Once ready, plug in the USB stick, restart the machine, and hold F2 to enter the BIOS / UEFI setup. (Holding ESC will show the temporary boot selection menu). The “easy” mode can be seen below.

From here, press F7 to enter “Advanced” mode, and use the arrow keys or mouse to tab over to the Security options. Towards the bottom of that tab, there’s a sub-menu for Secure Boot. Enter that menu, and disable Secure Boot.

Use F10 to save and exit, and got back into the UEFI setup with F2 to verify that the Ubuntu live portion shows up as “1100, Partition 1″. From here you can change the Boot settings to select the USB portion first, or use F8 to boot from that only once, which should be all you need to get the installation going.

Ubuntu compatibility

Here’s a list of features I’ve personally tried and confirmed to be working. In summary, this machine looks very well prepared for Ubuntu, with no major draw-backs. The only additional setup which might be worth-while is configuring the touchpad to temporarily disable while typing, as described here.

USB ports Work
SD card reader Works, mounts.
Wifi Detects all networks; connects.
Fast re-connect after suspend.
Bluetooth Not tried
Web cam Works with “Cheese”
Suspend Works; resumes quickly.
From Ubuntu menu, lid close, or Fn + F1
Flight mode
(Fn + F2)
Work, reconnects quickly.
Keyboard brightness
(Fn + F3/F4)
Screen brightness
(Fn + F5/F6)
External display
(Fn + F7/F8)
Not tried
Volume buttons
(Fn + F10/F11/F12)
CPU throttling Not tried


The UX330CA is a decent spec’ed laptop, and there’s a few variations should you want more power. Here’s the selection as it looks in early 2017, comparing to the slightly more expensive UX330UA line.

Price range €750 €930 – €1300
CPU Core M3-7Y30 1 (2.6) Ghz Core i5 7200U 2.5 (3.5) GHz -
Core i7 7500U 2.9 (3.5) GHz -
Max TDP 4.5 W 15 W
RAM 8 GB 8 / 16 GB
SSD 128 GB 256 / 512 GB
GPU Intel HD Graphics 615 Intel HD Graphics 620
Display 1920 x 1080 pixels; 13.30″
anti-glare; no-touch
1920 x 1080 pixels; 13.30″
anti-glare; no-touch
USB 2x USB 3.0 A
1x USB 3.1 C
2x USB 3.0 A
1x USB 3.1 C
SD card reader SD, SDHC, SDXC SD, SDHC, SDXC
RJ45 / LAN No,
comes with USB adapter.
comes with USB adapter.
3.5mm mini-jack 1x 1x
Web cam 1280 x 720 pixel 1368 x 768 pixel
Bluetooth version 4.1 4.1
Wifi version 802.11 ac 802.11 ac
Weight 1.20 kg 1.20 kg
Dimensions (W x L x H) 32.20 x 22.10 x 1.23 cm 32.20 x 22.10 x 1.35 cm
Comments Off

Review: “Amusing Ourselves to Death”, Neil Postman

Comments Off

In “Amusing Ourselves to Death” by Neil Postman, he warns against the perils of television as a communication channel for serious content, and explores why typographic media should be preferred over visual in public discourse, especially in politics, education and religion. He gives examples of how “the medium is the message”, that is, how the channel a message is sent through shapes the message itself. He worries that visual media, television in particular, transforms every message into entertainment, void of context, serious content, or troubling information. He references the fiction in the dystopian worlds of “1984″ and “Brave New World”, to point out “the possibility that Huxley, not Orwell, was right”. (The original foreword and the last chapter argues this eloquently). In other words, we are not suppressed by a surveillance state and dictatorship, but instead distracted by bread and circuses.

Postman’s argument has two main parts: The historical value and importance of the written word as a medium of communication for serious content and public discourse; and the distractions and lack of context in visual communication, especially with television tending to morph every message into brief bits of entertainment.

From typographic to visual media
In the first part of the book, he considers how politics in colonial and 19th century America was mostly conducted and presented through long public letters, or by today’s standards, very long public debates, stretching over many hours in front of local audiences. He is amazed by the attention-span the citizens at that time commanded, and how engaged they were in the politics and arguments of the various politicians. He claims many people at the time would have recognized famous politicians by their writing, but not necessarily by appearance, which is of course the opposite of today’s situation.

In further chapters, Postman looks at how first the telegraph and later the photography changed the media landscape, and how those media shaped the content they channeled through. He traces the beginning of the irrelevant and out-of-context news bits to the telegraph, where snippets from afar could awake as much emotion, if not insight, as local business and news. He continues with discussion about the photograph, and asserts that a picture contains no context but itself. Any additional context is from information surrounding it, or prior knowledge we inject into it.

The medium is the message
To illustrate how the medium shapes and constrains the message, he uses the example of smoke rings for communication: Although they can be used to send very brief messages, it is not possible to conduct a philosophical discussion through that medium. Similarly, Postman argues, television cannot be used to convey serious content, since the visual presentation demands most of the viewer’s attention, and the narration or discussion will tend towards short sound-bites. (As an example of this, look at a site like, which transcribes the audio of most of their short video clips. It is surprising how little text, read in 10 to 20 seconds, which goes with a minute of video).

In addition, most public television is of course funded by advertisement. This directly interrupts and distracts any and all programming, but also dictates the content. The message must be optimized to maximize the number of viewers, and thus eyeballs on their ads. The result can only be one thing: entertainment. Thus, whether the content is news, politics, education or religion, the viewer can never be allowed to get bored, challenged nor offended, lest he skips to another channel.


Postman’s book was first published in 1985. In the 2006 edition, his son, Andrew Postman, points out why his father’s book is even more relevant now. Today, we are surrounded by visual content and entertainment, through the Internet; mobile phones; computers; never-ending TV station streams. Had Neil lived to see our world, he would probably have been even more shocked than he was back then, when an actor was elected US president in 1980.

What makes the book so approachable and readable, is its timeless message about the relevance of the written word for serious communication. Thirty-two years ago, the strongest opposing force was television, while today the Internet brings the same visual entertainment to large parts of the Western population. In fact, the lack of context have gone even further, with services like Facebook, Instagram, Reddit centered around streams of completely random pictures of irrelevant content, often from people we hardly know.

Recent political communication has taken this to a sinister level, when messages are now tailor-made based on a user’s profile. As a result, we might vote for the same party and candidate, but based on different promises automatically designed to appeal to our emotions. The choice of policy is based on the entertainment value of the candidate, or whether he seems like a guy we’d like to sit down for a drink with.

Today, “Amusing Ourselves to Death” is a must-read.

Comments Off

How to disable the touchpad while typing

Comments Off

Most modern laptops come with a touchpad for cursor control. It is typically located below the space-bar, which means it’s easy to rest your palms on it while typing and send the cursor flying. There are two ways to get around the problem: Disable it altogether and use another pointing device, like the red “TrackPoint” or an external mouse; or temporarily turn it off while typing. Here’s how to do both.

First, make sure the these packages are installed:

apt-get install usbutils xinput xserver-xorg-input-synaptics

Permanently disable

Any input device can be configured through the xinput tool. However, as machine configurations will be different, we’ll need to look at what is connected first. This will list internal and connected devices:

xinput list

The first command will list connected USB devices, which might be relevant. The second command will output a list like the following, where each device has an ID, but which will change based on the machine and what is connected. The example below is from a Lenovo Thinkpad with an external mouse, so three hardware pointing devices are listed: The touchpad; the trackpoint; and the external Logitech mouse. Notice the ID for the touchpad, which is 12 here.

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=12	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=13	[slave  pointer  (2)]
⎜   ↳ Logitech M570                           	id=9	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=10	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=11	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=14	[slave  keyboard (3)]

We can query details about a specific device:

xinput list-props 12
xinput list-props 12 | grep Enabled

There are two ways to enable and disable a device: By setting the “Device Enabled” property, or with the xinput command shortcut which does the same:

xinput set-prop 12 "Device Enabled" 0
xinput disable 12
xinput set-prop 12 "Device Enabled" 1
xinput enable 12

Temporarily turn off while typing

You might want to use the touchpad though, and only avoid the “fat fingers” problem while typing. Here the syndaemon tool comes to the rescue. It’s a “a program that monitors keyboard activity and disables the touchpad when the keyboard is being used”. It means, you’ll have to make sure it’s running in the background, typically through the start-scripts of your desktop.

There’s a few settings to play around with and also a CLI client “synclient“. See also the synaptics driver documentation for more options.

Having this in a startup script will cover most common use cases:

/usr/bin/syndaemon -i 1 -t -d

Comments Off

Linux compatible notebooks and laptops

Comments Off

You’d think that there would be a sizable market for a Linux based laptop, but Microsoft maintains its stronghold, and if anything it’s getting harder to buy random hardware and expect it to just work. Due to the UEFI bootloader; Secure Boot; various proprietary buttons solutions; touch screens; and no or little support from the hardware vendors. After doing a bit of research in small and mid-range notebooks and laptops that works with Linux, here’s a brief summary.

Most of the newer devices were evaluated with a USB live version of Ubuntu 16.10 64-bit.

(Disclaimer: This is not meant to be an exhaustive list of all available brands or Linux compatible devices. Please take it as a snapshot in time of the laptops which happened to be available in my local market. Also note, beyond being a consumer of some of the mentioned laptops, I’m not affiliated with any of them).


The Lenovo Thinkpad is still top of the line when it comes to business laptops. After using the Carbon X1 2016 4th generation edition for about half a year, it’s a sure all-time favorite. It’s available with Intel’s 7th generation Skylake CPU at various speeds, it does not get warm and uses little battery, which again makes for long battery life. A full working day without carrying a charger is usually not a problem.

Any Lenovo Thinkpad you’ll pick up will support Linux easily. It has a huge community and following, which means drivers, special buttons, sensors etc. get support quickly. The exception might be some of the more exotic variants of the Yoga Book (which run Android). In general, booting and installing any version of any GNU/Linux distribution is not a problem.

The downside is of course the price. At 1500 to 2500 Euros, it can be a tough pill to swallow if you’re buying new. However, there is also a healthy used-marked, so if you’re willing to wait a bit longer to get the latest tech, it’s a good compromise.


In hardware circles, ASUS is perhaps more famous for their high quality motherboards, but they also have a healthy range of laptops, many of which support Linux. I looked at a few models, with the ZenBook as the clear winner.

ZenBook UX330

These are nice! In fact, there’s a wide range of configurations colors and prices, most with 13.30″ full 1080HD screens, some with touch screens or larger screens. The cheapest version is now around €750 for an Intel m3-7Y30 dual core (4 threads). At only 4.5 W TDP, it does not get warm and is fan-less. It comes with 8 GB RAM and 128 GB SSD which is decent. Best of all, it’s only 1.3 kg, so just as light as the Lenovo Carbon.

There seems to be a few different BIOS versions on these models. The traditional text-based BIOS had no problems booting the Live USB. However, with the UEFI version, a bit of fiddling with Secure Boot and Boot Priority was required. Turning off Secure Boot and making sure USB partition was marked with a “boot” flag fixed it. (Spoiler alert: I’ll get back to this in a another post, as I already bought this machine).

Furthermore, on Ubuntu 16.10, everything works out of the box: Wifi; suspend; all function buttons: volume; screen dimming; flight mode; touch pad enable/disable. Battery life looks promising at around 10 hours.

The higher end versions, with i7 CPUs; 16 GB RAM; 256/512 GB SSD are probably the closest competitors to Lenovo’s light weight laptops at the moment. At about 25% lower price, they might certainly be worth considering.


The Eee line from a few years back were nice super-small “ultrabooks”, albeit somewhat under-powered by today’s standards. A more recent edition, the R105HA is a €240 2-in-1 11″ detachable table and keyboard. It has a USB A slot; it booted to the GRUB menu, but failed to load the Live UI. It could be that it’s not a x64 based CPU at all; not sure.


A bit further up the range, but at similar price there’s the E402SA. It’s a 14″ laptop, with full sized keyboard, but only 2 GB RAM and 32 GB SSD. Still not bad for €280. It booted the Ubuntu live stick fine. Wifi; volume buttons; suspend works. Screen dimming works, but not through the function-buttons. The main downside is the cheap keyboard, where the SPACE-key is hinged in the middle, so it might not register a thumb-click in its corners.


I’m not familiar with this brand, and it could be only a label on generic OEM devices of some kind. However, I thought it was worth including, since they had the cheapest smallest notebook I came across.

PNB C111

This is an 11″ but full 1080HD laptop with a tiny keyboard; think early Asus Eee. The €180 version comes with an Intel Celeron N3060 CPU; 2 GB RAM; 32 GB SSD. It is light, but feels plasticy. And as mentioned, the keyboard is cramped, even for small fingers.

It booted the Ubuntu 16.10 64-bit live image fine, and wifi; volume function keys and suspend all work out of the box. Screen dimming also works, but not through the function buttons (this seems to be a common problem).


HP and Dell

There were a few HP and Dell laptops in the shops I went to, but where I tried, none of them would boot the USB image. This could be down to bad luck; the Asus Zenbook was also difficult in UEFI mode, however, I’m not sure they are good options at higher prices than the Zenbook range.

System 76

This is one of the long time dedicated Ubuntu Linux hardware retailers. They don’t make their own hardware though, and instead merely put their name on OEM devices. The problem is, as much as I’d like to support a Linux hardware vendor, it comes at a very high price for mid-tier hardware. Of course, they put extra effort into making sure the drives are all available for their products, including keeping their own driver package repository running, but I’m not sure it’s worth it.

The version I have experience with and bought was the “Gazelle Professional” for some $1300. (New edition here). It works and has been running for five years, it’s nice, but extremely heavy even for its time. At some 4 kg with the charger, it can no longer be considered portable. The newer version in the picture above is the Lemur, at 1.6 kg and starting price of $700.

Comments Off

Asus Thinker Board

Comments Off

Asus recently released their single board computer “Thinker Board”, modeled on the same form-factor and pin layout as the Raspberry Pi 2 and 3, and at the same price point. It comes with some interesting upgrades over the RPi 3: 2 GB RAM (over 1 GB); 1.8 GHz quad core (over 1.2 GHz quad) dedicated Realtek 1 Gb/s Ethernet; Realtek audio codec; and support for 4k HDMI out. It could make both a good media player platform, as well as a usable desktop box.

In their early review, Hackaday laments the lack of website and community. The former has since been addressed, and Asus’ official site is actually rather slick fun and informative, and includes a Debian based OS ISO and other downloads. They have also put up a Facebook page, but it’s mostly linked product reviews and blog post for now.

Comments Off

Linus: Hash function as identifier vs. crypto security

Comments Off

Linus had an interesting observation last week, after it was announced that collisions could be found for the SHA1 hash algorithm. On the “Shattered” page, they declare that everything is broken, from cryptographic signatures to backup systems, and git. Linus however, refutes this, noting that the use of SHA1 in git is not for security, but rather as an identifier for the commit.

In fact, as is pointed out in the comments section of Linus’ post, git could probably have gone with a CRC 160-bit function (the default SHA1 is 160 bits). Or, if there was no need to relate the ID directly to the submitted code, an UUID would also have been fine.

The point is, security does not exist for itself, but rather as a reaction or mitigation to a threat. If the threat is cosmic rays or disk corruption, assuming no other intentional attack, and all that is required is to detect when there is a bit-flip, CRC, MD5, SHA1 are all fine alternatives. However, for dealing with encrypted messages, keys and signatures, other algorithms are needed. As for git, the biggest threat there is not bit-flips, accidental or malicious. Rather, it is the incorrect behaviour and functioning of the code in the repository. And for that, the solution is not hash functions, but unit tests. As Linus points out, you will definitely notice if characters and code is flipped around.

Comments Off