Feb 092019
 

One of the things that irritates me about fancy new service management systems like systemd is that unless you get everything exactly right, you can end up with things interfering with specific configuration files – specifically /etc/resolv.conf.

Now as a DNS administrator, I have a certain fondness for manually controlling /etc/resolv.conf and it does actually come in useful for making temporary changes to test specific DNS servers and the like. The trouble comes when something else wants to control that file.

The ideal fix for this conflict is to have things like systemd control a separate file such as /etc/system/resolv.conf.systemd, and for /etc/resolv.conf be installed as a symbolic link pointing at the real file.

But back in the real world, if you do disable systemd-resolver which can be done with: systemctl disable systemd-resolved.service; systemctl stop systemd-resolved.service

Then you may also want to make the file immutable: chattr +i /etc/resolv.conf. On at least one server, systemd merrily re-created /etc/resolv.conf as a symbolic link to an empty file despite systemd-resolved being disabled.

Corner Of The Pyramid
Jan 252019
 

If you are using the right kind of terminal that supports graphics inline (such as KiTTY), then you can write simple (or complex) tools that insert images into the terminal.

Being able to display the flag of a country (if you know its two-letter ISO code) is kind of trivial but useful if you need it.

And a shell function to do that is remarkably simple :-

function flag {
    wget -o /dev/null -O /var/tmp/flag.$$ http://flagpedia.net/data/flags/normal/${1}.png
    if [ $? -eq 0 ]
    then
        kitty +kitten icat /var/tmp/flag.$$ && rm /var/tmp/flag.$$
    else
        echo Not found
    fi
}

(that’s a Zsh function which may require adaption to Bash).

Jan 152019
 

Now that the click-bait is out of the way, vi movement keys are perfectly reasonable particularly to those who have been using them for decades (which includes me). But for ages, vi itself has supported the arrow keys for movement as well as the tradition cursor movement keys.

For the benefit of those who have not used vi and are wondering what those traditional cursor movement keys are, they are H (left), J (down), K (up), L (right). A bit like the gamer’s set of movement keys – W, A, S, and D, except that the vi movement keys pre-date arrow keys.

There are those who will claim that the traditional movement keys are more efficient as they require less hand movement. And they are. So it is perfectly understandable that many tiling window managers and other keyboard-centric software uses these movement keys.

But someone who hasn’t spend decades hard-wiring the vi movement keys into their brain, will find vi-style key bindings inscrutable. And the fix? Just use the arrow keys as well.

There is no harm in having two key sequences do the same thing; no harm in emphasising that the arrow keys work too. And indeed no harm encouraging the use of vi-style movement keys by emphasising their efficiency.

Don’t forget that someone learning a new tiling window manager (or most other things) can be put off by the silliest of things – such as inscrutable control keys.

Rusty Handrail
Sep 102018
 

If you have not heard, Steam have added a compatibility layer to Steam which allows a limited number of Windows games to run. The “compatibility layer” is in fact a fork of WINE called Proton.

Peered at from 500 metres away, Proton allows Windows software to run (or not infrequently crash and burn) by translating the Win32 API into Linux APIs, and translating the variety of graphics APIs into Vulkan. That is a really difficult thing to do.

I have taken a very quick look at the new Steam client (and “Proton” is no longer part of a beta release of the Steam client – it’s in the standard client). It works perfectly adequately, although you will have variable experiences running Windows software.

For some reason this news has captured the imagination of a number of ‘tubers who are more gamers than Linux users, which has lead to some misunderstanding :-

  1. This is not Linux gaming; it is Windows gaming under Linux. If you have a bad experience with Steam under Linux, you are not experiencing a bad time with Linux gaming. Linux gaming involves native Linux software, and yes there is some out there.
  2. Problems with Steam could well be down to the Proton compatibility layer with unsupported API calls or buggy usage of the Win32 API which relies on Windows behaving in a certain way for undefined parameters.
  3. In addition problems with Steam could be due to the hardware you are running; take a game that works perfectly fine with an Nvidia card. It may behave problematically with an AMD card or even a different Nvidia card. Or the other way around.

The important thing to remember when looking at videos about Steam is that the person looking at Steam may not be the most experienced Linux user out there. That is not necessarily bad – the whole purpose of Steam is to be able to run games easily without a whole lot of Linux experience.

But they may not be understanding properly what is going on – for example the first thing I would do as a professional game-orientated ‘tuber would be to try out a selection of games with an nvidia card, and then repeat using an AMD card – just to see if things work better, worse, or at least differently.

And again, this is not about Linux gaming but about allowing easy access to old Windows titles that someone may have bought in the past. 

Pentland Hills
Sep 082018
 

Having used Linux for well over 20 years (yes it is that old), and Unix before that, I’m often puzzled by how scary some people seem to find Linux. Why should it be scary? It’s just a computer – you’re the human in charge of it.

Yes There Are Gooeys

(graphical user interfaces – GUIs – gooeys)

Yes there is plenty of software with a graphical user interface – I use plenty on a daily basis including a standard web browser, an email client, a password manager, an office package.

On a slightly less frequent basis there are many more that I use. Indeed providing that you accept the use of alternatives, you can find Linux software to do just about anything.

But Don’t Ignore The Command-Line

Yes, Linux has a command-line, and for those of us familiar with it, it can be very powerful. And there is no harm in learning how to use the command-line just to the point where you can follow instructions on how to “get something done” there.

Because if I have a fix for some niggle that you are having, it is easier and less error-prone to pass instructions for a command-line incantation than instructions for a gooey (and yes I have done both).

The Birds