OS Apps: Motivate, LOLCAT, Sniffnet, Xearth, TTE

Published: Aug 1, 2024 by Isaac Johnson

I had a few interesting apps and tools on the list to check out. A few of them, like lolcat, I heard mentioned on the Late Night Linux podcast which is one of my new favourite regular listens.

Today we’ll cover a little motd app “Motivate”, LOLCAT which can bring a bit of colour to our terminal output, Sniffnet for network packet monitoring and for no reason than my old IRIX nostalgia kicked in, let’s look at xearth which really only lived to the early 2000s but back in 1997/98 when I was an intern in a windowless back storeroom at Control Data, I actually used this as my background on my CD Cyber 910 and Indy so I would actually know what time of day it was.

Installation - Motivate

We can clone and install

builder@LuiGi:~/Workspaces$ git clone https://github.com/mubaris/motivate.gi
Cloning into 'motivate.gi'...
remote: Repository not found.
fatal: repository 'https://github.com/mubaris/motivate.gi/' not found
builder@LuiGi:~/Workspaces$ git clone https://github.com/mubaris/motivate.git
Cloning into 'motivate'...
remote: Enumerating objects: 1356, done.
remote: Total 1356 (delta 0), reused 0 (delta 0), pack-reused 1356
Receiving objects: 100% (1356/1356), 776.33 KiB | 2.97 MiB/s, done.
Resolving deltas: 100% (704/704), done.
builder@LuiGi:~/Workspaces$ cd motivate/
builder@LuiGi:~/Workspaces/motivate$ cd motivate/
builder@LuiGi:~/Workspaces/motivate/motivate$ sudo ./install.sh
builder@LuiGi:~/Workspaces/motivate/motivate$ source ~/.bashrc

We can now motivate ourselves with random quotes

/content/images/2024/08/motivate-01.png

We can also get a random quote

$ motivate --no-colors
"Many people will try to Sell you a Dream, its Your place to let them know you Already have one"
                --Kalon Jackson

Installation - LOLCAT

brew install lolcat should do it.

$ brew install lolcat
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
clang-uml        iowow            libgit2@1.7      packetry         tdb              terrahash        terramaid
==> New Casks
avbeam                                  gitkraken-on-premise-serverless         processspy
boosteroid                              ivacy                                   roblox
brightvpn                               jagex                                   robloxstudio
dockdoor                                kando                                   sq-mixpad
duplicateaudiofinder                    longplay                                teamspeak-client@beta
font-genkigothic                        monarch                                 treeviewer
geoda                                   nextcloud-vfs                           twingate

You have 4 outdated formulae installed.

