Search This Blog

Installing Ubuntu Server on Qemu without the GUI

Nested virtualisation is a thing. The desire to install an X server and all its components just to install a nested guest may not be there for you. Fortunately the good people at <insert FOSS project>¹ have you covered.

Assuming you've got the iso ready, and are familiar with Qemu.

1. Mount the ISO
$ fuseiso ubuntu-24.04.1-live-server-amd64.iso iso

2. Append the relevant lines to your Qemu command line
$ qemu-system-x86_86 -serial mon:stdio -nographic -display curses -append 'console=ttyS0,115200,8n1' -kernel iso/casper/vmlinuz -initrd iso/casper/initrd

Easy peasy!

Booting Ubuntu Server via serial

¹ Mostly Qemu

Allow embedded YouTube video to go fullscreen

Have you ever seen this little annoyance?

Full screen is unavailable

YouTube's tells you very little about how to solve it.

Thankfully, it's pretty simple.

Assuming you've been given some HTML to embed into your website, such as:
<iframe src="https://www.youtube.com/embed/?list=UULFZXXi0dM4r7-sKFNo1kGlwg" width="480" height="400"></iframe>


Then you only need to add one attribute, allowfullscreen:
<iframe allowfullscreen src="https://www.youtube.com/embed/?list=UULFZXXi0dM4r7-sKFNo1kGlwg" width="480" height="400"></iframe>
And that's it! It works!

Google's Rich Results Test incorrectly parses <iframe> Microdata

Google's Search Console has been pestering me for years about missing information in videos shared on Blogger. I have ignored this because I knew the information provided was correct.

However, I have recently launched a new website and wanted to validate the Microdata added to it, so I decided to go back to a that has had issues and try to solve them. Immediately the Rich Results Test reported a problem. A problem that only exists for Google.

VideoObject test results

Maybe the VideoObject is picked up as part of the Article?

Is the VideoObject picked up as part of Article?

Yes, but none of the details.

So what does the Schema.org have to say on the subject?

Schema.org validates the Microdata

Nothing. It's happy. Everything is picked up and validates correctly.

Surely the validator from the official schema site must be correct. Just in case there was a bug in there somewhere I thought I'd give

Yandex validator test results

Well, it does a better job than Google but there is clearly something it is not happy about. It turns out that Yandex does not like having URLs in <meta> tags. I couldn't find anything in the HTML5 spec about this, but suggest using <link> and href instead.

Confusingly, states, in reference to the <link> tag:

The required rel attribute specifies the relationship between the current document and the linked document/resource.

This is only partially true. From the HTML5 :

A link element must have either a rel attribute or an itemprop attribute, but not both.

Despite Schema.org being quite happy with my original layout, I caved in to Yandex and updated all my <meta content= tags to <link href= tags. This pleased Yandex.

Trying again with Google, just in case this was the issue, gave the same result. Indeed, to get Google to accept the Microdata I had to move it outside of the <iframe> tag. Google was unhappy about:

<div itemprop="sharedContent video" itemscope itemtype="https://schema.org/VideoObject">
  <iframe itemprop="embedUrl" src="foo.html">
    ...Microdata...
  <iframe>
<div>

So I changed it to:

<div itemprop="sharedContent video" itemscope itemtype="https://schema.org/VideoObject">
  <iframe itemprop="embedUrl" src="foo.html"><iframe>
  ...Microdata...
<div>

Finally this made Google almost happy and the Microdata was picked up.

But, why would I put the Microdata in between <iframe> tags to begin with? Well, there was no reason not to. Schema.org was happy with it, the code was invisible to the user, and it it looked a little bit neater to me. I have tried searching for the “rules” around data between the <iframe> tags and there doesn't seem to be any information about this. It doesn't seem to be defined. Once again: Schema.org seems to be happy with this.

However, undefined might be the problem here: if something is not defined in a standard, such as HTML5, then the treatment and behaviour of such a practice is itself undefined. Maybe, then, it's not fair to say that Google incorrectly parses the data, rather it discards this data as undefined. I would love to reach out to Google about this, but as everybody knows there is no way to contact anyone at Google about anything. Which is nice.

..almost, you say? Sadly, yes. One problem remains for Google that isn't present for Schema.org nor for Yandex.

Google's one remaining issue

Despite actually having itemprop="embedUrl" in the iframe tag, Google cannot pick this up. This time I believe this is Google's fault. The states:

