linux

Debian buster – ntpd[29989]: leapsecond file (‘/usr/share/zoneinfo/leap-seconds.list’): expired less than 4 days ago

This one popped up a couple of days ago posted by logcheck. Key to mitigation was : https://linux.debian.bugs.dist.narkive.com/o89iczpc/bug-962614-ntp-leap-seconds-list-not-updated-and-update-leap-does-not-read-ntp-conf-correctly . So essentailly performing a :

apt update && apt install tzdata

However, on one of my systems, this didn’t succeed, the warning continued to show up. Investigating the tzdata versions then revealed a difference of 2021a-0+deb10u3 against the latest 2021a-0+deb10u5, actually delivering the new leap seconds file. Root cause eventually, the system was missing :

deb http://ftp.de.debian.org/debian buster-updates main

in /etc/apt/sources.list .

Btw, note that /usr/share/zoneinfo/leap-seconds.list didn’t receive any new content, only the time-to-expire and the checksum changed.

Have fun

Set the background color for midnight commander in pre 8 redhat clones

With the version 8 of redhat and clones, alike oracle or centos, you have the new layout option in the configuration to set a theme for your midnight commander appearance. In lower versions however, you need to start mc with selected options or modify ~/.config/mc/ini in that respect. If you’re just fine with the overall color usage but kind of dislike the the bright blue background color of mc on your otherwise more dark themed terminals / desktop, here is the command line or init file directive to apply for file listing (mc) and edit mode (mcedit) views.

command line

init file

And that’s how it might look like with gray3. For other colors in a short overview use mc --help-color , for a more in depth documentation man mc. https://midnight-commander.org/wiki/doc/common/skins may also be helpful.

Have fun

Have the “Oracle Software Delivery Cloud” wget.sh authentication actually work

Downloading from https://edelivery.oracle.com/osdc/faces/SoftwareDelivery offers the option to catch a wget-oriented download script for server side console use.

The script manages the follow up authentication of the server session against Oracle using a re-logon and a cookie file. Nothing fancy, just the web on the console and that much efficient.

Now the funny thing: due to some output channel directives in the script, entering the re-logon credentials will get stuck after the username <enter> input.

The problem is, that the password prompt, although only stderr is redirected, will not find its way to the console but will end up in the download log file :-))

So I recommend to remove this wget call output redirection at all. On top of that, I also opt to remove any wget call output redirections in the file, so you can follow the download progress on the console and log file will stay readable.

Have fun.

Forward the $term variable to debian the xshell-way

Xshell is yet another putty-like terminal client for windows that features a couple of nice extensions. See the net for a multitude of alike “top-10 terminal clients for windows” posts. Among the features, Xshell does not only provide a raw terminal pane but also runs a so called local shell that actually embeds remote shells. In other words, initially (standard configuration) you get your xshell window, running the Xshell shell and offering a number of internal commands to act in the realm of Xshell by means of simple keystrokes. If you’re addicted to the keyboard, like me, this is a very pleasent way to go. For example, see the help output, a list of available sessions (connect profiles already configured) and an open to eventually connect to the remote host:

Anything keyed and, by the way, the session name even tab-expanded after a few characters. Cool, right?

Ok, that much for the preface, important to understand what followes next, the forwarding of a dedicated environment setting, namely TERM=xterm-256color with this terminal client (see why e.g.: https://fedoraproject.org/wiki/Features/256_Color_Terminals#Caveats, see others e.g.: https://codeyarns.github.io/tech/2015-03-18-how-to-set-term-to-xterm-256color.html).

The point is, based on the local shell, Xshell is able to inject/communicate code the the remote shell in an after-login but pre-(final-)prompt fashion. All you need to do is to code a snippet to call some member functions of the current local shell Screen object. Three language binding are possible so far: js, py and vbs. Examples are given in AppData\Local\NetSarang Computer\6\Xshell\Scripts\ScriptSample, documentation resides as https://netsarang.atlassian.net/wiki/spaces/ENSUP/pages/135136512/Using+Scripts . In order to achive the forward, the following code is sufficient (don’t ask my why a sleep is needed here):

def Main():
	xsh.Screen.Synchronous = True  # True or False
	xsh.Screen.Send("export TERM=xterm-256color\r")
	xsh.Session.Sleep(1000)

The file location can be configured in the sessions connect profile dialog like so. Done!

After all, the tiled and full screen view modes are also worth a try. Like it.

Enjoy