==> Downloading https://ghcr.io/v2/homebrew/core/lolcat/manifests/100.0.1
################################################################################################################# 100.0%
==> Fetching dependencies for lolcat: libyaml, gperf and ruby
==> Downloading https://ghcr.io/v2/homebrew/core/libyaml/manifests/0.2.5
################################################################################################################# 100.0%
==> Fetching libyaml
==> Downloading https://ghcr.io/v2/homebrew/core/libyaml/blobs/sha256:354677a745b6c62109e792ddbd0cbdaf9e6a471d84fdbde3a7
################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gperf/manifests/3.1
################################################################################################################# 100.0%
==> Fetching gperf
==> Downloading https://ghcr.io/v2/homebrew/core/gperf/blobs/sha256:a91b89f648c21ae225074e0a9f4e54154b4f2744cc0a37e8421e
################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.3.4
################################################################################################################# 100.0%
==> Fetching ruby
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/blobs/sha256:6cafaf06f366962038aa196b99e6ad4135eb10bb65df700058818
################################################################################################################# 100.0%
==> Fetching lolcat
==> Downloading https://ghcr.io/v2/homebrew/core/lolcat/blobs/sha256:8110115e78f3bcb1aca5f3aee73cb81726e59a1293236a780ce
################################################################################################################# 100.0%
==> Installing dependencies for lolcat: libyaml, gperf and ruby
==> Installing lolcat dependency: libyaml
==> Downloading https://ghcr.io/v2/homebrew/core/libyaml/manifests/0.2.5
Already downloaded: /home/builder/.cache/Homebrew/downloads/5f6b0af1730aa1bc02f8021c90ed7ffe988eeba95eec83e6c828f77332ba6406--libyaml-0.2.5.bottle_manifest.json
==> Pouring libyaml--0.2.5.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/libyaml/0.2.5: 12 files, 394.2KB
==> Installing lolcat dependency: gperf
==> Downloading https://ghcr.io/v2/homebrew/core/gperf/manifests/3.1
Already downloaded: /home/builder/.cache/Homebrew/downloads/da1bea6822381d6f77de37e60a973f28ee167f936d7e204c8bd0ec86ff0e7a42--gperf-3.1.bottle_manifest.json
==> Pouring gperf--3.1.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/gperf/3.1: 12 files, 557.4KB
==> Installing lolcat dependency: ruby
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.3.4
Already downloaded: /home/builder/.cache/Homebrew/downloads/719ec7d415e32b4296153fb8dd877566f30256a312ef32c2111fb9ba781cdfe8--ruby-3.3.4.bottle_manifest.json
==> Pouring ruby--3.3.4.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/ruby/3.3.4: 19,841 files, 59MB
==> Installing lolcat
==> Pouring lolcat--100.0.1.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/lolcat/100.0.1: 263 files, 888.9KB
==> Running `brew cleanup lolcat`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /home/linuxbrew/.linuxbrew/Cellar/ca-certificates/2024-03-11... (4 files, 247.9KB)
Removing: /home/builder/.cache/Homebrew/ca-certificates_bottle_manifest--2024-03-11... (1.8KB)
Removing: /home/builder/.cache/Homebrew/ca-certificates--2024-03-11... (129.4KB)
Removing: /home/builder/.cache/Homebrew/gh--2.49.2... (12.3MB)
Removing: /home/linuxbrew/.linuxbrew/Cellar/krb5/1.21.2... (164 files, 5.3MB)
Removing: /home/builder/.cache/Homebrew/krb5_bottle_manifest--1.21.2... (14.3KB)
Removing: /home/builder/.cache/Homebrew/krb5--1.21.2... (1.6MB)
Removing: /home/builder/.cache/Homebrew/libavif--1.0.4... (197.5KB)
Removing: /home/builder/.cache/Homebrew/libtirpc--1.3.3... (285.0KB)
Removing: /home/builder/.cache/Homebrew/libtool_bottle_manifest--2.4.7-1... (10.3KB)
Removing: /home/builder/.cache/Homebrew/libtool--2.4.7... (1MB)
Removing: /home/builder/.cache/Homebrew/nvm_bottle_manifest--0.39.7... (1.8KB)
Removing: /home/builder/.cache/Homebrew/nvm--0.39.7... (48.2KB)
Removing: /home/builder/.cache/Homebrew/util-linux_bottle_manifest--2.40.2... (13.8KB)
Removing: /home/builder/.cache/Homebrew/util-linux--2.40.2... (8.3MB)
Removing: /home/builder/.cache/Homebrew/xz--5.4.6... (727.3KB)
Removing: /home/builder/.cache/Homebrew/Logs/python@3.12... (2 files, 5.4KB)
Pruned 0 symbolic links and 10 directories from /home/linuxbrew/.linuxbrew

I can now use it to make terminal output more colourful

/content/images/2024/08/motivate-02.png

On longer output it’s rainbow flavoured

/content/images/2024/08/motivate-03.png

It can make Git logs rather fun

/content/images/2024/08/lolcat-01.png

We can use -a for animations

Installation - Sniffnet

We can use brew to install sniffnet

$ brew install sniffit
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: No available formula with the name "sniffit". Did you mean sniffnet or sniffer?
==> Searching for similarly named formulae...
==> Formulae
sniffnet                                                       sniffer

To install sniffnet, run:
  brew install sniffnet