Every HTML element may have an itemprop attribute specified

Each token must be either:

A valid URL string that is an absolute URL defined as an item property name allowed in this situation by a vocabulary specification

So, in my opinion, Google is erroneously missing this particular itemprop. The workaround? Move the itemprop into a new link element.

I'm not overly pleased that two search engines seem to disagree on how to implement Microdata. To apparently disagree with standards is even worse. Nonetheless I am now aware of the limitations of both Yandex and Google, and what I need to do to work around them.

Running Etherape without root or sudo

To run Etherape without having to use sudo each time then, after installation, run the following command:

sudo setcap cap_net_raw,cap_net_admin+eip /usr/bin/etherape

Your executable may be in another location.

Make sure you understand the security implications of doing this.

You will need your administrator to run this command for you if you do not have sudo access.

ATLAS@Home native app on Ubuntu Bionic


In case you haven't heard: the ATLAS@Home app is available for download in Linux. This app normally runs inside a Virtualbox VM, which is a good way to get things working with different operating systems, but adds the overhead of a virtual machine. This can be avoided when ATLAS@Home is running on your Ubuntu Bionic computer by following the steps outlined below.

First, let's make sure you have the essentials:

sudo apt update && sudo apt -y dist-upgrade
sudo apt install attr autofs curl boinc-client fuse gawk gdb lsb-release perl psmisc python2.7 singularity-container uuid-dev uuid wget

Next step is to add the repositories and install cvmfs.

wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb \
http://cvmrepo.web.cern.ch/cvmrepo/apt/pool/bionic-testing/main/cvmfs-config-default_1.4-1_all.deb \
http://cvmrepo.web.cern.ch/cvmrepo/apt/pool/bionic-testing/main/cvmfs_2.5.1~1+ubuntu18.04_amd64.deb
sudo dpkg -i cvmfs*.deb

Before you continue, however, you may have noticed the following warning:

Warning: this distribution is not supported. Using Ubuntu 12.04 packages as fallback.
If you don't get this: excellent! If you do: it simply means that the repository hasn't been correctly configured for Bionic yet. The fix is simple enough:

sudo sed -i 's/precise/bionic/g' /etc/apt/sources.list.d/cernvm.list
Note that an update to the cvmfs-release package may overwrite these changes, so you'll have to do it again.
Also note that, at time of writing, the Bionic repos have not been set up correctly, which is why you need to manually download the packages. If the packages change (usually due to a version update), you can find the required packages at http://cvmrepo.web.cern.ch/cvmrepo/apt/pool/bionic-testing/main/. Once the repositories are set up properly, the packages will update as expected.

And now a few more steps:

sudo cvmfs_config setup
printf "CVMFS_REPOSITORIES=atlas.cern.ch,atlas-condb.cern.ch,grid.cern.ch\nCVMFS_HTTP_PROXY=DIRECT\n" | sudo tee /etc/cvmfs/default.local
sudo systemctl restart autofs

Finally, check everything is okie dokie:

$ cvmfs_config probe
Probing /cvmfs/atlas.cern.ch... OK
Probing /cvmfs/atlas-condb.cern.ch... OK
Probing /cvmfs/grid.cern.ch... OK

Cushty.

Notes:
  • If you have a proxy, you should use that in place of CVMFS_HTTP_PROXY=DIRECT. However, this must be set to something or it will fail.
  • If you have a lot of machines and a server which runs all the time (such as a proxy server), you will probably be better off installing cvmfs on the server, and exporting the share over NFS. This will save a lot of duplication and inbound bandwidth.
  • At time of writing, none of the LHC@Home applications run on GPU for mainly historical reasons. Given improvements in the way VMs are handled this may change in the future. If you wish to use your GPU then you will also need to install the relevant drivers and libraries.
References:
  1. https://cernvm.cern.ch/portal/filesystem/quickstart
  2. https://lhcathomedev.cern.ch/lhcathome-dev/forum_thread.php?id=348
  3. http://cvmrepo.web.cern.ch/cvmrepo/apt/pool/
  4. https://twiki.cern.ch/twiki/bin/view/CvmFS/ClientSetupCERN

The Ghost in the Machine

A great number of years ago a CRT monitor I was using gave up. It had served its master well for many years. My father (yes I was still a child!), just out of interest, rang the company he bought the original equipment from. To our surprise they sent us a replacement LCD screen. It works just as well as the original CRT and had the same sort of specs so we were more than happy with the result.

