My website have a new address

I have finally gotten around to migrate my website to the new adress. The new one is hund.tty1.se. If you follow this website using my webfeed, don’t forget to update it to the new one: https://hund.tty1.se/feed.xml.

The old address (hunden.linuxkompis.se) was always a cheap solution. This is because my first website was my Swedish website, located at hund.linuxkompis.se (which is still around, but currently not that active). When I started my English website, I wanted a good address for it, but all good ones are already taken, so I decided to reuse the linuxkompis.se domain that I already have.

The name “Hunden” was a rather bad pun with the words “Hund” and “En” (Short for English). The word “hunden” is actually a Swedish word and it translates to “the hund”. I was probably the only person who even got that joke.

When it turned out that I still owned the old domain tty1.se, I decided to reactivate it and use it for my English website. I hope you like the new address as much as I do!

Notes on keyboard configuration in X Windows: Keyboard layout, Modifier Key and Compose Key

Fitzcarraldo
, 23/03/2021 | Source: Fitzcarraldo's Blog

Before I dive into X Windows, I need to mention Miguel Farah’s excellent and comprehensive Web pages on keyboard layouts and standards: http://www.farah.cl/Keyboardery/ There are umpteen articles, blog and forum posts available on the Web covering keyboard configuration for X Windows, but my notes below may be of help to someone. I briefly cover keyboard […]

Forecast - A simple Bash script for the weather service Yr.no

Some time ago, my rather old (zsh!) script for checking the current weather from the weather service Yr.no broke, after some looking around I found a new alternative called Forecast.

The script is written in Bash, and it’s pretty straightforward. It requires bash, curl and xsltproc.

This is the syntax for how you show the current weather:

$ forecast.sh -l "Sweden/Stockholm/Stockholm"
Stockholm, Sweden
Sunrise: 05:40  Sunset: 18:09
Forecast:
From 2021-03-23 10:00 to 12:00
Outlook: Clear sky 8°C
Wind: Light breeze 3.0 m/s W
Precipitation: 0 mm
Pressure: 1014.9 hPa

There are two flags available -l and -o. The -l flag is for location and the location itself is formated like Country/State/City. The -o flag is for offset, and the following time periods are available:

There are two flags available:

-l <Country/State/City> Let’s you set the location.
-o <N> Let’s you (optionally) set the time period.

The following time periods are available:

  • 23:30-05:30
  • 05:30-11:30
  • 11:30-17:30
  • 17:30-23:30.

Period-offset of 0 (default) gives the forecast for the current period. A value of 1 gives the forecast for the next period and so on.

Using it with Polybar

I mainly use it with Polybar to show the current weather like this:

A screenshort of my Polybar setup with Forecast.

Since the weather doesn’t change that often, I have chosen to use a cron job that runs once every hour and saves the data to a file that Polybar then reads.

The cron job looks like this:

forecast.sh -l "Sweden/Uppsala/Örbyhus" -p 0 | grep "Outlook" | sed 's/Outlook: //'

And the command for Polybar looks like this:

[module/weather]
inherit = script/defaults
exec = cat /tmp/weather.log
format-prefix = " "
format-prefix-foreground = ${colors.blue}

Installing Linux on an old Motorola Xoom tablet

Fitzcarraldo
, 19/03/2021 | Source: Fitzcarraldo's Blog

Back in March 2012 I bought a Motorola Xoom Android tablet (Model MZ604 UK), when tablets were going to be the next big thing. It was available in two versions: 3G and Wi-Fi, and it was the latter version I purchased. When it was released in early 2011 the Xoom was state-of-the-art with its NVIDIA […]

How to patch kde-plasma/plasma-firewall-5.21.2 for UFW in Gentoo Linux with OpenRC

Fitzcarraldo
, 15/03/2021 | Source: Fitzcarraldo's Blog

Unfortunately plasma-firewall-5.21.2, a new Plasma frontend for firewalld and UFW, has been written only for Linux installations with systemd. However, I use OpenRC and syslog-ng in Gentoo Linux and wanted to try to get plasma-firewall to work on my laptop which uses UFW. I therefore set about patching plasma-firewall-5.21.2. I did not touch the firewalld […]

Recreating missing WINE menu entries and Desktop Configuration Files in Lubuntu 20.10

Fitzcarraldo
, 11/03/2021 | Source: Fitzcarraldo's Blog

I use a few Windows applications I installed via WINE in my user account on my family’s desktop machine running Lubuntu 20.10 (LXQt Desktop Environment). A few days ago I logged in and found that the icons for the Windows applications had disappeared from my Desktop, and the ‘Wine’ entry in the LXQt applications menu […]

Removing qtwebengine from a Gentoo Linux installation

Fitzcarraldo
, 09/03/2021 | Source: Fitzcarraldo's Blog

At the beginning of March I updated the world set in Gentoo Testing (~amd64) running the KDE suite (Plasma, Frameworks and Applications) on my secondary laptop, an eleven-year-old Compal NBLB2. It has a first-generation Core i7 CPU and the maximum amount of RAM that can be installed in that model (8 GB). root # uname […]

Using NetworkManager in Gentoo Linux

Fitzcarraldo
, 04/03/2021 | Source: Fitzcarraldo's Blog

My current two laptops running Gentoo Linux (both with OpenRC, elogind, eudev and wpa_supplicant) use NetworkManager rather than Netifrc. (Actually, my desktop machines also use NetworkManager even though they are always connected to the same network.) NetworkManager has worked with wired and wireless networking on these laptops without any issues for over five years now. […]

Enabling other users to login from the xscreensaver lockscreen in Lubuntu 20.10

Fitzcarraldo
, 25/02/2021 | Source: Fitzcarraldo's Blog

If Lubuntu 20.10 suspends to RAM, xscreensaver displays a lockscreen with login window when the system resumes. However, LXQt and SDDM currently do not provide a ‘Switch User’ option, so, if you are not the currently logged-in user and you do not know that user’s password, you will be stuck on the xscreensaver lockscreen. If […]

Coloured manual pages

It’s easy to take a lot of things for granted when you’ve been using them for longer than you can remember. Coloured manual pages is one of those things.

By default, there’s no colours for the manual pages, which can make it more difficult to distinguish parts and sections of the documentation than it has to be.

This is what my manual pages looks like.

If you want to put some colours on your own manual pages; simply add this to your configuration file for your shell:

man() {
    env LESS_TERMCAP_mb=$'\E[01;31m' \
    LESS_TERMCAP_md=$'\E[01;33;5;74m' \
    LESS_TERMCAP_me=$'\E[0m' \
    LESS_TERMCAP_se=$'\E[0m' \
    LESS_TERMCAP_so=$'\E[38;5;246m' \
    LESS_TERMCAP_ue=$'\E[0m' \
    LESS_TERMCAP_us=$'\E[04;39;5;146m' \
    man "$@"
}

If you want to change the colour of the yellow text, you have to change the value 33 on line 3 and if you want to change the cyan colour, you then have to change the value 36 on line 8.

Here are the codes if you haven’t memorised them:

Colour Code
Black 30
Red 31
Green 32
Yellow 33
Blue 34
Purple 35
Cyan 36
Light Gray 37