Tag Archives: Linux

Running Arbitrary Script on Multiple Login Attempts (Linux)

It so happens that someone was having trouble writing a login script to run after failed attempts. And they needed not only a login script but one to run after some number of failed login attempts and do commit some arbitrary actions.

You could do that with fail2ban, sure. But in this case there’s already a native way to handle it without going outside most standard Linux installs. Because the authentication layer is handled by PAM.d

Continue reading Running Arbitrary Script on Multiple Login Attempts (Linux)

Disable Middle Click to Close in XFCE4-Terminal

If you’ve used XFCE4 Terminal as a terminal emulator on the desktop you may have noticed an odd behavior. Every so often a tab will inexplicably close while you’re using it or floating the mouse pointer by it on the desktop.

As it turns out this is a middle mouse button click to close. In my case it happens when I’m using the track pad. Or not using the track pad, as the case may be, and instead nailing it with my palms while typing.

At one point the setting was stored in ~/.config/Terminal/terminalrc and on some older installations this may still be the case. On the current (through updates) Ubuntu install that I’m running it’s located in ~/.config/xfce4/terminal/terminalrc and in either case the option in question is MiscTabCloseMiddleClick=TRUE which needs to be changed to MiscTabCloseMiddleClick=FALSE

Hopefully this will save you from the headache of having your work or connection unexpectedly disappear!

Fixing WebCollage Screensaver Headers.pm “Use of uninitialized value $vals” error

Tired of getting errors scrolling down the screen in the WebCollage Linux screensaver? So was I.

WebCollage (here’s the link to the .deb on Ubuntu), for a bit of background, is a nice Xorg screensaver for Linux that displays a random collage of images fetched from various search systems on the Internet and popped up in an array as a screensaver. It gives you a weird and occasionally surreal collage that I always find interesting.

Reading the error stating an unset variable “$vals” was to blame for the for thousandth time I decided to take action. The perl file Headers.pm, located somewhere on the file system, was calling an array that didn’t fetch anything leading to the following.

As it turns out, there is an unset variable “$vals” on line 264 and 268 of the Perl file Headers.pm (/usr/share/perl5/HTTP/Headers.pm on my Debian system). There are multiple ways to fix this error. I’m just going to check to see if it’s defined before referencing. Here’s my changes to line 264 on:

#if (index($vals, "\n") >= 0 ) {
if (defined $vals) {
$vals = _process_newline($vals, $endl);
if (defined $vals){
push @result, $field . ': ' . $vals;