Thursday 31 May 2018

Popularity of Firefox extensions

One of the many nice things about the Firefox Add-on store is that it allows browsing the add-ons in order of popularity, expressed as the number of users who, I suppose, use the add-ons.

When we look at the most popular extensions we notice that, unsurprisingly, that it looks like a power law, with a handful of extremely popular extensions and a long tail of interesting but as yet unpopular ones.

Popularity of the most popular Firefox extensions, as of May 2018.

The six most popular extensions are Adblock Plus, uBlock Origin, Video DownloadHelper, Easy Screenshot, Cisco WebEx and Ghostery:
  • Adblock Plus (12.1 million users) and uBlock Origin (4.9 million users) are worthy ad-blockers. That Adblock Plus has more than two times the number of users of uBlock Origin is a compelling testimony as to the importance of coming first. Or possibly it may be that the purely functional user interface of uBlock Origin is deterring some users.
  • Then comes Video DownloadHelper, a utility to extract, convert and save videos from web sites, including the mighty YouTube. 3.3 million users find it useful.
  • In the fourth place is Easy Screenshot, a tool to get a screenshot of the entire web page. Two and a half million users have it. Why they have it is a mystery, since the functionality to get a screenshot of the entire web page is built into Firefox.
  • Cisco WebEx sits on the fifth place, with 1.6 million users. It is highly likley that those are people who work for corporations which use Cisco WebEx for their virtual meeting needs.
  • The admirably duplicitous Ghostery is sixth, with 1.1 million users. "Ghostery blocks marketing companies from gathering website user information, but it makes money from selling page visit, blocking, and advertising statistics to corporations globally, including corporations that are actively engaged in collecting user information to target ads and other marketing messages to consumers", says Wikipedia.