The monitor itself has no identifying marks other than a model number: M15EWA. A Google search suggests two brand names but neither may be the original manufacturer.

I discovered that using a very simple procedure I can get a rather unusual effect from the monitor.


The monitor presents to me its evil eye. If you are a little worse for wear and sat in the dark when this happens, then staring into the eye is quite an experience.

The answer of course is that the monitor is possessed by a dæmon intent on bringing destruction to the world. First by making me switch the monitor on and off. Oh, the seconds I have wasted doing this! It could even be a full minute by now.

Other options are that this is either and Easter egg, albeit an unusual one, or a firmware issue. It is far from being a major issue but I did find it interesting.

To trigger this behaviour:
  1. Switch off the monitor.
  2. Allow the computer to put the graphics card to sleep.
  3. Simultaneously switch the monitor back on and wake the computer.
It looks as if waking the computer during the monitor's POST gets it a little confused, and makes it do pretty things. The same thing occurs on any computer I test it on. Or it's a djinn.

Raspberry Pi 3 on sale now

RASPBERRY PI 3 ON SALE NOW AT $35

In celebration of our fourth birthday, we thought it would be fun to release something new. Accordingly, Raspberry Pi 3 is now on sale for $35 (the same price as the existing Raspberry Pi 2), featuring:

  • A 1.2GHz 64-bit quad-core ARM Cortex-A53 CPU (~10x the performance of Raspberry Pi 1)
  • Integrated 802.11n wireless LAN and Bluetooth 4.1
  • Complete compatibility with Raspberry Pi 1 and 2
Raspberry Pi 3 Model B
Raspberry Pi 3 Model B

BCM2837, BCM43438 AND RASPBERRY PI 3

For Raspberry Pi 3, Broadcom have supported us with a new SoC, BCM2837. This retains the same basic architecture as its predecessors BCM2835 and BCM2836, so all those projects and tutorials which rely on the precise details of the Raspberry Pi hardware will continue to work. The 900MHz 32-bit quad-core ARM Cortex-A7 CPU complex has been replaced by a custom-hardened 1.2GHz 64-bit quad-core ARM Cortex-A53. Combining a 33% increase in clock speed with various architectural enhancements, this provides a 50-60% increase in performance in 32-bit mode versus Raspberry Pi 2, or roughly a factor of ten over the original Raspberry Pi.

James Adams spent the second half of 2015 designing a series of prototypes, incorporating BCM2837 alongside the BCM43438 wireless “combo” chip. He was able to fit the wireless functionality into very nearly the same form-factor as the Raspberry Pi 1 Model B+ and Raspberry Pi 2 Model B; the only change is to the position of the LEDs, which have moved to the other side of the SD card socket to make room for the antenna. Roger Thornton ran the extensive (and expensive) wireless conformance campaign, allowing us to launch in almost all countries simultaneously. Phil Elwell developed the wireless LAN and Bluetooth software.

All of the connectors are in the same place and have the same functionality, and the board can still be run from a 5V micro-USB power adapter. This time round, we’re recommending a 2.5A adapter if you want to connect power-hungry USB devices to the Raspberry Pi.

You’ll need a recent NOOBS or Raspbian image from our downloads page. At launch, we are using the same 32-bit Raspbian userland that we use on other Raspberry Pi devices; over the next few months we will investigate whether there is value in moving to 64-bit mode.

Find a Raspberry Pi 3:

Blogger Template Designer does not apply web font selections

The Blogger Template Designer offers a quick and easy way to (re-)design your blog without having to faff around with the template code.

Blogger Template Designer

...except that it doesn't work properly.

Header is not using the selected font

Why?

Well, it would appear that when you open the BTD it nicely downloads all the web fonts so that you can preview them easily. The problem is that once you have made your selection the only part of the template code that is changed is the font name. There is nothing to instruct the browser that it needs to download the font in order to render it. Sadly, you will have to faff around with the template code.

The first thing to do is to find the font you wanted over at Google Fonts. In my case it is Gruppo: https://www.google.com/fonts/specimen/Gruppo. There should be a link that takes you into Google Fonts where you can play around with the fonts of your choice, and the styles of your choice. The buttons along the bottom will take you to a page that shows you what code you need to add to your page. In my case this was:

<link href='https://fonts.googleapis.com/css?family=Gruppo' rel='stylesheet' type='text/css' />

