The Agile Methodology in Project management.

The agile methodology is a project management approach that emphasizes flexibility, collaboration, and iterative development. This methodology is characterized by a series of short, iterative…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Capture your users attention with style

Do you manage UNIX machines that are logged into by multiple users? If so, this scenario will be familiar to you: you need to communicate something to your users — a maintenance window, modifications following an update, a policy change, etc, etc.

What do you do? One of these:

At this point, you may be wondering “So? What’s wrong with that?!”.
Well, I’ll tell you…

Let’s start with `/etc/motd` (short for Message Of The Day). For those who do not know, it is a text file whose contents are outputted upon user login. It’s a straightforward, elegant mechanism. Alas, it was created in simpler times, when people actually read stuff and you were allowed to respond with “RTFM!” and laugh at them when they didn’t (I miss these days! but I also miss Perl and there’s nothing one can do about either— times changed).
Today, many distros output so many messages upon login by default (and admins do not bother editing these or the scripts that generate them) that users actually train their minds to pointedly ignore them.

As to `wall`, it’s a util that outputs a given string to the tty (or, more commonly the pts), of all logged-in users. Again, it suffers from the same problem: if a user is happily typing away commands or tailing some log file, he or she may not notice the message at all.

I deliberated whether I should even have to explain why emailing about such things is bad and decided that I should, providing that I can keep it short:
Basically, in the case of policy changes or post upgrade updates, people tend to ignore the notification altogether, even if they did notice it; as to maintenance windows, you can make the message sound important enough by including “ATTENTION” or “MUST READ” (or words to that effect) in your subject line but the question is: when to send this? If you send it ahead of time, people forget all about it by the time it takes place. If you send it just before, people may not see it as no one reads emails anymore (except for me — I love emails). So, after being burnt a few times, you end up sending it several times which is annoying to do but, even more annoyingly — STILL not enough.

Okay, now that I got your attention (well, one would hope), what is my proposed solution?

It’s pretty self explanatory once you run it but I’ll elaborate a bit anyway. (I’m told the most read Medium posts are estimated at around 7 minutes read time so I reckon I’ve got a few paragraphs to spare).

To illustrate, here’s what it outputted to the terminal when invoked with:

That would be kind of hard to ignore, right?

As to an alternative for /etc/motd, how about some custom code in `/etc/bash.bashrc` (or the equivalent in your interactive shell, BASH isn’t for everyone)?

For example, I’ve added this to `/etc/bash.bashrc` (`zsh` and friends are nice but I like my BASH):

And, here’s the result:

Nice, eh? Let’s see them say they didn’t see that one:)

Both toilet and lolcat support multiple flags so it’s worth glancing at their respective man pages. For toilet, I am using the future font file by passing “-f future.tlf” but if you don’t like it, there are plenty others to choose from.

I installed both from Debian’s official repos and as a result, the fonts reside under `/usr/share/figlet`, the location on your box may vary.

Lastly, another awesome use of these utils is generating captivating headers from the comfort of your shell:) I used it to generate the hero image for this post (far faster and easier than any presentation/animation tool I’ve ever worked with).

Happy hacking to all!

Add a comment

Related posts:

Valentina Milanova of Daye On 5 Things We Need To Do To Close The VC Gender and Racial Gap

As part of my series about “the five things we need to do to close the VC gender and racial gap” I had the pleasure of interviewing Valentina Milanova. Valentina Milanova, Founder of Daye, a…

INTRODUCTION TO PYTHON

Python is a widely used general-purpose, high level programming language. It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was designed with an…

The Path Well Trodden

The claws were deep and my heart bled. Distant echoes that I think I hear; Repeating in each place, each time. Like a horrible, unfinished pattern on a quilt made over years. I couldn’t go then…