Fenestral incantations

  • Microsoft Edge cannot load favicons from localhost, regardless of the server name, unless in an elevated PowerShell:
    CheckNetIsolation LoopbackExempt `
    -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
    See "Favicon not working on Edge" on Stack Overflow.
    Bruce Payette and Richard Siddaway, Windows PowerShell in Action, 3rd edition, Manning, 2017, ISBN 9781633430297.
  • How to find domain controllers:
    C> nslookup -type=srv _ldap._tcp.dc._msdcs. | find /i "svr hostname"
  • Open the Credential Manager on Windows 10:
    C> rundll32.exe keymgr.dll, KRShowKeyMgr
  • Windows and Office activation status:
    C> slmgr /dlv
    C> slmgr /xpr
    C> cd /d "C:\Program Files\Microsoft Office\Office15" & :: 16, 17, ...
    C> cscript ospp.vbs /dstatus
    C> cscript ospp.vbs /act

Tuesday 8 May 2018

How to add new wallpapers in GNOME

As we all know, Canonical has decided to throw away its signature desktop, and to adopt GNOME. Maybe they were tired, maybe they could no longer afford to develope and maintain Unity; it doesn’t really matter why: for the current Long Term Support version of Ubuntu uses the GNOME desktop. “An easy and elegant way to use your computer, GNOME 3 is designed to put you in control and get things done”, say its developers. They really do.

Today we’ll consider a complicated task, one which is but rarely attempted by users who don’t do computers as their day job, namely adding several wallpapers, so that they appear in the Background selection list alongside those which came preinstalled. How hard could this be?

Lesser desktop environments, such as the late lamented Unity, or even the inimical Windows 10, have this complicated feature, where any picture on the hard disk can be selected and used as desktop wallpaper. But GNOME is an advanced desktop, “an easy and elegant way to use the computer”.

The official way

The official way to add a bunch of pictures to the list of wallpapers from which the user can choose is to create an XML file listing them. The name of the file doesn’t matter; but it must be placed in one of three directories:
  • /usr/share/gnome-background-properties/
  • /usr/local/share/gnome-background-properties/
  • ~/.local/share/gnome-background-properties/
The file must have the following syntax, or schema:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper>
    <name>Human Readable Name (Never Shown by GNOME)</name>
    <filename>/full/absolute/path/to/the/picture/filename.ext</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
  ·
  ·
  ·
</wallpapers>

The unofficial way

For those users who feel that the official GNOME “easy and elegant way” to add some wallpapers to the default list is a bit too enterprisey, the curious and enterprising people at OMG! Ubuntu! have found an unofficial but much simpler solution:
  1. Create a directory named ~/.cache/gnome-control-center/backgrounds.
  2. Copy your wallpapers in there.
That’s it. However, this is not the official way, and stuff may happen to data stored in a subtree named .cache. Caveat utens.

Desert

For desert, here are five abstract wallpapers which anybody can use as wallpapers. Four of them are almost monochrome pixellations, and the fifth is a nice smooth gradient in Ubuntian colors; the difference between the last two pictures is simply that one is rendered at 3440×1440 and the other at 2880×1200.
 
 
 
(Pictures available on Flickr under the Creative Commons Attribution license.)

Saturday 5 May 2018

Ubuntu 18.04: Replace snapped apps with their real selves

It all started with the System Monitor. The GNOME System Monitor is supposed to be able to show all the processes running on the system, and to show them in the form of a nice tree of parent-child relationships. But the System Monitor variant installed by default in Ubuntu 18.04 subbornly insisted on showing only my processes, and was utterly unable to show the parent-child relationships between them. It was also unable to distinguish between real filesystems and the forest of virtual filesystems mounted on any modern Linux system, which made the File Systems tab rather useless.

This was unacceptable.

A quick investigation resulted in a shocking conclusion: the preinstalled System Monitor was not a native application; it was a snap. Now I fully agree that snaps may well have their uses, although I’m not sure what those may be. But there is simply no way for System Monitor to do its job if it runs in a sandbox or a container; the hint is in the name: it’s a System Monitor.

Which made me consider than what should be done on server should also be done on workstations, and that is removing snapd. A quick dry-run test showed that removing it was allowed:
$ sudo apt-get --dry-run purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  gnome-software-plugin-snap* snapd*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Taking heart from this test, I went ahead and removed snapd:
$ sudo apt-get --yes purge snapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gnome-software-plugin-snap* snapd*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 57.1 MB disk space will be freed.
(Reading database ... 115119 files and directories currently installed.)
Removing gnome-software-plugin-snap (3.28.1-0ubuntu4) ...
Removing snapd (2.32.5+18.04) ...
⁞
Removing snap core and revision 4486
⁞
Removing snap gnome-3-26-1604 and revision 59
⁞
Removing snap gnome-calculator and revision 154
⁞
Removing snap gnome-characters and revision 69
⁞
Removing snap gnome-logs and revision 25
⁞
Removing snap gnome-system-monitor and revision 36
⁞
Final directory cleanup
Discarding preserved snap namespaces
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
So it’s plain to see that not less than four pre-installed applications came in the form of snaps; fortunately, it was easy to get them back in the form of fully-fledged native packages:
for app in calculator characters logs system-monitor; do
  sudo apt-get --yes --no-install-recommends install gnome-$app
done
Ah, and speaking of GNOME Characters: this is a mostly useless application intended for browsing the ever entertaining emojis in the available fonts; it is definitely not the same thing as the plain old boring and very useful character map, which, for reasons known only by the GNOME steering committee and Canonical, does not come preinstalled. To get it you must install it:
sudo apt-get --yes --no-install-recommends install gucharmap

Friday 4 May 2018

Ubuntian colors

The default wallpaper shipped with Ubuntu 18.04 can be of course copied from any Ubuntu 18.04 installation, or downloaded from the ever helpful OMG! Ubuntu! By judiciously dividing the wallpaper into squares and averaging the colors in those squares one can compute specific values for the orange and mauve favored by this version of the operating system:


          #DD4814 Ubuntian orange as used by Ubuntu.com
          #E74D0D Ubuntian orange from the default wallpaper in 18.04
          #670545 Ubuntian mauve from the default wallpaper in 18.04
          #52023C Dark Ubuntian mauve from the default wallpaper in 18.04