How to prevent CUPS omitting the bottom of the CUPS Printer test page

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

This is something that has been bugging me for years but I never bothered to look into it until now. When I set up a printer using CUPS Administration and then print a test page, for some printers the bottom of the test page image is cut off, as shown in the scanned image below. […]

Implementing a quick and easy way to check from the Linux Desktop Environment if the ClamAV signatures database is up-to-date

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

If you use ClamAV with the Freshclam daemon and your Linux installation does not hide the console output during boot, you might see a message similar to the following on the console briefly during boot if the signatures database has not been updated recently: LibClamAV Warning: ************************************************** LibClamAV Warning: *** The virus database is older […]

Using open-plc-utils in Linux with Powerline (HomePlug) adapters

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

According to the open-plc-utils documentation, open-plc-utils supports INT6000, INT6300, INT6400, AR6410, QCA7000, AR7400 and AR7420 and later Powerline products from Qualcomm Atheros. ‘INT’ stands for ‘Intellon’, which was acquired by Atheros in 2009. ‘AR’ stands for ‘Atheros’, which was acquired by Qualcomm in 2011. ‘QCA’ stands for ‘Qualcomm Atheros’. The open-plc-utils command int6k supports legacy […]

Resurrecting my Iomega Zip 100 parallel-port drive – Linux comes to the rescue

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

Back in 1998 I purchased what was then a state-of-the-art storage medium: an external Iomega Zip 100 drive, which used removable 100 MB ‘SuperFloppy’ disks. Until 2002 I backed up my important files on removable Zip 100 MB disks. Over several years in the 1990s Iomega released various models of the Zip 100 MB drive: […]

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 […]