Sep 202017
 

By default, the Awesome window manager sets up 9 tags and uses a rather clever method for setting keyboard shortcuts for those tags.

And that is also one of the irritations of using Awesome because I have gotten into the habit of using more virtual screens (“tags”) than this. After a dumb way of increasing the number, I have come up with a rather improved method that can be used to replace the existing method in the Awesome rc.lua file :-

local taglist = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=" }
-- The list of tags that I use.
…
 awful.tag( taglist, s, awful.layout.layouts[1])
…
for i = 1, #taglist do
  globalkeys = awful.util.table.join(globalkeys,
    awful.key({ modkey}, taglist[i],
                  function ()
                        local screen = awful.screen.focused()
                        local tag = screen.tags[i]
                        if tag then
                           tag:view_only()
                        end
                  end,
                  {description = "view tag", group = "tag"}),
        awful.key({ modkey, "Control" }, taglist[i],
                  function ()
                      local screen = awful.screen.focused()
                      local tag = screen.tags[i]
                      if tag then
                         awful.tag.viewtoggle(tag)
                      end
                  end,
                  {description = "toggle tag", group = "tag"}),
        awful.key({ modkey, "Shift" }, taglist[i],
                  function ()
                      if client.focus then
                          local tag = client.focus.screen.tags[i]
                          if tag then
                              client.focus:move_to_tag(tag)
                          end
                     end
                  end,
                  {description = "move focused client to tag", group = "tag"}),
        awful.key({ modkey, "Control", "Shift" }, taglist[i],
                  function ()
                      if client.focus then
                          local tag = client.focus.screen.tags[i]
                          if tag then
                              client.focus:toggle_tag(tag)
                          end
                      end
                  end,
                  {description = "toggle focused client on tag", group = "tag"})
    )
end

That’s three different parts of the code to change – a list of tags to use at the top of the file, a replacement somewhere in the middle, and a large chunk replacing existing code at the end of the keyboard configuration. I don’t claim this is better than the standard way, but it is handy for me.

The Window

Sep 162017
 

My Facebook news feed came up with a post with this embedded within it :-

Now I’m not in the business of telling someone they should own a smartphone, but taking some of the objections in turn …

Firstly if you are letting your smartphone boss you around and letting it overwhelm you, you’re using it wrong. You decide when to use your smartphone as a communications tool; most of those messages and emails that your phone is constantly pinging and burbling to you about can wait until it is convenient for you to answer.

Do any of your friends get annoyed when you don’t respond to their messages within seconds? Tell them to grow up and get a life.

To give you an idea of how I use my smartphone, here’s a typical day :-

  1. The phone is charging downstairs in the front room where it has been since the evening. If it is ringing, bleeping, throbbing, burbling madly, I won’t know until I’ve finished getting up.
  2. If I am curious about the reaction to some photos I posted the previous night I might pick it up and take a quick look at the notifications, or I might not.
  3. As I head out the door for work, I’ll pick it up and put it straight into my pocket. On the way into work I might hear phone calls, or I might not.
  4. may as I approach work, pull out the phone and take a quick look at the agenda screen (particularly if I recall an early meeting).
  5. If I remember, I’ll switch the phone to silent before I sit down to work. If not, and the notifications get annoying, I’ll remember then.
  6. If I get a phonecall whilst I’m working, I’ll pull out the phone, check who is calling, and slide to red (to reject the phonecall) if I don’t recognise the caller.
  7. When I take a break from work, and I’m not chatting to anyone, I’ll pull out the phone and have a quick look at Facebook, home email, etc.
  8. When I head home from work. the phone stays in my pocket. I’ll check the phone on getting home to see if I missed anything.

You might be wondering why I have a smartphone given I use it so little. Well first of all I do use it more than is implied here – particularly whilst travelling (having train timetables and maps in your pocket is really handy).

In terms of ethical production, not all smartphones are the same. There are even places which score phones based on the ethics of their production; there is even a smartphone whose whole purpose in existence is to be an ethically produced phone – the Fairphone.

So giving up your smartphone is the lazy way of ensuring you have an ethically produced phone that you don’t get bossed around by. No harm in being lazy here of course!

Sep 092017
 

I recently switched from Ubuntu to Fedora Core for a variety of reasons :-

  • For a later version of fwupd as I had some vulnerable wireless mice to update.
  • To have a look at what Wayland was like (mostly invisible although oddball Window Managers still only talk to X).
  • To have a look at what it’s like after all these years; RedHat was one of the early distributions I ran.

All is reasonable except for one thing. The software updates.

What is this obsession with restarting to perform software updates? Is the relevant developer a refugee from Windows?