builder@LuiGi:~/Workspaces/motivate/motivate$ brew install sniffnet
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Downloading https://ghcr.io/v2/homebrew/core/sniffnet/manifests/1.3.1
###################################################################################################################### 100.0%
==> Fetching dependencies for sniffnet: alsa-lib and libpcap
==> Downloading https://ghcr.io/v2/homebrew/core/alsa-lib/manifests/1.2.12
###################################################################################################################### 100.0%
==> Fetching alsa-lib
==> Downloading https://ghcr.io/v2/homebrew/core/alsa-lib/blobs/sha256:d093a3482e754eeca28241ea1fb0502cfbc91d982ec158362d72c5
###################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libpcap/manifests/1.10.4
###################################################################################################################### 100.0%
==> Fetching libpcap
==> Downloading https://ghcr.io/v2/homebrew/core/libpcap/blobs/sha256:3ecc72e233bad9575bf92185d05b526ecae130e0598cf47613ce472
###################################################################################################################### 100.0%
==> Fetching sniffnet
==> Downloading https://ghcr.io/v2/homebrew/core/sniffnet/blobs/sha256:5c0755e0b4d6b472940da5d15b977b86fa283a9035804fb13e45a6
###################################################################################################################### 100.0%
==> Installing dependencies for sniffnet: alsa-lib and libpcap
==> Installing sniffnet dependency: alsa-lib
==> Downloading https://ghcr.io/v2/homebrew/core/alsa-lib/manifests/1.2.12
Already downloaded: /home/builder/.cache/Homebrew/downloads/9b93feff610d48e6376df91a003ff167b2e4a264db20353518a39530a088939c--alsa-lib-1.2.12.bottle_manifest.json
==> Pouring alsa-lib--1.2.12.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.12: 146 files, 2.2MB
==> Installing sniffnet dependency: libpcap
==> Downloading https://ghcr.io/v2/homebrew/core/libpcap/manifests/1.10.4
Already downloaded: /home/builder/.cache/Homebrew/downloads/d4071b78fa7971a87c0789aa1c20377928fe6ef4827c8817819f10e589dc15ff--libpcap-1.10.4.bottle_manifest.json
==> Pouring libpcap--1.10.4.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/libpcap/1.10.4: 111 files, 1.3MB
==> Installing sniffnet
==> Pouring sniffnet--1.3.1.x86_64_linux.bottle.tar.gz
🍺  /home/linuxbrew/.linuxbrew/Cellar/sniffnet/1.3.1: 9 files, 35.9MB
==> Running `brew cleanup sniffnet`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

I need to install some dependencies

$ sudo apt install libpcap-dev libasound2-dev libfontconfig1-dev libgtk-3-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libfontconfig1-dev is already the newest version (2.13.1-4.2ubuntu5).
libfontconfig1-dev set to manually installed.
The following additional packages will be installed:
  alsa-topology-conf alsa-ucm-conf gir1.2-atk-1.0 gir1.2-atspi-2.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0
  gir1.2-harfbuzz-0.0 gir1.2-pango-1.0 icu-devtools libasound2 libasound2-data libatk-bridge2.0-dev libatk1.0-dev
  libatspi2.0-dev libblkid-dev libcairo-script-interpreter2 libcairo2-dev libdatrie-dev libdbus-1-dev libdeflate-dev
  libegl1-mesa-dev libepoxy-dev libffi-dev libfribidi-dev libgdk-pixbuf-2.0-dev libglib2.0-dev libglib2.0-dev-bin
  libgraphite2-dev libgtk-3-0 libgtk-3-common libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libicu-dev libjbig-dev
  libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblzma-dev libmount-dev libpango1.0-dev libpangoxft-1.0-0 libpcap0.8-dev
  libpcre16-3 libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libselinux1-dev libsepol-dev libthai-dev libtiff-dev libtiffxx5 libwayland-bin libwayland-dev libxcb-render0-dev
  libxcb-shm0-dev libxkbcommon-dev pango1.0-tools wayland-protocols
Suggested packages:
... snip ...

I can launch it now

/content/images/2024/08/motivate-04.png

However, without root I can’t run pcap and sniff traffic and root won’t run it

I can install for windows

I can install for windows with Ncap and the latest binary from docs.rs here

/content/images/2024/08/sniffnet-01.png

which works pretty well

Installation - xearth

XEarth is old enough there is no snap, apt or brew package of which I am aware. The only solution is to pull and build from source. They still have a bunch of copyright around Infosys’s now defunct patent on GIF (which expired in 2004).

builder@LuiGi:~/Workspaces$ cd xearth/
builder@LuiGi:~/Workspaces/xearth$ ls
builder@LuiGi:~/Workspaces/xearth$ wget https://xearth.org/xearth-1.1.tar.gz
--2024-07-25 20:33:08--  https://xearth.org/xearth-1.1.tar.gz
Resolving xearth.org (xearth.org)... 46.23.89.42
Connecting to xearth.org (xearth.org)|46.23.89.42|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 157887 (154K) [application/octet-stream]
Saving to: ‘xearth-1.1.tar.gz’

xearth-1.1.tar.gz                           100%[========================================================================================>] 154.19K   194KB/s    in 0.8s

2024-07-25 20:33:10 (194 KB/s) - ‘xearth-1.1.tar.gz’ saved [157887/157887]