And now your selection should work. The BTD should have inserted enough into the template at this point to allow the browser to render your font correctly. If not... 😕.

Note: Things may not work nicely in Internet Explorer. That's tough luck - don't use Internet Explorer.

Google Analytics, despite ad blockers

You have noticed that ad blockers also block Google Analytics in some valiant attempt to protect your privacy. If you're one of the normals then you use Analytics so you have some idea what is going on when people visit your website, not to create a vast database of users. Indeed Google Analytics itself anonymises some of its data to try to allay the fears of the truly paranoid.

You therefore need a way of tracking what is going on.

First, let's have a quick look at what is going on with the Analytics code.

Once you have created your property, you are told to add a code snippet to your pages:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-12345678-90','auto');
ga('send','pageview');

/usr/bin/env: node: No such file or directory


The Problem


You have installed npm or nodejs and the second you go to use it you receive an error message:

/usr/bin/env: node: No such file or directory

The Cause


Package managers. *sigh* What is normally named node is named nodejs.

$ which nodejs
/usr/bin/nodejs


The Solution


[ -d ~/bin ] || mkdir ~/bin
ln -s $(which nodejs) ~/bin/node

This will allow your system to find node.

There must be some reason behind the package maintainers renaming node to nodejs, probably to avoid a conflict, so you don't really want to be renaming files, or making the changes system-wide (/usr/local/bin) unless you know what you are doing.

$ node --help
Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]

Options:
-v, --version print node's version
-e, --eval script evaluate script
-p, --print evaluate script and print result
-i, --interactive always enter the REPL even if stdin
does not appear to be a terminal
--no-deprecation silence deprecation warnings
--trace-deprecation show stack traces on deprecations
--v8-options print v8 command line options
--max-stack-size=val set max v8 stack size (bytes)

Environment variables:
NODE_PATH ':'-separated list of directories
prefixed to the module search path.
NODE_MODULE_CONTEXTS Set to 1 to load modules in their own
global contexts.
NODE_DISABLE_COLORS Set to 1 to disable colors in the REPL

Documentation can be found at http://nodejs.org/


Great stuff!

References:
https://github.com/nodejs/node-v0.x-archive/issues/3911#issuecomment-8956154

YouTube Poll Cards are lush, honest!

Card teaser on a YouTube video

Everyone loves polls. It's just a fact. YouTube know this so they have introduced Poll Cards to creators.

A YouTube video showing a Poll CardClose-up of a YouTube Poll Card

Cards are interactive elements that slide into view during a YouTube video which prompts a user to interact in one of a number of ways. You can use a Card to:
  • Promote a video or playlist
  • Promote a channel
  • Ask users to take part in a poll
  • Link to an approved website
  • Ask users to donate to a non-profit
  • Beg for money

Unless you're using an overbearing adblock, you'll see them in the video that you're watching.

Filling out a YouTube Poll Card

This, of course, allows users to give you quick feedback where they might not be able to use the comments section, such as when the video is embedded into another site or a third-party application, assuming the application can handle them; or if they just can't be bothered to scroll down a bit. It offers the user an easy way to interact.

The cards can be updated at any time to ask a different set of questions. The video, of course, cannot without uploading a whole new video, bar simple editing like video quality. If you add your own comment asking questions it could be buried under the avalanche of xenophobic bilge that always fills a YouTube comments thread. This way your question will be seen.

You can change your answer too, should you choose the wrong option the first time.

Changing my choice on a YouTube Poll Card

If you're a creator in good standing it is incredibly easy to add a Poll Card.

From your My Videos click on the drop-down menu next to the video you want to add a card to and select Cards.

Selecting 'Cards' from the drop-down menu in 'My Videos'

Once you're in there, pick the position of the video where you want your teaser to appear then click Add card. From there you can select Poll and fill in the details. It is a very simple interface: there's no room for confusion.

Selecting the 'Add Card' drop-downFilling out the Poll Card options

Click Save and it's done! You can click on the little i to see your new Poll card. Lush.

A video with cards added


New frontiers in communication systems

New research by the universities of Bristol, Keio and industrial partners have unlocked 80 THz of fibre-optic bandwidth that will enable future exascale data centres and transform 5G networks.

The research on optical communication technologies, wavelength division multiplexing and networks form the backbone of every wired network across the whole Internet. Work until now has been focused and limited on utilizing ~11 THz of bandwidth (C and L Band) centred at 193 THz.
Optical networks based on this frequency bands have been able to support up to 230 channels at 50 GHz spacing.