Now don’t get me wrong; a restart is the most effective simple way to ensure that outdated versions are not in use, but restarting every time you perform an update seems excessive.

  • If you need to update the kernel for security reasons, a restart is reasonable if you don’t have “live upgrades” but Fedora Core comes with a kernel that has that feature.
  • If you have a security update to a long-running process (such as Wayland or X), then you need to restart that process. In some cases you can restart a long-running process without notice; in others you will have to be disruptive, or ask someone to quit the long-running process.
  • If it isn’t a security update, you can simply wait until the user restarts the process.

Overall, the update process need not be as disruptive as Fedora Core makes it. It is of course not the end of the world to force a reboot, but it is hardly a very graceful process and some (including me) will find it annoying enough to avoid Fedora Core.

Post Interference

Aug 272017
 

Every so often, somebody (or organisation) proclaims that this year is the year of Linux on the desktop. Given the number of times this has occurred, you would have thought that the Cassandras of the Linux world would stop trying to predict it. In fact I am not entirely sure what it is supposed to be – everyone using Linux on the desktop, or just some? And if it is just some people, how many?

It is essentially nonsense – if you use Linux on the desktop, every year is the year of Linux on the desktop; and if you do not, it isn’t.

Assuming you are someone who has more than two brain cells to rub together and are prepared to do some learning, it is perfectly possible to run Linux on the desktop. You can do pretty much everything with Linux that you can do with Windows. In fact the one area that Linux is traditionally weak – upgrading firmware of third party devices (such as media players, wireless mice – is beginning to change with LVMS and fwupd.

To give an example, I was recently upgrading some Logitech wireless mice to eliminate a serious security flaw, and I tried with Windows, OSX, and finally Linux. Both the Windows and OSX methods failed, whereas the Linux method just worked.

In fact even if the Windows method had worked, it would have been a lot more complex. I had to download the Logitech software (admittedly this step would probably be unnecessary if I was used to using the wireless mouse under Windows), know that a firmware upgrade was necessary, download the firmware upgrade, and finally load it into the upgrade tool.

Under Linux? Assuming I had been using some gooey tool like GNOME Software, it would have notified me that an upgrade was available and after a request would have upgraded it for me. I (of course) chose to do it the geeky way from the command-line, but even so running :-

# fwupmgr refresh
# fwupmgr update

… is a great deal simpler than the Windows way. And that is before you consider that with Windows, you need to download a firmware update tool for every device whereas the Linux way it is just one tool.

Of course in practice, the Linux method only works for a handful of devices – of the innumerable Linux machines I run only one has available updates for the desktop computer’s firmware (the Dell at work), and of the peripheral (or not so peripheral) devices only a tiny handful can be upgraded today.

But it is not inconceivable that in the not too distant future, the sensible way to upgrade the firmware of various devices will be to install Linux, and let it do it for you. Particularly if device manufacturers realise that by adopting Linux as the firmware upgrade delivery method, they can save time and effort.

“But I know Windows” – actually you know Windows 7, or Windows XP, or Windows 10; each of which is very different from each other. And whilst Linux has even more variability at first glance, there is actually more commonality between different versions of Linux. Or in other words, the effort of learning Linux in the first place is rewarded by less of a need to completely re-educate yourself every time you upgrade.

This is not intended as encouragement for you to switch to Linux (although if you are involved in IT you should at least be familiar with Linux), but intended as a criticism of the concept of a year of the Linux desktop. It isn’t useful, and what is worse it leads to the false impression of failure – if everyone is not using Linux on the desktop, then Linux has failed.

Linux on the desktop has not failed because I use it on the desktop.

Aug 262017
 

No. The title is just click-bait (which won’t accomplish much).

AMD Ryzen was interesting because it restored AMD’s competitiveness as compared to Intel for the non-enthusiast processor for desktops and laptops. Whereas AMD’s Epyc was interesting because it restored AMD’s competitiveness in the data centre. Both are good things because Intel has been rather slow at improving their processor over the last few years – enough that people are taking a serious look at a non-compatible architecture (the ARM which is found in your smartphone) in the data centre.

Threadripper itself is of interest to a relatively small number of people – those after a workstation-class processor to handle highly threaded workloads. A market that was previous catered to by the Xeon processor, so although Threadripper looks expensive, it is in fact pretty cheap in comparison to Xeon processors. So ‘scientific’ workstations should become cheaper.

And the significant advantage they have with I/O (64 PCIe lanes as opposed to a maximum of 44 for the X299 platform would be useful for certain jobs. Such as medium-sized storage servers with lots of NVMe caching, or graphics-heavy display servers (room sized virtual reality?).

But for gamers? Not so much. Almost no games use lots of threads (although it would be useful to change this), so the main use the extra power of Threadripper will only get used by other things that gamers do. Perhaps game streaming and/or using the unused power to run virtualised storage servers.