builder@LuiGi:~/Workspaces/xearth$ tar -xzf xearth-1.1.tar.gz
builder@LuiGi:~/Workspaces/xearth$ ls
xearth-1.1  xearth-1.1.tar.gz

I’ll now make the DIST file with make

builder@LuiGi:~/Workspaces/xearth/xearth-1.1$ cp Makefile.DIST Makefile
builder@LuiGi:~/Workspaces/xearth/xearth-1.1$ make all
gcc -O2    -c -o xearth.o xearth.c
gcc -O2    -c -o dither.o dither.c
gcc -O2    -c -o extarr.o extarr.c
gcc -O2    -c -o gif.o gif.c
gcc -O2    -c -o gifout.o gifout.c
gifout.c: In function ‘gifout_fatal’:
gifout.c:556:3: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
  556 |   exit(1);
      |   ^~~~
gifout.c:49:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
   48 | #include "gifint.h"
  +++ |+#include <stdlib.h>
   49 | #include "kljcpyrt.h"
gifout.c:556:3: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
  556 |   exit(1);
      |   ^~~~
gifout.c:556:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
gcc -O2    -c -o mapdata.o mapdata.c
gcc -O2    -c -o markers.o markers.c
gcc -O2    -c -o ppm.o ppm.c
gcc -O2    -c -o render.o render.c
gcc -O2    -c -o resources.o resources.c
gcc -O2    -c -o scan.o scan.c
gcc -O2    -c -o sunpos.o sunpos.c
gcc -O2    -c -o x11.o x11.c
gcc -o xearth  xearth.o dither.o extarr.o gif.o gifout.o mapdata.o markers.o ppm.o render.o resources.o scan.o sunpos.o x11.o -lXt -lX11 -lm

I can launch it, though I’m not seeing via WSL

-rwxr-xr-x 1 builder builder 219768 Jul 25 20:42 xearth
builder@LuiGi:~/Workspaces/xearth/xearth-1.1$ ./xearth
xearth 1.1: warning - unable to load font, reverting to default

While that didn’t work, manually setting some geometry did!

$ ./xearth -geometry 1000x1000+100+300
xearth 1.1: warning - unable to load font, reverting to default

Taken around 8:52pm CDT

/content/images/2024/08/xearth-01.png

Maximizing just repeats the earth

/content/images/2024/08/xearth-02.png

I can launch the full size of my screen but it will not background

builder@LuiGi:~/Workspaces/xearth/xearth-1.1$ ./xearth -geometry 2560x1600+100+300
xearth 1.1: warning - unable to load font, reverting to default

Now, I wouldn’t trust the xearth builds for windows as the newest you can still download is from 2012.

There are, however, options in “Wallpaper Engine” you can get from steam for US $4 (well worth it).

/content/images/2024/08/wallpaperengine-01.png

Terminal Text Effects

In the same episode LNL mentioned LOLCAT, they mentioned TTE.

Terminal Text Effects has quite a few options. The documentation shows using it with nix shell but I plan to just stick with the plain vanilla WSL Bash shell.

It’s easily installed with pip

builder@DESKTOP-QADGF36:~$ pip install terminaltexteffects
Collecting terminaltexteffects
  Downloading terminaltexteffects-0.11.0-py3-none-any.whl (157 kB)
     |████████████████████████████████| 157 kB 1.6 MB/s
Installing collected packages: terminaltexteffects
Successfully installed terminaltexteffects-0.11.0

Here are just a few examples of TTE in action on a git log

I would recommend hitting up the Github page for a bunch more as animated gifs on the page.

Summary

We took a look at a couple decent terminal colourizers like lolcat and tte. I think both will help make some demos and presentations a bit snazzier.

I do not plan to just regurgitate links from LNL episodes, but seriously, that podcast is full of great ones. I found myself stopping at intersections just to bring up my Github issues to scratch down notes. I often relisten a few times just to note them down. So tip of the hat to a very good podcast with a focus, of course, on Linux.

Motivate lolcat Sniffnet Xearth TTE TerminalTextEffects

Have something to add? Feedback? You can use the feedback form

Isaac Johnson

Isaac Johnson

Cloud Solutions Architect

Isaac is a CSA and DevOps engineer who focuses on cloud migrations and devops processes. He also is a dad to three wonderful daughters (hence the references to Princess King sprinkled throughout the blog).

Theme built by C.S. Rhymes