The technology fabricated and tested is based on cascaded arrayed waveguide gratings (AWGs) and is designed to potentially construct a 1600 x 1600 wavelength router that can guide data at the speed of light. Specially designed quantum dot chips are used for light sources.

This single passive optical system can route immense information offering manifold increase from current systems. It can single-handedly interconnect over one million end points while offering at least ten Gb/s per end point. Critically it is also future proof since it's transparent to any communication signal and it can also potentially consume zero power due to its passive nature.

Read the full article at New frontiers in communication systems.

YouTube's "Remove a Song" - Wow!

Anyone who has been wasting time reading my drivel on this blog will know that I have been somewhat irritated by the lack of response from YouTube regarding spurious copyright claims on videos. I had given up for a while but felt that I simply couldn't let them get away with it!

Anyone else who has found their way here might be familiar with the copyright claims being slapped on their own videos, and how annoying that can be.
Copyright notices on videos

Copyright claims can have the following effects:
  1. You are unable to monetise your video, or have to share the monetisation with the claimant.
  2. You are forced to have adverts show on your videos when you don't want them.
  3. You may struggle to upgrade your channel to include certain features, such as live broadcasts.
  4. Your video(s) may be blocked altogether in certain regions.

To my delight and amazement I discovered that a fair bit of work has gone into solving the issue:

Notice showing that a piece of copyrighted music has been detected in a video

Two notices showing that two pieces of copyrighted music has been detected in a video

Could it be that easy?

After clicking the remove button

After clicking both remove buttons

Certainly looks like it!

YouTube have, rather quietly, introduced this "Remove a Song" tool to remove the music from your videos without affecting the rest of the audio.

So now we just hit "Save" and let the gremlins cast their magic.

Notice letting you know that it might take a while to remove the song from your video

And when the processing is finished...

Some noticed have been removed from the updated videos
Success! Well, almost. One video failed.

Notice telling you that there was an error when attempting to remove a song from a video

But let's not forget what has happened here: YouTube have managed to remove the music from the video without affecting the rest of the audio. It's very impressive and not something I would know how to do myself. My planned solution was to simply mute parts of the track, but now that isn't necessary. Yes, one failed, but the service is still in beta. Hopefully this will be one of the features that remains on YouTube. Some other features have quietly come and gone with time.

Of course if you want to do covers of songs then removing the music probably isn't an option. But that's up to you. In that case you may be able to share the advertising revenue, or simply be given permission from the copyright owner.

My videos no longer have copyright claims against them. Hurrah!

Update: YouTube does NOT listen to copyright claims

Previously I have written about how YouTube does listen to copyright claims and followed it up a year later with how YouTube does NOT listen to copyright claims. Confusing, I know. To make sense of it all I recommend reading those posts, if you're interested in that sort of thing.

I have had to do a lot of research on this damned problem to fight the copyright claims on my videos, which I really shouldn't have to do. They don't even receive that many hits but the lack of response pissed me off. I think I have found an answer on how these wallies came to their conclusion.

On the 12th of September, 2011, the Council of Europe adopted Directive 2011/77/EU, which in accordance with Article 4 came into force on the 20th of the same month. The Directive recommends extending protection of the rights of performers and phonogram producers on music recordings within the EU from 50 to 70 years; the exact details vary and can be gleaned from the text of the Directive, as well as some other protections and recommendations.

This is somewhat crucial to my story: my video, Sunderland Airshow 2012, was of course recorded in 2012, which was seven years after the expiration of the copyright, under the old rules, on The Dam Busters March, which appears in the video. Presumably this was overlooked by the original claimant in my story.

The general idea behind the Directive is that recording artists aren't paid for long enough for their work and they should be paid for even longer. The texts leading up to, and included in, the Directive suggest that this will help poorer performers receive adequate compensation for their work, whereas nobody really cares how hard-up the millionaires think that they are. The E.U. have, at times, been criticised for making some rather ridiculous suggestions and recommendations, some of which end up being law. I'll let you decide if this one is a sensible one or not....


....I digress.

The Directive wouldn't have affected me at all if it was not applied retroactively. From the rather in-depth Impact Assessment:
It appears that a partially retro-active extension, with a specific cut off date, would be the simplest solution as regards the legal and administrative aspects and would bring the most benefit to right holders from the start.
The Impact Assessment explains what it means by the term partially retro-active but it could be inferred that I am affected by this.

I certainly don't know enough about law to give any kind of in-depth analysis of what this all means, but I did wonder if this did not violate Article 7 of the European Convention on Human Rights (codified in U.K. law under the Human Rights Act 1998):
No one shall be held guilty of any criminal offence on account of any act or omission which did not constitute a criminal offence under national or international law at the time when it was committed.
I would suggest that the E.C.H.R. only applies to government bodies, though there have been a number of high-profile cases in the U.K. in which the E.C.H.R. has been deemed to apply to businesses (mainly the press). Crucially, though, Article 7 states that it applies to criminal offences, and any legal matters arising from my circumstances would almost definitely fall under civil law. Indeed, there was no criminal act or intent (not on my behalf anyway).

So there we go. Not very technical but it almost concludes the story so I thought I should share.

Now if only there were some way to remove the musical composition from the audio track of my video....

References:

Aside:
An interesting read on a possible E.C.H.R. Article 10 violation:

How long does a deprecated IPv6 address remain attached to an interface?

This may be obvious to normal folk but it wasn't to me, hence this post to remind me in the future.

The question posed to mine bad self was:

How long does a deprecated IPv6 address remain attached to an interface?

You may already know the answer. But in case you don't...

I packed a bag full of things I'd need - crab paste sandwiches, weak lemon drink, a compass, silk stockings and a plastic carrot - and set off on my journey through the Googles, a bit of oxygen but mainly laughing gas in my lungs.

My first stop, and first sip of weak lemon drink, was at an Oracle manpage:

An IPv6 deprecated address will eventually be deleted when not used,

Excellent! But when?

My next stop pointed out the bleeding obvious (good, old Wiki):

When an address is assigned to an interface it gets the status "preferred", which it holds during its preferred-lifetime. After that lifetime expires the status becomes "deprecated" and no new connections should be made using this address. The address becomes "invalid" after its valid-lifetime also expires

Er, yeah, that actually makes sense. Indeed:

$ ip addr | fgrep -A 1 temporary
    inet6 fd3c:c307:7f95:0:6957:dcf5:f759:e2e9/64 scope global temporary dynamic
       valid_lft 575828sec preferred_lft 56828sec
    inet6 fd3c:c307:7f95:0:d5b5:b1d0:a807:21a9/64 scope global temporary deprecated dynamic
       valid_lft 490031sec preferred_lft 0sec
    inet6 fd3c:c307:7f95:0:10d:8171:ff7f:777f/64 scope global temporary deprecated dynamic
       valid_lft 404233sec preferred_lft 0sec
    inet6 fd3c:c307:7f95:0:4dc0:7c07:c401:490b/64 scope global temporary deprecated dynamic
       valid_lft 318436sec preferred_lft 0sec

When valid_lft = 0 then it's curtains for that address. The default on my computer seems to be to set a valid_lft = 604800 (7 days) that is seven times the preferred_lft = 86400 (24 hours). Not a massive deal but it does mean that after seven days I'd have six or seven deprecated ULA addresses hanging around per interface, and eventually another six or seven deprecated global unicast addresses per interface too, assuming privacy extensions are enabled. Messy.

I know, I know, I can disable ULA if I want to. But I don't want to. So that's that solved.

There is a max_addresses parameter (default 16). I tried to find out if the system would remove the old deprecated addresses or report a failure when this limit is reached, but the bloody stupid thing gave up long before I got near this limit and removed all deprecated addresses far too early, and refused to create more ULAs.. I may visit this again sometime. Of course with this default of 16 I could easily exceed this limit assuming two routers with two global IPv6 addresses are reachable via one NIC, and ULA is enabled - easily achievable using fibre and LTE on one router, for example.

RFC 4862 talks about how deprecated and invalid addresses should be treated but doesn't mention when the node should simply drop the address altogether. It makes sense for an operating system to simply rid itself of the burden as soon as the address has expired.

You may now enjoy the crab paste and put the plastic carrot to good use.

For reference (at time of writing):

valid_lft and preferred_lft can be set/queried in Linux at /proc/sys/net/ipv6/conf/default/temp_valid_lft and /proc/sys/net/ipv6/conf/default/temp_preferred_lft, respectively:

$ cat /proc/sys/net/ipv6/conf/default/temp_*
86400
604800

Roku / Now TV hidden menus

Bit Rate Override
Home x5, Rewind x3, Fast Forward x2

Channel Info
Home x3, Up x2, Left, Right, Left, Right, Left

Developer Settings
Home x3, Up x2, Right, Left, Right, Left, Right

Platform/Wi-Fi Secret Screen
Home x5, Fast Forward, Play, Rewind, Play, Fast Forward

Reboot
Home x5, Up x1, Rewind x2, Fast Forward x2

Secret Screen
Home x5, Fast Forward x3, Rewind x2

Throttling CPU usage with Linux cgroups

There are a number of reasons you may want to throttle rather than limit a process's CPU usage on your system. One very good reason is to keep the CPU temperature down or to simply reduce the amount of energy a certain process uses.

Limiting versus throttling

The term "limit" is nearly always used where throttling is actually required. A good example of why the two are not interchangeable would be the current ISP industry:

Example 1: Sally signs up for super fast broadband (100 Mbps) but hasn't read the small print: she can only download 10 GB of data before her connection is terminated and she has to wait for the next month before she can continue to use her service. Sally's service is not throttled but it is limited.

Example 2: Tony signs up for a basic package (1 Mbps) as he doesn't need to use the Internet a great deal. However he had the good sense to use an unlimited package so that he doesn't hit any usage caps. His router syncs at 100 Mbps but he only receives a 1 Mbps service. The ISPs equipment is throttling his service, but not limiting it.

Example 3: Benedict has signed up for some deal without reading any of the details. He receives a 20 Mbps service and is happy with the speeds. Unfortunately for him after downloading 5 GB of data his download rate drops to 1 Mbps. He has limits on his service which has led to it being throttled.

There are many instances where you may wish to both limit and throttle CPU usage. The former is very easy and well documented, the latter not so much.

Xpra failing on localhost

If you know Xpra then you know you can access a "background" X session remotely. It's reasonable to assume that you may also want to access it locally from time to time.

On Ubuntu Precise I was finding that attempting to access the local session failed silently. I have been using:

$ xpra attach -z0 ssh:user@localhost:99

This produces no output. The server log isn't very forthcoming either:

New connection received
Handshake complete; enabling connection
encoding set to rgb24, client supports ['rgb24', 'jpeg', 'png'], server supports ['rgb24', 'jpeg', 'png']
Unhandled error while processing packet from peer
Traceback (most recent call last):
  File "/usr/lib/xpra/xpra/protocol.py", line 338, in _process_packet
    self._process_packet_cb(self, decoded)
  File "/usr/lib/xpra/xpra/server.py", line 1957, in process_packet
    self._packet_handlers[packet_type](self, proto, packet)
  File "/usr/lib/xpra/xpra/server.py", line 1371, in _process_hello
    f = open(mmap_file, "r+b")
IOError: [Errno 13] Permission denied: '/tmp/xpra.QGv7UA.mmap'
connection lost: empty marker in read queue
Connection lost

The clue is in the .mmap. The server needs to be started with the --no-mmap option.

From the man page:

       --no-mmap
              Disables memory mapped pixel data transfer.  By default it is normally  enabled  automatically
              if  the  server  and  the client reside on the same filesystem namespace.

All good!

Installing Wine on Ubuntu Saucy

This is a very short post because it is very simple, if not immediately obvious.

Symptom:

You are trying to install or build Wine from either the official Ubuntu repositories or from the PPA and are constantly receiving dependency errors.

Cause:

Multiarch is supposedly working on Ubuntu now so you should see everything work! You won't.

Solution:

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo install wine

Apt will now pull the FULL dependency list. The same is true for apt-get build-dep.

Resetting the Rhythmbox music database

Months and months and months ago my Rhythmbox decided that it needed to duplicate its database. Every song was repeated. The result being if I put an album on, I got the bloody song played twice.

At the time I searched and searched and searched for a solution, and then I gave up. All I could find was the usual utter bollocks from people who have no idea what they're talking about. Warnings about how removing the music database will leave the whole application in an unusable state. What a load of crap. I gave up because I couldn't be arsed with this chew. Well, it's annoying me again.

Logically: a new user running Rhythmbox doesn't have a music database; it has to be created. Therefore I should be able to remove the database and a new one will be created.

Solution:

 $ mv ~/.local/share/rhythmbox/rhythmdb.xml ~/.local/share/rhythmbox/rhythmdb.xml.old

Easy!!!
















Predictably, the new database is half the size of the old one.


My profile on StackExchange