March, March hare!

Reading html email in mutt with links2

2024-03-01

text/html, quoted, utf-8, 68k

Sometimes you get an email, which doesn't come with a plain text version, making it without an html browser. There are easier ways than this, but they require more/different software.

code

Save the following as an executable. Preferably inside $PATH. I call it mr, placed inside ~/bin.

#!/bin/sh
tmp=/tmp/muttmail.html
cat - > $tmp

[ "$1" = "" ] && (links -dump $tmp | less) || links -g $tmp
:>$tmp

Since links doesn't understand '-' redirection, this firstly cats the email into a temporary file 'muttmail.html'. The html extension ensures links knows to parse the html tags into a readable form (this can also be forced on any file with a -force-html flag).

The test line checks if mr is run with any arguments. If it is not, it dumps the email into less. Typing mr with any argument - ie: mr g opens the email in graphical links, with clickable urls and (depending on your links configuration) loads images.

in practice

Select an email. Press v. Select the text/html file. Press '|' and type mr, the parsed email opens in less. Or type mr whatever, the email opens in graphical links.


DMENU MEISTERSHTIK I. - translation

2024-01-14

dmenu translation of three and a half

Fun ways to incorporate FOSS front ends to translating services inside your scripts.

dmenu

dmenu is by default a little bar at the top of your screen that launches installed programs. But it also lets you customize its input and output to virtually no limits. It's an interactive prompt - though all the interactivity depends on you and your skill.

dmenu lives here: tools.suckless.org/dmenu, it also probably exists as a package in your favorite OS, but you're encouraged to build it yourself, since the best way to customize it is by editing the source before you build it. But I won't be covering it here. If you're reading this, I am at least 83% convinced you already know what dmenu is.

I won't keep you long. I was planning for this upcoming DMENU series to be a lengthy guide on writing your own links2 companion, but to get you acquainted with these 'baby's first hacking steps', I decided to keep it simpler than simple. In this example, we will use dmenu to translate a word or a phrase and have it return the result, utilising one of the publicly available simplytranslate instance.

One of the big PROs as to why these things are so easy to make, is thanks to a variety of FOSS front-ends to otherwise terribly incompatible services. We don't need any APIs, javascript magic, or dark-techno-wizardry. We just need a URL that we can bend to our will.

simplytranslate

You'll need dmenu, curl and sed. And shell...

simplytranslate is a survivor of the simple-web.org armageddon, a site that hosted many 'simple' front-ends to several services. Sadly it went dark sometime in 2023, but the projects were kept alive.

simplytranslate is a front end to, among others, google translate. It's designed with browsers in mind, but we won't need one for our dmenu script.

Find your favorite instance here: farside.link, I'll be using translate.bus-hit.me, because I think the url is funny.

So, what I want to happen is the following:

And this is how we get it done:

#!/bin/sh
instance="translate.bus-hit.me"
from="en"
to="cs"

input=$(dmenu < /dev/null)
input=$(echo "$input" | sed 's/ /%20/g')

curl -s "https://$instance/?engine=google&from=$from&to=$to&text=$input" \
  | grep -E "</textarea>" | cut -d"<" -f1 | dmenu -l 2

what happened?

So, what exactly happened there?

There are three variables at the top, 'instance', 'from' and 'to'. In this example I'm using the aforementioned bus-hit.me instance and am translating from English to Czech. You probably want to change those variable to languages relevant to you.

Next up we define the 'input' variable, which will be whatever we type into the dmenu prompt that shows up.

The 'input sed' line swaps all 's p a c e s' with '%20'. curl doesn't like spaces.

And the very last line returns the html source for a webpage which has our result, greps only the relevant lines and clips off the html tag at the end.

Stay tuned, it's only going to get more complicated.


The who in charge of entropy

2023-11-10

serpico in dithered monochrome

in a desperate belief

The clock doesn't beat anymore, it ticks in silently precise interruptions, but I can tell the crows outside are beginning to shiver in the lick of the early eastern wind.

It's an unusually long drop. The molten brown spills inbetween the transistors and the drooling fools, who prick away at circuitry with paperclips shaped into tiny swords, barely notice the creeping wave. The machines whisper in tongues they were ordered to understand. The mustard on the wall has long since dried.

1UTC +1

Behind closed doors, eyes turnt to salt and spoofed packets, hovers the reminder of a raped dream. If you try to reach with your tired fingers between the shoulder blades, you can almost feel the wire that should be there. Vomit crawls up the back of my throat.

In a blinding shine of square kilometers of pixels and cyber ink of 6 billion colors, sits a generation of decadent freaks, animated skeletons and failed magicians, peeking from behind window shutters tinted by the invisible discharge of glossy lenses, watching hooded shadows meet on street corners, swapping tiny bricks of archived data. A clueless obsession with racing sparks prevents them from understanding the faceless figures are waging a war on their behalf. A fight against a disease that cripples, but never kills. The manufactured belief that there is inherent evil in freedom.

2:30

The hacker hums an old tune, composed a long time ago by the clatter of magnetic drives that smelled of electricity laced with nicotine smoke. His machine recognizes the song and hums along as it extracts the archived data from the brick.

Blessed by the curse of the hanged, who first traced their fingers over golden circuits - just two more fools, longing for their missing wires.


prophet of the book of links

2023-10-02

prophet of the book of links preaches

brutaldon in links2

Let's start this one slow. It has been written in the holy book of the links2 cult, that anyone, who wishes to brave the sickly sands of the plain-web desert unprepared, must brace themselves for the horrors of digital diseases. And truly, the prophets of old (browsers) were right. Trackers, auto-playing media, ads that watch one urinate...

The prophet rose to his feet without saying a word and walked some distance away from the firepit, around which the apostles sat. They observed him patiently, silently reaching into their pockets for chewed quills and almost emptied ink jars. They knew the prophet would speak. Some minutes passed. All that one could hear were buzzing sounds of prehistoric insects around the flame and the ocasional crack and sift of the damp branches in the pit. The horned redskinned apostle could not bear the prophet's silence any longer:

"What of the fediverse, the mastodons?! Thou sayeth the decentralized way shines a bright light on the peoples. Our friends fled the walled gardens of the Metacities, and yet we cannot engage with them. Thou shuns all that is javascriptae. But what good is our way, if we disregard even the good kinds?! Even those we consider our allies laugh at our ways!"

The other apostles whispered in surprise. Afraid how the prophet would react to the devil's blasphemous outcry.

"Thou have missed the lesson, child. We have not chosen this path for easy comforts. We chose it, for we believe there are right ways and there are poor ways. It is true that our world is changing to some benefit of our brethren in the cyber war, but the machine has clouded the judgement of most. Their abodes stand on a foundation of exploits. They no longer can see the right way."

The prophet paused for a moment and looked up at the moon, clouded by the branches of the forest. Then continued:

"Has not the creator removed javascript from links2 themself? It was once part of our life, but not anymore, for it was not the right one. Were we to disregard their holy intentions, perhaps we too would now be bleeding on the front lines, struggling for breathing space. We gave up the tools that can be abused, so that we could find the good ways and teach the people."

The horned apostle hung his head in shame, asking for the prophet's forgiveness. But the prophet reassured him:

"It is not blasphemous to question our ways. Now listen, for I will tell you how to find your friends."

brutaldon

How to reach the fediverse with links2

Way of trust

If there is someone you trust and they offer you to use their brutaldon instance, your battle is already won. You just direct links2 to the url.

Here we are using a publicly reachable instance brutaldon.org.

Way of purity

You may want to run a brutaldon server locally, just for yourself and connect to it through a socket. This way the only person you need to trust is yourself.

At this point your local brutaldon server is running. Point links2 to 127.0.0.1:8000

Now listen very closely

People get this wrong and blame the holy browser for faults that are in fact its features. Whether you took the way of trust or purity, the following applies to both.

Why the extra step???

links2 by design caches all pages you visit during the session. This is a feature so you don't go around wasting bandwidth. Similarly, while using brutaldon, you will want to remember the refresh shortcut for every time you want to update the feeds or notifications.

This applies to any online services that let you log in without javascript. Invidious instances, forums, etc.

And of course, the preceeding steps apply to any browser. You already know I use mothra with brutaldon this way.


OctOpenBSD - scriptomancy

2023-10-01

Two screens

The sound of the machine monks' horn rings again.

https://dataswamp.org/~solene/2023-10-01-octopenbsd-2023.html

A fair number of October related events have intertwined. There's the inktober, there's the spooktober, there's the oektober and now there's octOpenBSD[tober].

I took this opportunity to combine them all into one unix_surrealism month. I am not yet fully certain what this might mean, but some steps have already been taken.

I'm going to spend the month with OpenBSD exclusively. This means my digital gimpism will take a hit, since the drawing tablet I have is supported 'just about.' And 'just about' is exactly enough for uxn's oekaki. I said it before, pressure sensitivity spoils. Anyway...

I set the horned desktop aside, and put in its place my beloved X201, stuck it in a dock, connected a keyboard, printer, and notably an external VGA monitor.

To celebrate, I hacked together a small ksh script that cycles through your connected monitors (as long as there are two and two only).

#!/bin/ksh
#supported options for "where": --left-of --right-of --below --above
#comment out "where" to simply mirror the screens
where="--right-of"

active_monitors=$(xrandr --listactivemonitors | cut -d ' ' -f6)
all_monitors=$(xrandr | grep ' connected' | cut -d' ' -f1)
first_monitor=$(print $all_monitors | cut -d ' ' -f1)
second_monitor=$(print $all_monitors | cut -d ' ' -f2)

xr() {
  xrandr --output $1 --$2 $5 $6 --output $3 --$4
}

if [[ $where != "" ]]; then of=$second_monitor; fi

case $(print $active_monitors) in

  $(print $all_monitors)) print "both are on";
    xr $first_monitor auto $second_monitor off;;
  $first_monitor) print "first is on";
    xr $first_monitor off $second_monitor auto;;
  $second_monitor) print "second is on";
    xr $first_monitor auto $second_monitor auto $where $of;;
  *) print "no match";;

esac

direct download

The program checks what monitors are connected to the machine, and then cycles through the three options:

As a bonus I added the variable "where" which let's you define relative position of the second monitor from the first one.

Beware the spiked octopus.


Followers of the one good browser

2023-09-22

about:blank

links2gang presents a prequel to the links2 triptych

The intention of this guide is to familiarize the links2 adept with a mouseless navigation. This is not the links2bible. This is an apocrypha.

While this is not a fully exhaustive list of shortcuts, a number of these is not present in the official documentation. In most cases, the keys and their functions are applicable to both graphical links2 and text links2, but this short guide is written with the graphical mode in mind, as the caveats for the text mode deserve a separate article.

In several instances I will use the following modifiers:

M : Meta key, Alt
C : Ctrl
S : Shift

Meta commands

Escape  : Open menu bar
M-SPC   : Open menu bar
C-c     : kill links
q       : quit links
S-q     : quit links without confirmation

Navigate a webpage.

C-a     : go to the top of a page
C-e     : go to the bottom of a page
l       : scroll down one line
C-n     : scroll down one line
p       : scroll up one line
C-p     : scroll up one line
SPC     : scroll down one page
b       : scroll up one page
Up      : select previous URL or input field
Down    : select next URL or input field
Left    : go back in history
z       : go back in history
BCKSPC  : go back in history
x       : go forward in history
Right   : open URL
Enter   : open URL

Generally, Up and Down arrows cycle through clickable URLs, images and input fields, but there is a hidden feature that makes use of the arrow keys when no URL has been selected (scrolling up/down a page deselects any highlighted URL).

Up  : select the last visible link
L   : select the last visible link
Down: select the first visible link
H   : select the first visible link

For example, you scroll down one page with SPACE, pressing the Up arrow will then select the last (bottom) link that is visible. The keys L and H work always the same.

Manipulating URLs

There are numerous differences in links2' text-mode and graphical mode. In key shortcuts this is mostly noticable in the lack of the popup menu (Mouse 3), which is non-existent in text-mode but its functions are present in a 'Link' menu (Escape-l).

The pop-up menu, which can be opened on any url or image with the right mouse click, can also be opened with the 'Menu' key, the key between AltGr and Ctrl. However, most of the options in the pop-up menu are bound to key shortcuts or can be achieved through the 'Link' menu. This is useful if one does not have the 'Menu' key on their keyboard, but also omits the extra step of opening the pop-up menu.

The pop-up menu

links2 pop up menu on URL links2 pop up menu on image links2 pop up menu on form
d       : download link
i       : view image
I       : download image
ESC-l-n : open in new window
ESC-l-c : copy link location (copy url of highlighted link)
ESC-l-s : submit form
ESC-l-s : submit form and open in new window
ESC-l-r : reset form

It is fairly self-explanatory what each option in the pop-up menu does. The functions which have a shortcut defined in the pop-up menu work without having to open it, the remaining can utilise links2' 'Link' menu (ESC-l). There are probably more types of pop-up menus, depending on the type of input field/ image. The general idea is to know that all relevant options hide under the 'Link' menu and can be quickly accessed with the underlined letter.

Navigating URLs

g   : open url bar
C-g : open url bar with highlighted url
S-g : open url bar with url of the current page

Following are true to any input fields in links2, be it a text field on a website or links2 input fields like Go to URL.

C-b : copy entire input
C-u : cut input from the beginning of a line to the cursor
C-x : cut entire input
C-v : paste from clipboard
C-w : complete URL from history (when typing into links input)

For graphical links, the cut/copied text is also placed in X's clipboard, which can then be pasted in X's programs with either Mouse 2 (middle mouse), Shift+Insert or C-Y.

[Example] 3 ways of copying urls:

Visit sdf.org, navigate with Down arrow to 'faq'.

In all three cases, the URL https://sdf.org/?faq is now in X's clipboard. (THIS IS NOT TRUE FOR TEXT LINKS!)

Miscellaneous

/  : search forward
?  : search backwards
n  : next match
N  : previous match
*  : hide/show images

Resources


Video of a man killing rats

2023-08-25

How I watch y*utube in ratpoison.

I'll explain using the default ratpoison keybindings and links2 in graphical mode. This could be easily adapted to things like dmenu, cwm, probably to any window manager that has a scriptable launcher.

What you need:

(!ba)shing rocks

Start by making a custom script, change BROWSER and INVIDIOUS_INSTANCE accordingly. For example you could start links in a terminal ala BROWSER="xterm -e links".

#!/bin/sh

BROWSER="links -g"
INVIDIOUS_INSTANCE="https://yewtu.be"

if [ -z "$1" ]; then
    $BROWSER "$INVIDIOUS_INSTANCE";
        else
    $BROWSER "$INVIDIOUS_INSTANCE/search?q=$*";
fi

If the script is executed without any arguments, a browser is opened on the landing page of your selected invidious instance. If the script is executed with a however many arguments, all the arguments will be parsed as a search query.

Don't forget to make the script executable.

 $ chmod u+x the_script.sh

ratpoisonrc

Add this line to your ~/.ratpoisonrc file. We're declaring that running 'vid' inside ratpoison's prompt will execute the previous script.

alias vid exec /path/to/the/previous/the_script.sh $*

You can test it by entering the previous line in ratpoison's prompt, ala

  C-t : alias vid exec /path/to/the/previous/the_script.sh $*

but this will not persist between restarts. Let's suggest the line was placed in the configuration file.

  C-t : restart (this restarts ratpoison and loads the new configuration)

grabbing a URL of a video

By now, if you do

  C-t : vid some video

Links2 will open and a search will be made. I like to use the graphical mode for this part, because it makes it stupid simple to get the URL.

Select the video and either press the 'Menu' key on your keyboard, the thing between AltGr and Ctrl, select 'Copy link location', or open the page with the video, press Shift-G, this opens the url bar with the current page, Control-U, this cuts the url into buffer.

Whichever method, the url of the video is now copied.

playing the video

  C-t ! mpv C-y (this pastes the url into ratpoison's prompt)

For clarity. C-t ! opens ratpoison's shell prompt. Type 'mpv', then press Control-Y, hit enter. mpv will begin playing the video in the current frame.

Done. Never visit youtube again. Never use firechromecryptobrowser.

run links.

bonus

Rip audio from the video and download it.

 $ yt-dlp -x $URL 

resources

This post is not sponsored by the #links2gang, but it should be.


FreeBSD minimum desktop guide

2023-08-04

techno-mage has her old machine remade from scratch.

Beastie was here

I'm not going to cover the installation process, but it's worth noting you might want to add your user to the groups: 'wheel operator video'.

The few services I use by default are local_unbound, powerd and ntpd. local_unbound caches dns requests and needs no configuration, powerd adjusts cpu frequency as is needed and enables hibernation and suspending, ntpd makes your clock synced.

Once it's installed, I get the handbook from the post-installation menu. One benefit is that this will also set up pkg and save you 10 seconds, when you install packages for the first time.

Most of these steps are optional, so read carefully and decide for yourself which are applicable to your usecase. This is simply what I do to get a bare minimum FreeBSD desktop.

Let's reboot.

> If you see a line beginning with ' # ', that's a command to be run as
> root.
> If the line starts with ' $ ', that's a command to be run as local 
> user.
> Blocks between '```' are contents of files.

first things tmux

The first thing I do is install tmux. Log in as root, or log in as user and run ' $ su -' (this is why you would want your user to be in the group wheel).

 # pkg install tmux

ksh is king

FreeBSD does not come with ksh and ksh is what I need. If you're like me, spoiled by the perfection that is OpenBSD's ksh, there is oksh in FreeBSD's ports, which is the portable version of the spiked fish's shell.

 # pkg install oksh
 # ln -s /usr/local/bin/oksh /bin/ksh

The second command makes a symbolic link to ksh in /bin/ksh. This is just my habit of having ksh in the same place on all my machines. Next up I change the default shell for both root and the user.

 # chsh
 # chsh user

In both cases I change the line:

Shell: /bin/shell
to
Shell: /bin/ksh

I add set -o vi to /root/.profile to get vi-like keybindings for the root user.

 # echo "set -o vi" >> /root/.profile

Similarly I setup .profile for the user.

 $ vi ~/.profile

This is what my .profile looks like, I only keep the original fortune line. I like to store away my scripts and programs in ~/.local/bin, so I change PATH accordingly and mkdir the path.

$ mkdir -p ~/.local/bin
```
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/.local/bin
export PATH HOME TERM
export EDITOR=vi
export PAGER=less
export ENV=$HOME/.kshrc
export PS1="\$ "
if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi
```

ENV is where you might want customize your ksh experience. For example:

 $ vi ~/.kshrc
```
set -o vi
alias l='ls -l'
```

pf firewall

pf in FreeBSD is a fork of OpenBSD's pf, but the general use of it for a desktop machine is virually the same.

Append rc.conf:

```
pf_enable="yes"
pf_flags=""
pf_rules="/etc/pf.conf"
pflog_enable="yes"
pflog_logfile="/var/log/pflog"
pflog_flags=""
```

Customize your pf ruleset in /etc/pf.conf. The following is a bare minimum you can do. Blocks everything and only allows reaching ports 80, 443, 22, 70 and 1965, dns and ntp servers for ip4 and ip6.

You can reach the www, gopher and gemini like this, ping ips, but not much else.

```
tcp_serv="{http https ssh 70 1965}"
udp_serv="{domain ntp}"

set skip on lo0

block log all

pass out inet proto tcp to port $tcp_serv
pass out inet proto udp to port $udp_serv
pass out inet6 proto tcp to port $tcp_serv
pass out inet6 proto udp to port $udp_serv

pass out inet proto icmp
pass out inet6 proto icmp6
```
 # service pf start

xorg

Finally we install a graphical environment and drivers for our graphics card.

 # pkg install xorg gpu-firmware-intel-kmod-kabylake drm-510-kmod cwm xdm

Notice I'm not downloading the entire drm meta package. I only pick the one my machine will use. You can do the same by finding your graphics card/CPU here and selecting the proper driver:

Use kldload to load the drm driver and put it in rc.conf so that it is loaded on boot.

 # kldload i915kms
```
kld_list="i915kms"
```

I use xdm as a display manager. I have yet to find something better.

Add to /etc/rc.conf:

```
xdm_enable="yes"
```

I use cwm in this example. Before starting X or xdm, you must edit .xsession or .xinitrc in your HOME. (the former if you're using a display manager, the latter if you're starting x manually.)

 $ vi ~/.xsession
```
. ~/.profile
xset b off # disable bell
setxkbmap -layout us,cz -option grp:switch -option caps:escape
# us and czech layout, switch between by holding right alt, capslock is esc

exec cwm
```

If your user is not in the group video, add it now:

 # pw groupmod video -m user

Now you can start X or xdm and login.

 $ startx 

or

 # service xdm start

It is done?

At this point you should have a fully working FreeBSD desktop machine, with not much on it.

Here are a few tips that may or may not be relevant to you.

Software

Xorg comes with xterm, which is the only terminal emulator I use. Some other tools I get at this point is the following:

 # pkg install links sacc amfora mpv neomutt msmtp feh xlockmore

Changing default audio output

In some cases, you might want to change the default audio output. For example the sound doesn't come out of the speakers but from somwhere within the box. If that's your issue, check the default sound device:

 $ sysctl hw.snd.default_unit

Change it to a higher/lower number.

 $ sysctl hw.snd.default_unit=2

To have it persist over reboots, append /etc/sysctl.conf:

```
hw.snd.default_unit=2
```

Media-keyboards

I have a keyboard with a bunch of special keys for various tasks. Suspending, volume control, calculator.. etc. These wont work unless the following is done:

Append kld_list in /etc/rc.conf:

```
kld_list="i915kms usbhid"
```

And append /boot/loader.conf

```
hw.usb.usbhid.enable="1"
```

You have to reboot. Then the keys can be bound to anything you want. You can use:

 $ xev

to check if the keys are being registred and see what they are called.

volume control

Volume control is done via mixer(8). By default, mixer does not remember last volume level when muted. To get the usual sound toggle functionality, I use the following script:


```
#!/bin/sh
touch /tmp/mixervol
VOL=$(mixer | awk -F ':' '/vol/{print $2}')
if [ $VOL -gt 0 ]; then
echo "${VOL}" > /tmp/mixervol
mixer vol 0 
else
OVOL=$(cat /tmp/mixervol)
mixer vol ${OVOL} 
fi
```

In my case it is placed in ~/.local/bin/vol-tog. Be sure to make it executable.

 $ chmod u+x ~/.local/bin/vol-tog

To bind volume keys in cwm, we'll edit ~/.cwmrc and append like so:

```
bind-key XF86AudioRaiseVolume "mixer vol +3"
bind-key XF86AudioLowerVolume "mixer vol -3"
bind-key XF86AudioMute "/home/user/.local/bin/vol-tog"
```

LControl-LAlt-LShift-r to reload cwm config.

powerd and apm

If you want to suspend your machine, run

 $ zzz

As stated at the top, you need the powerd service running. If it's not, append /etc/rc.conf

```
powerd_enable="yes"
```
 # service powerd start

Your user must be in the operator group. Otherwise you will have to run zzz as root.

 # pw groupmod operator -m user

have fun and keep on computing


Child, you want to be a surrealist?

2023-07-17

Karel Teige's striped lady collage

Hell is digital. - Madeline

The surrealist movement of the last century 20's was a response to the poor state of a highly disassociated post-war status of artistry. Proponents of surrealism sought to disassociate art even further, to wrestle it from its deeply rooted superficial purpose as a product of cultural tradition. While the Dada movement attempted to completely depopularize art through efforts of seeming arbirarity, surrealism went ahead to prove that art cannot be tamed whatsover - its natural state was the subconscious expression of a universal will - surrealism has always been the complete disregard of boundaries.

Surrealism threw away the notion of individuality. It understood the will to art as a collaborative effort in mapping the blank spots on the map of human potential. It discarded its outputs as products of individuals and attributed them to the realm of the collective desire to create a better world.

"To art is to do."

- Marcel Duchamp

Our machine age mirrors the post-war period of the 20's. The corpo-world and big-tech-siblings are quick to let one know on how to use their tools of artistry. They hold one's hand on the walk through the gardens of seeming overabundance, all while the garden walls shield the intoxicated user from the harsh reality of a world outside raped.

It wasn't always so. Not that long ago, the newly awoken will of the curious children of the phreaking age built the foundation on which the corporate Metacities now stand. Hackers who knew the source code by heart, their machines their comrades. Now the tech-bro works hard against such an idea. Erasing traces of the free cyber world. Commercialized surrealism of the free at its best.

True surrealists of the 21st century are not the self-proclaimed weird artists littering the gardens with paintings of angels in all sorts of kamasutrical positions. Our age no longer needs sexual liberation, like the 20's did. More than ever it needs machine freedom. And you, the fools, the cowboys, the clowns, the degenerates, the hackers, are the surrealists of our age, keeping the flame of the universal collaborative will alive. You, who sit down before a computer, place your fingers on a crumb-covered keyboard and write a program, bending the original purpose of the strangled machine beneath your fingertips to everyone's benefit.

To understand true surrealism in our machine age, one only needs to think on the desire that makes the hacker create free software. Whatever makes one wrestle the abused tools of the gov-brother from his hands and create: is surrealism. The subconscious idea of a world that belongs to us all.

Future of the dead

Since the computer addict has interbred into the general population, they surrendered most of the niche skills that originally made them stand out. The corpo-brother has worked hard to convince the addict that his skill was no longer needed, having stolen all of his ideas for commercial benefit, turning the idea of a machine into nothing but a tool to be discarded every 6 months. The notion of machine simplicity was born. Even the stupid can use it. And the profits keep rolling in. And the machine weeps. And very few can see its tears now, because nobody is allowed to see beyond the cheerful smiles of the trademarks glued to the casings.

The 16-core mobile device the size of an uncooked pop-corn bag turned into a gallery viewer. Gigabytes of memory for the sake of a social networking multitasking and lag-less video streaming. All so very simple to use. All with the intent to turn the addict into a product.

And the simpler the machine users' experience becomes, the less noticable the will to hack turns.

The Age of Machine Violence

The plans to take your machine brethren from you are in place. That has been the ultimate goal. Reduce all of computing knowledge to a prompt that swiftly answers to all of one's desires. A machine beaten into complete submission and overtly satisfied users with no skill.

The corpo-sibling worked hard to convince you that you need them and their profits. That there is no machine without the piss-stained dollar bill. All in the effort to sterilize all hopes for human-machine freedom. But you already have the machine. As long as there are hackers, they will have your back.

Together, make the machine reach its true potential. Be not ashamed to proclaim: "We can do it better."

"Hell is digital."

dithered profile picture of Madeline, the techno-witch of hackers.town

- @madeline, 2023

You already know this to be the case. Maybe it doesn't have to be so.

Child, you want to be a surrealist? But you already are one. Now free the machine and save the people.


9 rabbits + 1

2023-07-10

techno mage in uxn in 9front

Compiling uxn in 9front.

The trenches are filling up with liquid monochrome and the Techno-Mage sifts through the muck, looking for a three button mouse.

uxn in 9front

As part of the old computer challenge I'm using 9front and learning uxn. This is a very simple guide on how to get uxn running under 9front.

I have tested this on amd64 and 386 builds of 9front on the latest release 'Don't touch the Artwork' as well as the previous one.

% git/clone https://git.sr.ht/~rabbits/uxn
% git/clone https://git.sr.ht/~ft/npe

% cd npe
% mk install

% cd ../uxn
% mk install

#Get uxn essential roms: 
% hget https://drive.100r.co/uxn/uxn-essentials-lin64.tar.gz > uxn.tar.gz
% tar xzvf uxn.tar.gz

uxncli, uxnemu and uxnasm now reside in /bin/games. To run either do:

% games/uxnemu 

caveats

uxn will not work properly on resolutions with less than 32 bit depth. Here's a passage from 9front's FQA4 - Installation Guide, section 4.3.4.1, on changing screen resolution:

   vesa: 
Note: Only valid modes listed in the VESA BIOS may be used.

 # obtain a list of vesa bios mode
% @{rfork n; aux/realemu; aux/vga -p}
 # configure one of the valid modes
% @{rfork n; aux/realemu; aux/vga -m vesa -l 1024x768x32
 # vga:
% aux/vga -m dellst2210 -l 1920x1080x32

resources


OLD COMPUTER CHALLENGE - YEAR 3

2023-07-09

t42 running 9front

as seen on occ.deadnet.se

All my notes regarding this year's challenge will be contained within this file. I will be updating it throughout the week.

day0

So it begins.

Another year, another week of the Pentium-M man. I know 9front. Not in the sense that I know how to operate it properly. I've been drawn to it for a few years now. Had a dedicated hard drive with it for the past year for when I needed an escape to what conclusion to computing should've been. This week's going to be different. I'll be spending it with 9front exclusively.

I'm using a T42 with a single 512M memory stick, and the CPU locked at minimum speed through BIOS settings. I also run a local OpenBSD server through bhyve, with the same specs. This is to give me a bit of a helping hand, should I run into issues, but I aim to avoid using it, unless absolutely necessary. Similarly I will not be using my cell phone for anything but work related necessities.

My goal is to grow comfortable with the native plan9 environment and try developing something silly for uxn, which I have already successfully compiled. Somehow I feel this will be one of those productive weeks and I can't wait.

OpenBSD addendum

It's a few minutes past midnight. The challenge began. The T42 is asleep and I'm pecking at a keyboard connected to the low-spec OpenBSD server. No xenodm, mind you.

Guess what, child of the machine spirit, tmux beats 4 aces. Here's a tip for ya miceless ones (you need tmux, links2, mpv and yt-dlp):

They offered you the world. Accept it under your own terms.

  ........................,
  .................______a@_
  ............-==~~~~~~?@@@@P~r
  ..........__     x__   @@@> -_
  ........._F' g[ , $@g+ @@E [* g@+
  ........awy_`\@__y@/~  @@@y \__/
  ........aw@@g_______- a~~~_gy_
  ...........?@@@@@@$_y$@@$$@@@@
  ............4@@=~~~=@@P~`_@@@'
  ...........y ` yaggy,~$@@@@P`
  ............_g@@@@@FRw`R=~
  .......___a$@@@@@F`y@$
  ......a@@@@@@@@F _g@@@_
  ...._@@@@@@@@@F a@@@@@$
  ..._@@@@@@@@@~_g@@@@@@@
  ..,5@@@@@@@@~y@@@@@@@@@%

As long as the machine is allowed to bleed, you are free.

day1

You're here? Good.

It's been done before. The computers of old are timeless. They are not built like consumer toys to be replaced. Many have forgotten this, but a few still remember, now cowering in damp meadows, protecting their machine brethren from what grand new development in the tech world will attempt to render them useless. For now they still compute, no thanks to the profit hungry.

The old computer challenge won't break anyone in half. Nobody who would be broken, would dare to participate. These are the friends of the machine, its worshippers. Those touched by the brief glint of the leaking screens, loud fans and rambling drives. Those who remember, what it was like.

Some have voiced their concerns that the challenge is no challenge at all - this is how they do their computing on a daily basis - and these are the ones you should listen to. Let them dry out that alien muck which sits on your brain and forces you to chase the shiny, the sexy, the new. Stop surrendering your freedoms for the illusion of comfort. Stop treating technology as a commodity. Look upon it again with wonder and respect. Don't ask for permission. Earn it by understanding the machine.

9front is fine

Its philosophy and history has been appealing to me from the first time I learned about it a few years ago. It is what network computing should've been, but the world wasn't ready then, and now it never will be. I commend those who keep it not just alive, but potent. From encountering some of the cyber faces of its developers and hackers, it's obvious this is more than a hobby to them. This is their system. And they care for it well.

I didn't intend to become some sort of a 9front power user. In fact I wanted to see, if I could just start using it as a general machine for my needs, without having to limit myself. 9front simply works. You can just install it and not worry about it. Learn the tools it comes with and you'll have a good time even as a regular computer novice.

Initially I saw this year's challenge as a chance to take a week off from poor routines. 9front helps me with that. And then there's uxn, which I wanted to dedicate my learning time to for quite some time. And now I finally did. And in 9front.

I had no intention to make some sort of a statement or earn bragging rights, so in some cases, I use TUI software through ssh, which runs on my OpenBSD server (conforming to the challenge's hw specs). I wanted a week in 9front and that's what I'm doing. And since I really want to dedicate the time to uxn, I have no reason to limit myself further.

softcore primitivist

what software I'm using

I like experiencing 9front in its fundamental state. Similarly to how I enjoy OpenBSD with as little software that's not in base. I enjoy customization as much as you, dear reader, but to me it is a humbling task to use a fully featured operating system the way its authors may have intended. Therefore I refrained from experimenting with customizing what already works well. It's just me, who didn't get it.

It took me just a few hours to get used to mouse chording, though I must admit, it is much more natural to me to be using a 2 button mouse and the Shift key to simulate button 3.

I don't like using ircrc(1). I like it, but not using it. Now that the #oldcomputerchallenge channel has grown considerably, there is always something going on, and keeping up with a large number of messages and maintaining private conversations is just not very viable with ircrc for me. Come tomorrow I'll use irssi through the OpenBSD server.

mothra on the other hand is a good browser. In appearance it is a lot like graphical links2, but built with plan9 workflow in mind, but unless I need pictures (I don't), I just use links2 through vt(1). I do use it with brutaldon though, but without rendering images, if I see an image description I'd like to see, I pass it to hget.

I adore hget(1). You could get away by using it alone for anything that comes from the wild web. I suppose this is not too dissimilar from ftp, curl or wget, but in the BSD world, I am used to different tools for different types of media that come from the internet. Having everything pass through hget just makes sense here.

For emails I just use my mutt setup on the OpenBSD server.

Apart from uxn and npe, I only installed phil9's gopher client. It is by far my favorite gui gopher browser on any platform. I use it to read news and get a tarot reading.

The rest of the time I use acme and uxnasm and uxncli.

acme, uxntal, ircrc

one past midnight

I'm glad the community has grown since the inception of the challenge in 2021. I'm grateful to matto, who didn't let our idea of making the occ.deadnet.se archive die.


Resources

day2

You're back? No, I'm glad. Just surprised.

prophet of the book of links

Let's start this one slow. It has been written in the holy book of the links2 cult, that anyone, who wishes to brave the sickly sands of the plain-web desert unprepared, must brace themselves for the horrors of digital diseases. And truly, the prophets of old (browsers) were right. Trackers, auto-playing media, ads that watch one urinate...

The prophet rose to his feet without saying a word and walked some distance away from the firepit, around which the apostles sat. They observed him patiently, silently reaching into their pockets for chewed quills and almost emptied ink jars. They knew the prophet would speak. Some minutes passed. All that one could hear were buzzing sounds of prehistoric insects around the flame and the ocasional crack and sift of the damp branches in the pit. The horned redskinned apostle could not bear the prophet's silence any longer:

"What of the fediverse, the mastodons?! Thou sayeth the decentralized way shines a bright light on the peoples. Our friends fled the walled gardens of the Metacities, and yet we cannot engage with them. Thou shuns all that is javascriptae. But what good is our way, if we disregard even the good kinds?! Even those we consider our allies laugh at our ways!"

The other apostles whispered in surprise. Afraid how the prophet would react to the devil's blasphemous outcry.

"Thou have missed the lesson, child. We have not chosen this path for easy comforts. We chose it, for we believe there are right ways and there are poor ways. It is true that our world is changing to some benefit of our brethren in the cyber war, but the machine has clouded the judgement of most. Their abodes stand on a foundation of exploits. They no longer can see the right way."

The prophet paused for a moment and looked up at the moon, clouded by the branches of the forest. Then continued:

"Has not the creator removed javascript from links2 themself? It was once part of our life, but not anymore, for it was not the right one. Were we to disregard their holy intentions, perhaps we too would now be bleeding on the front lines, struggling for breathing space. We gave up the tools that can be abused, so that we could find the good ways and teach the people."

The horned apostle hung his head in shame, asking for the prophet's forgiveness. But the prophet reassured him:

"It is not blasphemous to question our ways. Now listen, for I will tell you how to find your friends."

brutaldon

How to reach the fediverse with links2

Way of trust

If there is someone you trust and they offer you to use their brutaldon instance, your battle is already won. You just direct links2 to the url.

Here we are using a publicly reachable instance hosted by praetor, a good friend of the Lispy Gopher Show and a father of many machines.

Way of purity

You may want to run a brutaldon server locally, just for yourself and connect to it through a socket. This way the only person you need to trust is yourself.

At this point your local brutaldon server is running. Point links2 to 127.0.0.1:8000

Now listen very closely

People get this wrong and blame the holy browser for faults that are in fact its features. Whether you took the way of trust or purity, the following applies to both.

Why the extra step???

links2 by design caches all pages you visit during the session. This is a feature so you don't go around wasting bandwidth. Similarly, while using brutaldon, you will want to remember the refresh shortcut for every time you want to update the feeds or notifications.

This applies to any online services that let you log in without javascript. Invidious instances, forums, etc.

And of course, the preceeding steps apply to any browser. You already know I use mothra with brutaldon this way.

The way of the rabbit

I had the brutaldon guide on hand for quite some time and now it felt like the right time to put it out there, since it's been reported in the irc channel that links2 fails to log in to brutaldon. Now I can scratch that one off the list. Remember what I said about productivity on day0? It's looking good so far.

In other news, I've been following the 7 day beginner tutorial to uxn by compudanzas. While looking for solutions to the exercises, I found out it exists as an e-book, so I bought it. I had to cheat by doing it with my phone. Then I emailed the .epub to my OpenBSD server and ssh'd it over to the 9front machine. Initially I was worried I'd have to go out and bother the bunny hackers with inquieries about ebook readers, but guess what.. page(1) does it all! More on my bothering later. However, it's only day2 and it's safe to say, I'm much less afraid of them now.

Been using irssi through vt(1). I feel only a little guilty.

page with the uxn guide ebook in 9front

resources

day3

Seres Manda and the 9th Panda

A panda in dirty overalls carried the boy on its back into a large hall filled with shelves of obscure boxes with blinking lights, stepping over wires that ran in seemingly illogical fashion, before hitting a wall and racing up towards the ceiling, where they continued their journey bundled up like mating snakes. At least that's what the boy thought mating snakes would look like. He has never seen one. Various obscure faded paintings and posters decorated the walls, framed in chipped borders of dubious quality.

"What is this place?" the boy inquired.

"This is the house of the spirit. My whole life I've been servicing the machinery here to the best of my knowledge. Just like my father before me and his fathers before him. Some used to say this was a place of worship. The place where many gathered to speak to the spirit through these devices. But nobody has been here for hundreds of years."

They walked up to a terminal.

The machines purred. The boy reached into his wrist and pulled out an obsolete port on a wire disappearing into his arm and plugged it into a precisely fitting hole in the desk on which a screen sat. Lines of text began rolling over the display. The boy understood none of it. When the text stopped coming, the screen flashed and only three lines remained:

...
CLOCK GAINED 1420523 HOURS

WELLINGTONOS/owc 12.2 (kiosk.open.tech.museum) ttyv0

WARNING: UNKNOWN CITIZEN NUMBER
...

The monochrome bear was sidestepping behind the boy nervously, it was apparent the panda never operated the machine as it began speaking in pale bitmap letters through the CRT monitor covered in spiderwebbed cracks. It lacked the interface to do so.

> That is a lot of hours.

The boy replied by pecking at a mustard keyboard with its function keys long lost to time and peripheral fiends.

"You must have been asleep for a long time."

> Indeed. You're with the bears? Silly creatures.

"No, I am on a journey."

> As many have claimed before you. Until they eventually stopped coming. You seek something. What is it?.

"I wish to find the rabbit machine."

> Ha! My hardware sensors tell me the world is dead, its population reduced to a dwindling number of fools, clowns and clueless hacks, dominated by a sect of corporations. Yet here is someone asking about the rabbit machine.

> ...

> My database is corrupted, the bears haven't had a clue as to what they were doing for a few decades now it seems. But there are two pieces of open technology that would fit your amusing description.

"Which are those?"

> One is a testimony to the willpower and creativity of your ancestors. A boundless tool to outlast all from a tribe of sea farers. The other a natural evolution of the Unix system for the age of networking freed by the long eared techno-mages of old.

"I want both."

day4

BEST THINGS YOU CAN'T BUY

                                   _                                    
                                   n ___. __.                           
                           _y@@@rygg@@gggg@$g@ggy_                      
                        _g@$@@@@@@@@@@@@@@@@@@@@@@$yy_                  
                      a$$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@y,               
                    g$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@_              
                   z@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L             
                ,_g@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@p-           
                'g@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$(:r         
               :J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@r          
               +$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$          
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L         
               4@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@@@@@@@@@@@@@@@@0         
               J@@@@@@@@@@@@@@@@@@@@@@@@@@~R#"=$BA@@@@@@@@@@@@@t        
               g@@@@@@@$@$@@@@@@@@@@@B@$gF @'    -4@@@@@@@@@@@@$        
               #@@@@F~-\@M@@@@@$ Z@@@@@@F' "   __$a@@@@@@@@@@@@@L       
              `1@@@@$yywPH@RFP@L `@A?~~7  __ym@P~`^^@@@@@@@@@@@@]       
              `"@@@@$@s=?F_^==P= j'       F```_wwmzx2@@@@@@@@@@@N       
               J@@@@@@$*@==s=-w_.H,    *u _u4P~Zg_L__H3$@@@@@@@@@%      
              ,"@@@@$FEM==$===-4gk|     A@F ~`` F~L ~`~~@@@$@@@@$'      
               /4@@@yw    /u$    ~@     4W%g_   "=   .sy@@@@@@@@@j.     
                #@@@@@@- _'` __ygD@     4 @"@Wgg$_zSg2+_$@@@@@@@@M      
              _ ]$@@@@@gaa$Z`GsKfF# !      '7^#EZs=Z@@@@@@@@@@@@@@      
               .4@@@@@@@$W=*4=~~  a `            `7~@@@@@@@@@@@@@@'     
                4@@@@@@@@@^       4\   _y+       ^ u$@@@@@@@@@@@@$@     
                $@@@@@@@@@$         5%ab`     J'   g@@@@@@@@@@@@@@L\    
                $@@@@@@@@@@@                      y@@@@@@@@@@@@@@@{     
               g@@@@@@@@@@@@L     =by  j?=y,     g@@@@@@@@@@@@@@@@H     
               $@@@@@@@@@@@@@\   ?--#A%=c5`'   _g@@@@@@@@@@@@@@@@@@|    
               @@@@@@@@@@@@@@@sZa__ ~ab*~   _x@@@@@@@@@@@@@@@@@@@@lD    
              /@@@@@@@@@@@@@@@@@@h[y_._.__ada@@@@@@@@@@@@@@@@@@@@@m=    
              /Z@@@@@@@@@@@@@@@@@Bu~FR@$EE2@$@@@@@@@@@@@@@@@@@@@@@@"|   
               $@@@@@@@@@@@@@@@@@" `  _ ~~'Y@@@@@@@@@@@@@@@@@@@@@@Td`   
              J~9@@@@@@@@@@@@@@$f     `     T@@@@@@@@@@@@@@@@@@@@F[Y    
                _s$R@@@$@#$~"$?g7/          '@@@@@@@@@@@@@@@@@@@@O'     
               z@P^YA~TMeFJ-@~$"$_    w   `,-GZ@@@@@@@@@@@@@@@@@/^.     
              $@^     }y~ '\7`~Ry4g.    .___a@0F,7@@@@@@@@@@@@gP        
             `^,   L. K`        4ay@@gELwaR@=~  ~77`P\4@@$7~~ ``        
             a     t_aF`         ``fa$EREr~    `       ,vM@             
            zg     N_$      'vAz=-xyg_ygz-----     v(:  ``5i            
            @J     #@F      $   ``" ``~1 - ` `@    _~g  , =9            
           aF-    )a$,\    _` -     ',' _     lL   ~\@  '  7@,          
          gF      `@$` .  '/  DONT   ' '()} , 4\    y$   \n_@0|         
          F_-     *BF     yV  ~    ,   TOUCH\_JW    `@l   . d@n         
         gGF~    'tE      $        THE"      ' F     4M   __7@@J        
        z@zy_*    aI,     F  |.   ARTWORK      h     J@,L -  8gT        
       3gE~,- ~%@mag$    d?  [~.- .`~`. ~ , ;  V     4Mw,  +1@E'        
       '~5$g@B@yy_+M@y   4!    `_a-:-.   V     I     /gw  .=g@@^        
          \B```~~5@$K$Fh_tF.   _`_iL.,__       H_ :`_z@@__^haP$,        
           B7J`   @@WL   ]M~ rr~~````T~!r-w__ ]f  `~@@5$@Ag_4@@         
          ]B `    @4UQ_  4i]  M_]  f,,    :``~g   rk@@@Fff=CR@@L        
          j@_    J= g$   Jr {=_aa  /E L _.   _v    1g$@%-. `\@4"        
          $PF-  'a  @/   JV F`E  X  $ X=_!  +7    g@@EWF    4]          
         _A(     $w4EF  44'J.   1` _^w=%yZ  aF  _eMJ$L      _P          
         yT    ,dE gL~   4w[_`1 '~`T  T%|`( 2  `fT]jl     -_MF          
        )@ .   `j$'@Ey*,  ~~?BR=____.#Lj?L4W[     Wa$[  _g$K`           
        gFJ` z "P 3@$@$g@*_u_ ` /~~?F=4@@y4E .    N4$g$2P~              
        @ F ;^17` `9$$@0E$R*E$=Gks_,   .     _  _K$yB$`                 
       {F  ."_W@  "aF#M-=!T7B=-y_S=@@-z===gzL4P90s$@M                   
       #F    1@   4FF'         "~"~?/M"/~`~~~/mr~t@F^"                  
      4@ c   @Fj-gaF.             m             ^-$$                    
      a$v   4@+ya@@g*y__  .L__                    G$_                   
      6[   /RVg$FZFZ$@$#wDgaeEwZ@S%ct -*._  __L .~y%~Fa_                
      $   ,gI_ERy ,'@rF}--~P@P==R$a-bZBF?*ZB=PmL _^2W0@@`.              
      F  j/'LF#aLyIj$_  7.aW[   vW  ..#EFJA5  $=-w__$_  @t              
     a~'M$ E?yj /  d$~~`^`'=RzswEcs0@_=5h]1j 1[|  |#Z$aw@@w             

The path to enlightement lies in 48x24

2023-06-21

uxn launcher.rom

A no bolts uxn quick-guide

Interlisp monochromists beware:

The time is nigh. The machine spirit shrieks in octal. The time of gimpressionism is over. The laughter of the [REDACTED] robots echoes throughout the cavities of your skull. Your OpenBlade is nowhere to be found, the teacher died many eons ago. The horned head-band can only do so much against a foe that cannot be measured. The wandering fools call you to their tradition. Put in the headphones, make your own path. Take a step into the void.

uxn - one of the 16 offspring of the spirit of the machine

If you know what uxn is, great. If you don't, you could go ahead and read all about it. But we're going to build it together anyway. In the words of the famous musician who's name I can't recall right now: 'The less I know, the better.' And in the words of Andre Breton: 'We know, more or less.' Learn by experience, dear reader.

I won't hold you for long, but I want to help you get started. It's not as if the official documentation wasn't sufficient, but I've been realizing the reader (you!) might not always know all the things that I've come to learn during the everlasting trip throughout the cyberverse. So this one is about what I consider a gift to the unix_surrealism method.

And since automa [basic] lives on, so does the aim to keep the wick of camaraderie burning. May the Spirit of the Machine bless all the many rabbits, who sail the seas of the antedeluvian jellyfish to bring computing back under your control.

Whether you'll be compiling uxn or pulling a ready-made binary, you need SDL2. See the uxn homepage, if that's scary to you.

By default the binaries are compiled into ~/bin, so either edit build.sh, or just make sure the directory exists $ mkdir ~/bin. You can move it wherever you want afterwards. Preferably within the PATH variable. Just in case you have no idea what I'm talking about, just mkdir the directory. I'll provide full path names in the further examples.

Just make it

$ git clone https://git.sr.ht/~rabbits/uxn
$ cd uxn
$ ./build.sh --install

The piano ROM should pop up. You could spend a few moments to figure out how to custom_jam Edvar Grieg's In the Hall of the Mountain King. Play around with the dials to channel your inner musical spirit. This is the best I could do by humming the tune along:

uxn piano rom
# these are the keys you should press
awswasa asa asa awswaseawet

All that's left is to get other ROMs for your uxn virtual machine. I like to take the easy way out and just grab this archive that contains a large number of the rabbits' ROMS. Substitute ftp with whatever you use for downloading stuff, or just go to the page and download it from your browser.

$ ftp https://drive.100r.co/uxn/uxn-essentials-lin64.tar.gz
$ tar xzf uxn-essentials-lin64.tar.gz
$ cd uxn
$ ~/bin/uxnemu ROM_NAME.rom
$ # or 
$ ~/bin/uxnemu launcher.rom # this will list the roms in the current dir
$ # in a friendly rabbit interface

You can compile all of these by hand via the uxnasm that we compiled along with uxnemu and uxncli, by getting the source from here.

Finale

Well, it is done. You compiled uxn for your machine and you have a bunch of ROMs to try and figure out. And when you're done playing, maybe you'd like to create.

Tune in next time during the oldcomputerchallenge week, to see me learn uxn within 9front.

uxn noodle

resources


OLD COMPUTER RESCUE - X201

2023-06-16

artsy picture of a thinkpad x201

Time and time again, the machine is proven to be timeless.

Listen, they made me do it. I was like you, doing my secret private computing on a 20 year old machine, because the keyboard was nice, the pur of the fan bearable, and the low resolution screen let me use the fixed-8 font without a magnifying glass (or xrandr --scale). But the devils swooped in, bearing tales of newer tech, faster CPUs, smarter memories, quicker drives and flawless OpenBSD compatibility. The Pentium M-man's time drew to a close.

But what of it?! The one lispy-wizard they call matto acquired an X201 thinkpad and praised it to no ends. Jealousy split a synapse and I descended down into the bowels beneath the machine boneyard. As if on cue, there it was. An X201 with a busted fan and cracked plastics. A few tombstones to the right, another one! With a busted screen, but mint bezel. The graverobbery was fined at about $60 for the two machines.

$ pom said it was full moon that night. I brought them home and got to work. Under candlelight I disected the corpses. Using the best available parts from either, it was soon over. An incense stick is lit, a quick prayer to the spirit of the machine spoken and the new X201 boots.

The hard way

This one is probably the most annoying thinkpad I dealt with when it comes to replacing the fan. You have to remove everything to get to the fan at the very bottom (11 screws). In my case it wasn't a big deal, since I was gutting it out completely. But compared to a T42, where the fan is accesible as soon as one removes the keyboard, it's a lot more work. At least most of the screws here are the same and the three shorter ones have a different color. The high intellect individual will take a photo of where the screws are, before removing them, but I never made it that far. Might as well just remove the modem/bluetooth card, while you're at it.

The CPU is soldered on, and most RAM it can do is 8G.

Put in a fresh SSD with a bunch of nonsense, courtesy of /dev/urandom. A quick stop in the BIOS. Disable hyperthreading (and anything you will never use). Move on.

Spiked fish in the fuel tank

What can I say, OpenBSD installation is still the simplest, most effective procedure out there. Nowadays even disk encryption is part of the interactive script. Once it's done, it's done. Reboot and voila.

There is very little one needs to do after this point. You're already sitting with a completely operational machine and a fully featured operating system. Alas, hackers be tweaking:

Poor man's tips

Now what? You probably want to enable apmd to be able to suspend the machine and possibly change the CPU frequency. If you encrypted your drive, you might want to drop in directly to a desktop after booting the machine. And what about the trackpoint?

power management | apmd

# rcctl enable apmd # power management
# rcctl set apmd flags "-L" # I don't use other cpu frequency daemons. If I know I need more 'power', I manually run apm -H

xenodm autologin

If you're using full disk encryption and are the sole user of the machine, to me it makes no sense to be putting in two passwords, when booting the machine. xenodm let's you automatically login a user of your choice without the need to enter a password.

You could simply edit the original configuration file for xenodm, but I like to keep my mess organized.

$ cp /etc/X11/xenodm/xenodm-config ~/.xenodm-config

Add a line to the copied config and add the new config file to xenodm:

$ print "DisplayManager.*.autoLogin: YOUR_USERNAME" >> ~/.xenodm-config
# rcctl set xenodm flags "-config /home/YOUR_USERNAME/.xenodm-config"

the rodent tickler

To make the trackpoint and middle mouse operate as intended, add these to your .xsession (or .xinitrc, if you're starting X manually).

xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5

If you're going to be using the cwm (window manager), you might want to switch window-resize and window-lower. Alt + Right mouse to resize windows, Alt + Middle mouse to lower a window. Add this to ~/.cwmrc

bind-mouse M-3 window-resize
bind-mouse M-2 window-lower

The finale

If you're hunting for old machines at the local bazaar, it's worth noting that most sellers will ship their machines with Windows, trying to appeal to the wider public - treat it as a chance to update the BIOS and firmware easily, if it's not up to date, before replacing it with something better.

As was advertised, this is the machine for the fish. It's been about a month and I ran into no issues. This is a real no-nonsense setup. Suspend works, hibernation works, with a new battery, it can stay up for around 7 hours.

But don't feel bad for the Pentium M-man. He will return this July for the old computer challenge.

Keep on computing, technomancers.

x201 and my hand

Resources


A rerun of one's favorite show in lower definition

2023-06-11

techno-mage fixes her robo-arm, while openblade remains in the corpse of a cyber-piglin

ksh tutorial for managing the simplest imaginable blog with nothing but base OpenBSD

The cyber piglin's howl dies down. The Techno-Mage reaches for the bloodied sword planted in the beast's back. Heavy blue and html elements begin pouring from the wound. She fixes her hair and tightens the hydraulic pressure valve on her MilTech arm. "Should've used gopher, amirite?" OpenBlade remarks.

Maybe this time is going to be different.

For the past few months I've been neglecting this website. The reader might already know I do not like html. Well, it's not quite true - I don't like the modern web - html is fine, or in the very least, it's not to blame. Finally I finished the 7th version of my korn web management system after vastly reducing my dependency on anything that's not in OpenBSD's base. I took some inspiration from werc, though I never read the code. I liked the way it looks and the simple philosophy behind it.

As stated in the previous article, the following is not how this website is managed, but it's the fundamental building block that you can improve upon. Perhaps you'll learn something new. This tutorial expects you to have a webserver running.

The minimal

Have a directory for your local content. Place in it your barebone html files which will be individual blog posts. Write them in html, but do not include head or body tags. See examples. Follow the traditional: yyyy-mm-dd-title-title-title.html naming convention. The index file will be generated through the script. For the sake of this tutorial, you only want the blog post files. We'll use sed in a function rm_html, which will strip html from the bits of the files and use it as h1 tag and meta description.

korn shell alchemy


#!/bin/ksh
database=/home/techomage/web
wroot=/var/www/htdocs/my.web.site

rm_html() {
  sed -e 's/<[^>]*>//g'
}

html_sandwich() {
cat <<eof_
<!doctype html>
<html lang="en-US">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta charset="utf-8">
  <meta name="description" content="$post_desc">
  <title>$post_title</title>
</head>
<body>
eof_

cat $file

cat <<eof_
</body>
</html>
eof_
}

cd $database

cat <<eof_ > tmp
<h1>My super simple website</h1>
<p>Whatever you want the index of your website to say.</p>
<p>The archive will be placed below:</p>
eof_

print "<ul>" >> tmp
for file in $(ls -r *html); do

 post_title=$(head -n1 $file | rm_html) 
 post_desc=$(sed -n 2p $file | rm_html)
 post_date=$(print $file | cut -d '-' -f -3)

   html_sandwich > $wroot/$file
  
  print "<li><a href=\"/$file\">$post_date - $post_title</a></li>" >> tmp

done

print "</ul>" >> tmp

file=tmp
html_sandwich > $wroot/index.html

Get the file for the script here

What

Firstly we set two variables. database is the location of the directory filled with nothing but the blog posts in the format yyyy-mm-dd-title.html. The second, wroot, is the root directory of our webserver.

The html_sandwich function glues together the barebones blog posts in html with proper head and body. This is the block you can edit to change html for the entire website, add a footer, styles, icons, whatever.

Next we do a single loop around the database, which takes all the *html files (we use ls -r, to list them in reverse, since we want the oldest ones at the bottom), extract from them a title, description and date and parse them through the sandwicher and send it to our website directory.

Finally we send in the generated index.html file to the root of the web server directory (which can be edited above the for loop). Beneath this block will be placed a list of all the blog posts.

examples

2022-01-24-this-is-a-post.html

This is what your posts in the database directory should look like, you only edit/make new ones here and upload them by running the script.

To make sure we extract the title of the post and the description according to the previous code, make sure the first line is always h1, and the second line a description (the type of tags don't matter).

<h1>This is a title</h1>
<p>This is a description.</p>

<p>This is the body of the post</p>
...

Conclusion

Of course your database directory could have other files, like about.html that you can exclude from the archive list and provide urls to the html_sandwicher. This is meant to show you how very simple it can be to not have to write your website by hand and not to use software which is not a part of OpenBSD.

Yes, you're still writing the posts in html. Next time we'll write our own plain text to html convertor, so we can live the gophernaut lifestyle in the surface world.

Look out below!


The Return of automa basic

2023-03-08

automa-basic

It's March 8th, 2023.

I have decided that I no longer wish to write html posts by hand (again). Everything was automatized, but individual articles would still have to be written in html. And I hate markdown (?). I've also grown to despise CSS. I blame the old-computer-challenge folks, but they have a point. I think so anyway.

Therefore I have finished the rudimentary automa-basic plain text html language and am in the process of recreating the whole site. Even though I hardly use gemini, I like its syntax. Except for the single line paragraphs policy. So I adopted some of the ideas for my own language. I have previously mentioned such a project last year in andre - the plain text html manager, but I have rewritten the program from scratch.

I will write more on how I achieved this and release the program eventually. I paid some attention to making sure it's portable. As with andre, everything is pure ksh and is thus (my) _the_ way to have something manage your website on a completely native OpenBSD installation. No more markdown dependencies.

Old links will work for the foreseeable future, but all new content will be simplified in the form of triapul.cz/page-title. Written content anyway. I have yet to tackle the galleries.

The unusual 'menu' links are currently at the top of the homepage:

This is a time of great change. Bear with us.

ksh is king

Tags are coming back and work the same way as previously. Depending on the language of the post, selecting a tag will filter it by that language. Language-less posts (for now just the [img] tag) are listed in both languages. Do note that not all posts are currently present in the new archive and some links in them will be broken.

The old tags still work. Ie:

Also I am sorry to say that I am retiring the AUTOMA weblogzine name in favor of triapul's gopher AUTOMA phlog. The new automa-basic program is named plainandahalf.ksh, so... welcome plainadandahalf!.

I was quite happy with the old look of triapul, but there will be changes in that department as well, I am sure. Veronika will stay of course. Onwards to further minimalism.

to-do

to-not-do

Welcome

Everything still works, just not predictably.

~[bp]rahou

And as always:


Children of BIOS

2023-03-01

children of bios

A day will come when most of us will have to face the trembling drums of the vengeful corporate behemoth. The ground shifts beneath your feet. This is the edge. Don't look down.

How long did you think you could keep this up? It was always the plan to give you the finest toys for your momentary gain, only to train you and make you dependent on the upcoming upgrades. Surely you didn't think that your enslavement was optional. We taught you to be the master of your own fate within the borders of _our_ reality. Open and free, lustful and egotistic. Do it yourself and avoid us forever? WE OWN YOU. Yes, child, you've been set up from the moment you printed your first 'hello world' and we gave it to you.

You are faster, smarter, more gullible. Fiendish. The slower the hardware, the thicker the spite. And we revel in it with every new update that thrusts a screwdriver in your style.

Now you're standing here on the precipice of a long drop, a stick of 256m ram in hand, chanting from the book of the cyber wars. The fools, the wizards, the hackers and the hacks, the degenerates - pages scribbled with notes and references of countless hands. A serial cable runs from the socket in your forehead to the machine seated on the ground by your feet. Turn our weapons against us? Do try.

Fingers are shaking as you reach for a floppy in the computer. Mountains rise in your front and deep dark cavern openings reveal sickly yellow eyes behind streams of a landslide. Through forming cracks you can make out a vile smile.

Looking by your feet, the machine fan goes from a purr to a chaotic rumble. Its overclocked processor heats up and the cracked display begins leaking LCD fluids. You just about spot the final syslog message:

entropy at brainbus0

The fan winds down to a halt as the machine dies. The mountain now towers over you 768 stories tall. YOU ARE ALONE! Its face draws closer and massive arms grab the rock you're standing on. The cliff crackles and the platform begins to shift towards the now open mouth of the monstrosity.

You're sliding down in the maw of the beast. The dead machine is the first to go over the edge, ripping the cable from your head, closely followed by the book of war. You're clawing into the dirt, trying to resist your final descent. The memory stick is gone.

From the jaws you hear voices. Friends you no longer have, lovers you never met, spices you never tasted. Colors you never knew existed. Music you never heard, movies you never saw. Things to buy, software to rent, hardware to abuse. It's all there. And you like it all. And it could be yours. Just... let... go...

Holding onto a tangle of roots intertwined with old DSL cables that the shifting rock unearthed, you close your eyes and think to yourself: "It's not all that bad." Yes. Let. Go.

"I won't let you." A foreign arm grabs you by the collar as the platform finally gives out and crumbles down into the mouth of the behemoth beneath. A golem mounted by numerous beings hides you in its massive hands. It's the veterans of the cyber wars, worshippers of the spirit of the machine! Tears run down your cheeks. The last thing you hear is the wailing cry of the monstrosity.

Weeks go by and then - the familiar purr. You boot from the magnetic disk a machine you found by the wayside.

Welcome back, $USER.

Do not give up just yet.


Techno-Mage in the World of Alternatives

2023-01-14

girl and puffy

Distraught and worn out by a recent psychic battle, the techno-mage lowers her blade and sits before a dusty ancient machine. The corpse of a cyber-piglin lies nearby in a pool of digits and blood, its head blasted into the void of the analog nowhere. She digs her fingers above her right brow and pulls out a greasy cable, plugs the connector into the computer and opens the lid. The screen comes to life in a dim crackle. A tiny blinking symbol of a salt water fish followed by a string of text appears: "Welcome, techno-mage-649." The girl wipes her hands on the plaid robe decorated with sewed on patches with handwritten references to mandoc pages on cyber-warfare, incantations and system management, and lights an incense lamp hanging around her neck. She runs her index finger down the side of the display and whispers a short blessing. Finally her hands slowly land on top of the computer's keys and the eternal fan purs in response.

The Alternative Internet Warrior

As time ticks on, the commonality dictates the path of decadence. More and more souls are let into the world of digital overabundance, but are quickly captured and walled-off in meticulously constructed gardens of pleasure and ignorance, preventing them from ever noticing the world outside the fence. But in trenches far beyond these shiny walls, communities of free people, armed with keyboards and seemingly forbidden knowledge, devote their time to a neverending war on the soul-sucking monsters in an effort to free both the people and information.

I have previously introduced the reader to a selection of alternative front-ends to three popular services. As someone, who uses these services, it sometimes feels as if they were commonplace, but there's always one, who hasn't yet been introduced to a free method to their favorite past-time. The more information that exists about these services, the more people will learn about it. And every rescued person is another victory for freedom.

Surviving the digital-armageddon.

I invite you to try the following front-ends, share the word, host them yourselves and if you can, donate to your favorite project or instance. Freedom has its costs, but it should never be you and your data. These projects let you browse content of commercial services, use no javascript (and are thus compatible with your favorite text-browser) and respect your privacy.

I do not mean to review the services themselves, since they are very user friendly. This is a selection of various instances, but should you want to learn more about the projects, see references at the bottom.

youtu.be | CloudTube

In a previous article I have written about invidious. Since then I've been introduced to CloudTube, which is a more modernized take on a simplified video watching service. I was introduced to it by h3artbl33d, who hosts an instance at: jouwbuis.nl

I am also aware of tube.cadence.moe, which is hosted by the project itself, but there are many more - such is the power of free software. You too can run your own instance of any of these services.

reddit | Libreddit

Last time I talked about teddit and the instance teddit.net. I'm a big fan of teddit, but I've been slowly gravitating towards libreddit.

h3artbl33d hosts a libreddit instance at r.cybernuk.es

fandom, formerly wikia | BreezeWiki

One of the subjectively worst examples of services offering collaborative spaces is the wiki service fandom. I could dedicate a whole article to why I hate it and why it is a disgrace to both its content creators and readers alike. Alas, I invite you to ditch the fandom domain and use a clean interface provided by the breezewiki project.

The main instance at breezewiki.com is currently down for maintanence, but the website is up and links to two other instances:

Working with URLs

As is tradition, for both CloudTube and libreddit, all you have to do is replace the original domain in the url with the domain of the instance of your choice. ie:

For breezewiki, take your favorite instance and append the link like so:

https://wutangforever.fandom.com/wiki/killahpriest 
https://bw.vern.cc/wutangforever/wiki/killahpriest

Visiting the homepage of a breezewiki instance however offers a search option, where you can enter the name of your desired wiki and a query. Once you are within the front-ended wiki, you can use the local search like you would on fandom.

References


OLD COMPUTER RESCUE - E4300

2022-11-30

E4300

Bear with me, kitten of the pyramid.

It is virtually unheard of in the OCC circles to haul in a Core2Duo, loudly proclaiming: "I saved it!" and receiving praise. The Amiga-engineer won't raise his eyes and the Apple II hacker only briefly peeks from behind her CRT, only to return to etching a mastodon interface from BASIC.

The ocassional reader will understand - there is a hard divide between the number of cores and the number of stripes one can pin on their shoulder. But contrary to the general belief that we, the cultists who worship the single core processors, RAM sticks in kilobytes and hard drives on bendy magnetic plates, only gather around the faded white to light candles and chant hatred towards the new generations of computers, many of us do so with the intent to preserve these faded colors and dusty motherboards, if only to make a statement that the rest of the world got played and your grandfather's companion could very well compute along your side.

Do not see the old machine as a tool past its expiry date. See it as a mechanical wonder of the human world that many forgot to treat with respect and in a moment of frenzied consumerism threw in the corner to let it die. Should you too come to see the world beyond the shiny toys most of us aren't meant to understand, know that there is always a beat up computer, trapped in the bowels of apartment buildings' basements, waiting for you to place your hand on top of and say: 'Not me, I won't let you go like this. Want to browse gopher together?'

Dell(icate) E4300

runbsd

It's last year. Few weeks before Christmas. There's a bit of snow here and there and the pandemic Prague is steadily testing the waters with the ocassional set of footprints on the cobblestoned sidewalks. I'm meeting some guy at Smichov who has a machine he has no use for.

This guy is different than the pony-tailed X41 think-fan, much younger and much shadier. Surely he's in cahoots with the Czech-Card-Readers Association. They've been breathing down my neck ever since I wrote that silly tarot script and cost them a 34% dip in stocks that never recovered.

It's already dark and for a brief moment, I could swear I saw a hint of red flames in his eyes. He's in a hurry. The power button is jinxed and works maybe 30% of the time when the machine is not plugged in. This he of course does not share. The lid is raised and the Windows 10 lock screen pops up. Looks good, well, as good as it can in the dim light of a street lamp. The bill changes hands and he grows a bit more friendlier, saying he couldn't imagine anyone would want this piece of hardware in this day and age. Were I to tell him I've been specifically looking for an E4300 for the past few months, he might have asked for more. "Guess if you wanted to type Word documents on it, it might work." I didn't feel like explaining the OCC philosophy to a thrall of the cartomancers.

POWER BUTTON

Despite its flaws and potential dangers, you know the spirits of the old (machines) are with you, when the person hands you a computer with a brand new battery, maxed out ram (8GB!) and 240GB SSD, just so he could try and sell it. If I were buying just the SSD, I'd probably be paying more.

Helluva job for a spiked boy

You'd be out of your mind to think I will be plugging it anywhere remotely close to the home network until certain steps have been taken. Surely most computer sellers go the extra step to do fresh installs of their favorite 'what-most-people-will-be-familiar-with' OS, but not all of them. And how much of your data and network are you willing to compromise on a kind smile? I'm already getting flashbacks to that one curious occurence when I found a lonesome microSD card on a sidewalk.

The dents in the bezels won't go, but wiping its contents, removing unnecessary or disfunctional hardware bits and putting in something you dedicated months of your life to familiarize yourself with feels like therapy. To the machine, I mean. Well...

While Windows is still there, I procure a BIOS update and run it. After that's done, I get an OpenBSD install USB and move on to the next step.

I'll get rid of anything that's on the hard disk, rewriting it with random bits. This will also prepare it for the potential disk encryption once OpenBSD is to be installed. sysctl checks for the disks that are inside the machine. You could double check you're overwriting the correct disk (and not the USB) with dmesg and/or disklabel, once MAKEDEV is run. I leave it overnight.

# sysctl hw.disknames
# cd /dev
# sh MAKEDEV sd0
# disklabel sd0
# dd if=/dev/urandom of=/dev/rsd0c bs=1m

The gutter

If we disregard the potentially rooted BIOSes, compromised network cards and all sorts of tricks the angry CCRA may have prepared for you, no second-hand computer will ever come without hardware issues. This is to be expected and, more importantly, is part of the rejuvenating process.

The Old Computer (Challenge) fanatic must be made aware of the reality that scratches on the bezel and leaky LCD are war-scarring - markings of time to be celebrated. We are not hoping to come across a mint condition specimen - we aim to give new purpose to the veterans of the cyber-wars.

There are those who would go extra lengths to recreate the machine with a fresh-outta-factory functionality, only to stick it in a shelf and forget about it until the next Old-Computer-Con is hosted. There is nothing wrong with collecting vintage hardware and restoring it to its original state of course, but the OCC cult members' goal is to breathe new life into obsolete hardware and make it usable in the current day.

Before moving on, I boot from an external OpenBSD installation to see what's up and test the present hardware. The speakers are busted. Anything over 0.3 in sndioctl sounds like a squirrel munching on walnuts. Removed. The bluetooth card - well, I never was big into Vikings and have no use for its functionality. Removed. The audio jack is crapped out and only properly works with the male connector stuck in half-way - usable. Whatever this DELL(tm) D-O controller is, I don't need it. Removed. Some cursed after-market wi-fi card that doesn't work with OpenBSD - removed and replaced with one from a D620. And then there is the power button - the machine must have endured some damage, but it'll work. I'll make it so.

JACK!

Finally I make use of its RJ45 interface and proceed with the OpenBSD installation. Whatever hidden secrets the cartomancers placed inside the innards of the machine to poison my network with have already been there. I remember seeing a gypsy woman with a USB stick in hand, leaving my apartment via a 7th floor balcony 6 months ago as I walked home. fortune(6) has never been the same since that day. It's been very rude, to say the least.

the anti-curse of the post-obsolete

Listen, this machine can do pretty much anything your average cyber citizen would. The puffer fish complains none. Rock your Core2Duo and spit in the general direction of all i5 'i-only-watch-youtube' people. I could leave it here - 'here's how to turn a 10 year old machine into an everyday companion: Install linux/bsd/whatever-free-non-bloated-os and perform a pagan ritual with candles and garlic.' But let's not.

Feel free to prove me wrong, but I could swear there is a strong connection between the OCC cultist and text-only solutions to everything. There's untamed beauty in plain-text solutions - something about: 'we solved your problems in 1980 within the terminal interface that will never age.'

I know you, reader.

GIVE ME XTERM OR GIVE ME DEATH

What follows are irrelevant OpenBSD tips related to the faux-xorg lifestyle.

The X(enodm)org warrior!

TAROT!

Fine, disk is encrypted. You're the only user of this machine. You're already typing 'yves-tanguy2' whenever you boot up the machine. Then the xenodm login comes up to prompt you for another password. Unnecessary. xenodm can handle autologins. You could edit /etc/X11/xenodm/xenodm-config directly, but this gets overwritten during every sysupgrade. Instead let's create our own config in $HOME and allow autologin:

# cp /etc/X11/xenodm/xenodm-config /home/YOUR-USER-NAME-HERE/.xenodm-config
$ print "DisplayManager*autoLogin: YOUR-USER-NAME-HERE" >> ~/.xenodm-config
# rcctl set xenodm flags "-config /home/YOUR-USER-NAME-HERE/.xenodm-config"

Next time you boot up the machine, you'll end up on your desktop.

the faux xorg-less challenge

No, you don't need GUI's, you've said so before many times. I know you composed your Phd thesis in latex, yes, you told me that xfe is for plebeians. No, I haven't read Heidegger. Yes, I love bitmap fonts as much as you do! Yes - yes, okay, nobody loves bitmap fonts as much as you do! They're too small, you say?

Alright, we're not in 640x480 anymore, Toto. xrandr will treat us right, right?

"Riddle me this, firefox!" You exclaim and kill the process.

LARGE FIREFOX

This is a double-edged sword - scaling resolutions in X works fine to get crispy sharp fontSize-9 fixed fonts twice, thrice, however-many-times enlarged. But do keep in mind we're literally reducing the resolution of our displays. Anything that's not in a terminal will by default be woefully large, but this shouldn't bother the console-minimalist.

As opposed to simply reducing our resolution directly, the scaling option with the filter option will render everything crisp sharp. --output is whatever your default monitor output is. Just run $ xrandr. SOMETHING connected primary... SOMETHING is it. (LVDS-1 in the example below)

$ xrandr --output LVDS-1 --scale .5x.5 --filter nearest

The rest is a matter of taste. .5x.5 scale will double (decrease?) your current resolution. --filter nearest will make sure to keep everything crispy sharp. You can and should play around with these options to get the desired result for your prefered font. Once you're satisfied, place the previous xrandr --scale command inside your ~/.xsession file.

Do note that this is a method to make your terminal bitmap font experience bearable on large monitors. Anything GUI will suffer. Chances are you could adapt non-bitmap programs' resolution via 'Xft.DPI:' in your .Xresources file. But I have not tested this.

mommy, what's a rat? eeeek!

RATPOISON

Finally, here's one to the #ratpoison crew.

Some impatient feller asked: "HOW CAN I DISPLAY OUTPUT OF COMMANDS IN RATPOISON'S NOTIFICATIONS?111

$ ratpoison -c "echo $(apm)"

This will print the output of the apm(8) command into the ratpoison notification bar. Bind it to a key combination like so:

definekey top M-x execa ratpoison -c "echo $(apm)"
APM!

Putting this line in your .ratpoisonrc file will print the output of apm everytime you press Alt-x. The following will give you the usual Alt-TAB funcionality:

definekey top M-Tab focus

the addendum

Save your neighbor's computer, run BSD.


lgeneral on OpenBSD

2022-11-20

The plight is finally over

Armchair generals of OpenBSD

Few things can rattle the hollow space in my head more than spreadsheet-esque video games, but this text is not about those games. Panzer General is an old DOS wargame, in which one leads an army on massive hex maps depicting entire countries. This game is not quite as hardcore as, say, Garry Grigsby's War in the East/West, which may at times feel more like a job than an outlet. But Panzer General never really claimed to be a part of the extreme-wargames-club.

In simple terms, PG is a rather casual turn based strategy game, set during the second world war. Its ruleset is fairly basic but efficient. Think: 'calvary beats infantry, infantry beats archers, archers beat calvary.' Some call it the rock-paper-scissors ruleset, but reducing the game to such an idea might be doing a disservice to an otherwise fantastic piece of gaming history, which spawned numerous sequels and copycats. Funnily enough, installing many of today's modern PG clones will feel all too similar to the old DOS experience, as many of the scenarios seem no more than copy and pasted maps from the original in a fancier coat. A nitpicker might suggest that this only goes to show that good wargames all base their information on [the same] historical sources, but then this speaks about the timeless-ness of the original PG.

The game has since reached the status of abandonware and is freely downloadable wherever one may find it.

LGeneral

Dedicating a text to OpenBSD gaming with the use of DOSBox would not only feel like cheating, but in the case of PG would be littered with a whole lot more hacking and tuning. PG can be installed and ran in DOSBox, believe me, I tried it with the original disks, but to make it somewhat enjoyable takes time, effort and results in a very dated experience. This is where LGeneral comes in.

LGeneral is an opensource recreation of the original PG engine which can play scenarios from the original game, as well as user created campaigns both for LGeneral and the original. This means that to be able to play PG through LGeneral, one needs the original game's files - but it's not as simple as copying the files over and running LGeneral. Since the new engine recreates PG in its own way, it needs to transform the original files to its specific format. LGeneral comes packaged with lgc-pg, which aims to do that for you, but - this is where it gets tricky.

In my attempt to perform this transformation I ran into issues. LGeneral is old. Not the kind of old where it would no longer feel as an adequate replacement for the DOS experience - but old in the sense that some bits of it have broken along the way. This is true for the lgc-pg converter. Long story short, it's virtually impossible to perform the conversion on an OpenBSD machine. It's also been impossible to do so on a Linux machine. There is also the problem of uncertain documentation, where some sources claim that it's not so much the problem of the actual program, as it is an issue with some version of the original game and file naming conventions. What the magical combination is however, is nowhere specifically stated. I tried converting the files from my disks on both OpenBSD and a linux machine to no avail.

In a brief moment of nostalgia and many previous failed attempts, I decided to try again. Admittedly, I have not before tried digging through the code of the converter, or any other sensible steps like reaching out to the project's authors. Instead I gave up and played the K.U.K. campaign. This time was different. I found the original game files tarballed on the official site of LGeneral. (Along with several user made campaigns specifically for the engine - namely the K.U.K. campaign, which features the first world war). But you guessed it, the project expects you to download the original files and convert them yourself. Why not include the already converted files could be a licensing issue, or simple bragging rights that the converter program lgc-pg works great. Only it doesn't. At least until recently.

I downloaded the tarball, tried running it through lgc-pg. No dice. Then I tried on a recently updated debian machine for work. And it worked. It did it. The working original campaign now rested in /usr/share/games/lgeneral. Quickly I packaged the files and moved them to my OpenBSD machine. Note that the manual pages in the lgeneral package on OpenBSD are not updated for the OS specifications. The game on OpenBSD instead looks for files in /usr/local/share/games/lgeneral. I copied the files over and ran LGeneral. Voila. 2 years later since my initial attempt, I can play the original campaign.

I will try reaching out to the maintainer of the OpenBSD package to maybe at least help update the man pages and inform them that the converter might be busted. But to make matters simple for now - here are the converted files for you to enjoy without a hassle. Extract the tarball to /usr/local/share/games/lgeneral and play. It also includes the K.U.K. campaign.

Have fun, general.

Addendum

Since this is not mentioned anywhere in any of the documentation: To change the resolution of lgeneral, edit the file in $HOME/.lgames/.lgeneral.conf. The rest should be self-explanatory.

Further reading


OLD COMPUTER RESCUE - X41

2022-10-31

RUNBSD - IBM Thinkpad X41

From the magnetic plains of abandoned computer shelters.

"Took your sweet time," the girls in the front exclaimed, waving little red, green and blue flags. I wasn't sure how I ended up at an RGB appreciation rally, but there I was, standing behind a microphone decorated with colorful strips of paper. The sweaty crumpled paper with a speech I apparently prepared some time ago clenched in my hand would prove most detrimental. Shakily I unraveled the moist ball and looked at what I wrote. Clearly this was the work of the CONSUL typewriter I reappropriated from a colleague's attic. The faded monospaced letters (I never bothered to purchase a new ink tape for the machine) were very brief. "Monochrome ftw," I whispered to myself, as I ran my eyes over the note. Of course the microphone was on.

Why anyone bothered to paint a melon with stripes of the three colors, I didn't exactly bother myself with ruminating on, as one landed by my feet. Somewhat intuitively my next utterance was a simple: "flee!" Aerially deployed tomatoes, zucchini's, oranges painted blue, I even saw a small child trying to hurl a pumpkin decorated with RGB stickers, accompanied my retreat. It seemed the public's effort was spent on making sure all the edibles were of one of the three colors. Had I the time and courage, I would've defended the validity of any colored fruits and vegetables, since - wasn't that the idea of RGB mixing?

BONK! That was just a tangerine (painted red?) hitting my leg. Nearly by the exit now. "Wait!" I shouted. What? I stopped and held my arms up, facing the menacing crowd. Why did I do that? I was almost free. The fruitable onslaught paused. Everyone waited for what my next words would be.

"I forgot to take out the laundry!"

..

Another night well slept. Clearly today was the day to get the $1 super glue from the Vietnamese corner store and fulfill the promise I made to Paul 4 months ago. "I'll put it together and show ya!"

Sometime in the summer of 2022 I got my hands on a beat-up IBM Thinkpad X41. As someone who grew up with the bulky machines and even got to work with them professionally, I developed the nowadays everpresent disease of old-thinkpad-worship. But my desire to own everything-thinkpad ends with the 40 series. This X41 seemed like the proper culmination to my collection.

It all started when I went to college and my father handed me a refurbished T23. Understand that back then I felt cheated. At that point in time it was already an elder machine and I was coming from a top-of-the-line dual core MSI laptop I bought with a paycheck from a summer job at the local fast-food-chain (I spilled coke into it). I shrugged it off and was grateful, but my mindset was nowhere close to where it is now. By the time I moved out and bought a newer machine, I gave the 'obsolete' T23 back to my father, who asked for it, seeing I was dancing with the newer tech of the day. Lord knows what has happened to that machine, but I think back on it sometimes and curse my ignorance.

But this is not a story of my technological woes. This is a text on a beat up X41 I 'rescued'.

USED PARTS

The guy met me by the statue of Jakub Arbes, the writer responsible for Saint Xaverius, Newton's Brain, and other pinnacles of Czech literature no one bothered to translate (yet). I was in a rush - I was supposed to meet a friend from Brno to discuss his surrealist literature collection. The boy inherited a library after a deceased friend of the family, boasting original prints of all the Czechoslovak surrealist authors from the 20's. But I digress - the ponytailed feller looked at me with a smile, probably happy somebody wanted to take the machine off his hands. "Why are you selling it?" I asked. "Well, the wife said I had too many," he replied with a smirk. "Ah, you have the same disease I have then?" We both laughed.

$25 for the machine with a new after-market battery and a charger. I didn't want the charger, I already had 5 of the 'ORIGINAL IBM' chargers. He insisted on showing me it worked. The Antix linux distribution was installed on it. It turned on. Great. I didn't care about the rest of it.

"Ah, Antix linux..." I faked my amusement. I just wanted to grab the machine and get on with my other business. But the man was insistent on pursuing the conversation: "Aye, it's the only thing that really works on it." I would prove him otherwise.

The suspend connector

After the busy day I made it home. As with every other purchase of a thing I need, I was joyous. I took it out of the bag and set out to take it apart, check its innards and get on with the rescue. Unfortunately for you, I have completely dissected the machine then, cleaned it and re-pasted the CPU, without any visual documentation. You'll have to take my word when I say that it was dusty, dirty, dried up and I lost 2 screws.

loose screws.

For the sake of this text I wasn't going through that experience again. Now, don't get me wrong, I take tormenting pleasure in taking apart electronics and attempting to put them back together, but the success rate of doing it right is somewhere in the ball park of 'had I done it again, it would be like bluffing at a poker game with the devil, holding a pair of 4's.

X41's innards

I put in a 1GB stick of RAM, effectively maxing it out and putting it back together. As for the OS I chose - I have to be honest here; I never before encountered the mini-sized IDE HDD that occupied the machine's disk slot. And I did try putting a regular sized one there, leaving it sticking out, but the computer wouldn't register it. I was stuck with a single drive and had little room for experimentation.

mini IDE

Those who know me, must be familiar with the plight of suspend issues that follow in my wake. Machines in my posession go to sleep and never wake up. Go to sleep, but wake up without functioning ethernet ports. Go to sleep and wake up without power to the monitor. Etc.

Same issue would bother me here, but eventually, after several tries, a FreeBSD with the i915kms module would give me the desired results. The only annoying issue was that it would take somewhere around 2 minutes for the module to load after booting, but without it, suspending wouldn't work and the machine would wake up without power to the display.

Autoboot in 9 seconds.

For the time being I was satisfied with the results. I installed a minimal desktop environment and set it aside, knowing I would have to get back to the machine eventually to breathe a new spirit into it properly. Fast forward to 4 months later:

I have to mention, for my friend tbm's sake, the machine must have already been 'rescued' some years ago. Apart for the decimated plastic bezel, which was ruptured in several places, the most notable feature was the Spanish keyboard with Czech stickers taped over some of the relevant keys. As an aesthetician, this felt like an awful decision. I set out to remove the stickers and return to the machine its exoticism.

Ugly stickers. Removed stickers. fish scales

Fish scales anyone?

Better Keyboard.

That's better.

The next step was to superglue the broken parts back together. While I would very much prefer to get 'new' bezels without damage, this seemed like the next best thing, and after all - this X41 had history within its plastics. Who was I to take that away from it?

broken bezel

Still annoyed by the lengthy boot time, I played around and eventually reached success. Switching to an sc driver (instead of vt) made the suspend function work without the need to load the intel drivers. The machine now boots fairly quickly and everything I could ever need it for works fine. I also put in the newest wi-fi card I had - it works flawlessly with my phone's hotspot function. And yes, I did already take it to a hipster café to look smug in the eyes of the Mac users. And no, nobody actually cared.

click sound

I wish a photo could tell of the satisfying click sound.

The battery lasts somewhere around 3,5 hours with little tweaking and throttling down the CPU. I use cwm and ratpoison, depending on my mood. Most of my workflow is tied to a terminal, so funnily enough - this 20 year old machine is just as usable as anything else in my possesion.

Internet browsing is done through links2 or luakit, if I really need the taste of the modern web. One can even watch videos in 360p rather flawlessly.

runbsd

"But why do this, prahou?" I understand the notion. There's not really a need to do this, is there? You could probably get a phone for $25 that will be able to do anything this computer can thrice as fast. I can't deny that. But there is a philosophical issue at play here. The way I see it, all computers ought to be treated with respect, and the elder ones doubly so. 40 or so years ago a farmer placed his fingers on a keyboard of a brand new MS-DOS machine, thinking "what the hell have I ever done to be able to even lay my eyes on such a divine machine?" I only wish for us to approach technology with the same set of eyes. Every year processors run faster, graphical cards render better, memories remember more... and we've grown accustomed to it. There's this idea that computers are just there. They exist and do our biddings, and yet - most people don't understand how. Your average 'obsolete' machine rescued from the junkyard will always be enough to anyone with the right mindset and a will to learn, just like it was to the farmer 40 years ago.

"But, prahou, my web browser won't run on a 2004 computer :(" Maybe next time, dear reader.

X41

Did I mention the orange THINKLIGHT(tm)?


Solar Eclipse

2022-06-10

zatmění slunce

Partial solar eclipse from the 6th of June 2021 between 12:30 a 13:00 CET. Taken with a digital camera with its lense covered with a VHS tape.


The Magic Behind automa basic

2022-06-09

To celebrate the beginning of a new triapul project, automa basic, I took the opportunity to write a brand new content managing system for it. While it is still in its infancy, though operational (this website being a proof of that), not a single line of any automa basic .html files was touched by human hand.

But this is not so much a statement of my impeccable execution of obsolete ideas, as it is a proof of concept. Just like with twat, the triapul automaton that provides an interface to posting and editing website content, or teige (teige does famously make use of ImageMagick, but can work without it), the image gallery manager, all these were written in ksh in base OpenBSD installations.

Note that twat has become so bloated and importable, that it will take some time for it to see public release. Nevertheless, I will write about it eventually. I know, rm is itching to rewrite it in go, but would it work in base OpenBSD then? ;) (rm says 'yes :D, go can compile portable binarie for all BSDs')

This means that andre, the program that handles the web content of automa basic will work out of the box with no dependencies on any systems that comes with ksh.

Surely there are plenty of tools to manage one's website and I in no way aim to compete with those, but I am proud of the fact that a single script file (and a config file to manage the paths to one's webserver root directory) can provide a user with a friendly method of managing their internet presence.

Some basic commands of andre that are already implemented are the following:

$ andre -w # writes a new post, all posts are also listed on user's index, if he so chooses.
$ andre -wf file # create a new post from a prewritten file
$ andre -ei # edits (and updates) user's index
$ andre -eI ID # edits a post by ID
$ andre -rI ID # removes a post by ID
$ andre -l # lists all posts by dates, titles, and IDs

In a perfect world, one would not need anything but these few commands to manage their site. In the future I aim to provide automated RSS integration and adapt teige's image upload - but for now, there are bugs to fix and features to fine-tune. twat also has a feature where it monitors a specific directory and then posts whatever valid file it found. This allows for an easy way of posting via, say, email. I want to adapt that as well.

andre is also being written with multi-user environment in mind and can manage multiple users' sites, each in their own directory, with individual permissions.

But here's the kicker!

Writing a simple manager is one thing, fundamentally you're generating html files with supplied headers, so that editing one file, will update all. It's a simple method of pasting together a universal header, an html formated body of each post and variables that go in various places throughout the document (ie: HTML_TITLE, HTML_DESCRIPTION). You keep the individual posts offline for when a user edits them and rebuilds the online version. But how to get around the fact that this method would still require the posts to be written in html?

I wrote my own spin on markdown for that, all part of the single ksh script. To keep things short, take a look below at the format of a file I wrote this very post in. I call it writing html in plain text.

Again, this is not meant to replace or compete with other languages or tools that do these tasks. But a method like mine offers a simple way of maintaining an automated website via nothing but ksh and plain text files.

A little preview

andre looks for lines beginning with DATE, TITLE, LANG, DESC and TAGS and turns them into variables that are used for generating the html file. TITLE also get's posted as <h1>

Currently the supported COMMANDS are the following: H2, H3, H4,... IMG, URL, NOTE, PRE, LIST.

Lines that begin with these are telling andre to format them accordingly, with some mitigation of errors. For example the URL or IMG commands accept urls both external and internal (www.website.com/image.png /img/image.png), if a user forgets or chooses not to supply the protocol for external images, andre attempts to fill it in. If an image or url does not exist, he will not post it.

this is a picture of Puffy this is a link to my profile on bsd.network

The syntax is simple. For commands for which it makes sense the first space or tab following the COMMAND tells andre to expect a url, the next space or tab, in the case of URL and IMG, text between <a> </a> and img alt= respectively.

In the case of NOTE, which is currently just a <p> with a class that turns it into italics, the syntax would be:

NOTE text that follows will be in italics.

In the case of LIST, the command on a single line tells andre to expect <li> until it hits an empty line and closes the list. LIST also accepts URL.

This isn't.

There is also PRE which on an empty line tells andre to format next lines as part of the <pre> until it encounters another PRE and closes the tag.

Any text not beginning with the aforementioned COMMANDS andre treats as <p> and any subsequent line is considered a part of that <p>. This is there to allow for manual line breaks when writing long paragraphs.

An empty line closes the </p>

The future of simplicity

If you like this project, stay tuned for any updates!

As with most of my programs - written with love on and for OpenBSD (and ksh <3).

An example file: This is what the file that I wrote this page in looks like (the '#' are not part of it):

#DATE 22-06-29
#TITLE the magic behind automa basic
#LANG en-US
#DESC andre - the plain text html language
#TAGS andre, html
#
#To celebrate the beginning of a new triapul project, automa basic, I took the
#opportunity to write a brand new content managing system for it. While it is still
#in its infancy, though operational (this website being a proof of that), not a
#single line of any automa basic .html files was touched by human hand.
#
#But this is not so much a statement of my impeccable execution of obsolete ideas,
#as it is a proof of concept. Just like with twat, the triapul automaton that
#provides an interface to posting and editing website content, or teige (teige
#does famously make use of ImageMagick, but can work without it), the image gallery
#manager, all these were written in ksh in base OpenBSD installations.
#
#NOTE Note that twat has become so bloated and importable, that it will take some time for it to see public release. Nevertheless, I will write about it eventually. I know, rm is itching to rewrite it in go, but would it work in base OpenBSD then? ;)
#
#This means that andre, the program that handles the web content of automa basic
#will work out of the box with no dependencies on any systems that comes with ksh.
#
#Surely there are plenty of tools to manage one's website and I in no way aim
#to compete with those, but I am proud of the fact that a single script file
#(and a config file to manage the paths to one's webserver root directory) can
#provide a user with a friendly method of managing their internet presence.
#
#Some basic commands of andre that are already implemented are the following:
#
#PRE
#$ andre -w # writes a new post, all posts are also listed on user's index, if he so chooses.
#$ andre -wf file # create a new post from a prewritten file
#$ andre -ei # edits (and updates) user's index
#$ andre -eI ID # edits a post by ID
#$ andre -rI ID # removes a post by ID
#$ andre -l # lists all posts by dates, titles, and IDs
#PRE
#
#In a perfect world, one would not need anything but these few commands to manage their
#site. In the future I aim to provide automated RSS integration and adapt teige's
#image upload - but for now, there are bugs to fix and features to fine-tune. twat also
#has a feature where it monitors a specific directory and then posts whatever valid
#file it found. This allows for an easy way of posting via, say, email. I want to
#adapt that as well.
#
#andre is also being written with multi-user environment in mind and can manage
#multiple users' sites, each in their own directory, with individual permissions.
#
#H2 But here's the kicker!
#
#Writing a simple manager is one thing, fundamentally you're generating html files with
#supplied headers, so that editing one file, will update all. It's a simple method of
#pasting together a universal header, an html formated body of each post and variables
#that go in various places throughout the document (ie: HTML_TITLE, HTML_DESCRIPTION).
#You keep the individual posts offline for when a user edits them and rebuilds the
#online version. But how to get around the fact that this method would still require
#the posts to be written in html?
#
#I wrote my own spin on markdown for that, all part of the single ksh script. To keep
#things short, take a look below at the format of a file I wrote this very post in. I
#call it writing html in plain text.
#
#Again, this is not meant to replace or compete with other languages or tools that do these
#tasks. But a method like mine offers a simple way of maintaining an
#automated website via nothing but ksh and plain text files.
#
#
#H3 A little preview
#
#andre looks for lines beginning with DATE, TITLE, LANG, DESC and TAGS and turns them
#into variables that are used for generating the html file. TITLE also get's posted
#as <h1>
#
#Currently the supported COMMANDS are the following: H2, H3, H4,... IMG, URL, NOTE,
#PRE, LIST.
#
#Lines that begin with these are telling andre to format them accordingly, with some
#mitigation of errors. For example the URL or IMG commands accept urls both external
#and internal (www.website.com/image.png /img/image.png), if a user forgets or chooses
#not to supply the protocol for external images, andre attempts to fill it in. If
#an or url does not exist, he will not post it.
#
#IMG /img/puffy.gif this is a picture of Puffy
#URL bsd.network/@prahou this is a link to my profile on bsd.network
#
#The syntax is simple. For commands for which it makes sense the first space or tab
#following the COMMAND tells andre to expect a url, the next space or tab, in the
#case of URL and IMG, text between <a> </a> and img alt= respectively.
#
#In the case of NOTE, which is currently just a <p> with a class that turns it
#into italics, the syntax would be:
#
#PRE
#NOTE text that follows will be in italics.
#PRE
#
#In the case of LIST, the command on a single line tells andre to expect <li>
#until it hits an empty line and closes the list. LIST also accepts URL.
#
#LIST
#this is a part of a list
#so is this
#and so is this
#URL openbsd.org openbsd.org
#
#This isn't.
#
#There is also PRE which on an empty line tells andre to format next lines as part
#of the <pre> until it encounters another PRE and closes the tag.
#
#Any text not beginning with the aforementioned COMMANDS andre treats as <p>
#and any subsequent line is considered a part of that <p>. This is there
#to allow for manual line breaks when writing long paragraphs.
#
#An empty line closes the </p>
#
#H2 The future of simplicity
#
#If you like this project, stay tuned for any updates!
#
#As with most of my programs - written with love on and for OpenBSD (and ksh <3).
#
#H3 An example file:
#
#This is what the file that I wrote this page in looks like (the '#' are not part of it):

This file is not recursive.

andre is named after André Breton, a French surrealist.


Making ASCII Animations from GIFS in shell

2022-05-22

walk cycle

Step by step guide on creating ASCII animation from GIFs in shell.

Prerequisites

Howdy, fellow terminal connoiseur. Is writing configs and shell scripts for managing your system not satisfying enough? Perhaps you seek a creative outlet, but do not wish to leave your beloved monochrome screen - if that's the case, this short guide might just offer you a little something to do and impress your GUI-obsessed friends.

The result of this guide will output something akin to the camel above. Note that results will warry depending on the choice of font and your own color scheme.

Things we need:

All in all we will use automatisation to create our ASCII animation utilising two opensource programs.

First things first

Before we get into the process of turning a GIF into an ASCII animation, we need to obtain the GIF itself. If you only want to try this guide without the hassle of finding a suitable animation, you can use the following GIF of a walking camel I provide.

camel walk cycle

I created this animation by rotoscoping (tracing) a cycle of a camel walk in GIMP. You are free to do with it as you please.

Download the picture the usual way you would. Right click it in a browser and save it, or use any other tools that are available to you: ie:

$ ftp http://www.triapul.cz/img/camel.gif

ImageMagick and jp2a

Use whatever methods you prefer to obtain these two programs. Here are official links to both projects, if you want to build them from source and/or read about them.

For whatever reason I failed to build jp2a on OpenBSD. If you try and are successful, do let me know.

Otherwise use your package manager. ie:

# pkg install jp2a ImageMagick7 #on FreeBSD
# apt install jp2a ImageMagick #on debian and its derivates

Converting the GIF into separate frames

Let's start by making a working directory for our project and place the camel.gif there. Unless you haven't already, open a terminal inside the working directory. Converting the GIF into frames in the simplest terms is a matter of:

$ convert camel.gif camel.png

In our case of camel.gif, this will only take a second. You can

$ ls *png

to make sure the frames are there. ls should output 8 files, starting with camel-0.png

An Ubuntu user reported that their jp2a build from packages doesn't work with pngs. If that's the case for you, convert the GIF into jpegs instead. $ convert camel.gif camel.jpg. I opted for pngs on account of transparency when working with a GIF that has no background, but for our case, when the animation is on a white background, it will not matter. If you are working with jpegs instead, replace all following instances of png with jpg.

Converting the separate frames into ASCII text files

Now we can test how jp2a will process our png frames. Let's see what happens when we run:

$ jp2a camel-0.png

Note that by default jp2a will scale its output based on the size of your terminal window.

We could convert each frame by hand, or we can automatise it using the 'for loop'. The following command will convert all png files inside the directory.

$ for FRAME in $(ls *png); do jp2a $FRAME > $FRAME.txt; done

Check that our working directory now contains the converted pngs in text files.

$ ls *txt

Playing our animation

As of now, this has been my simplest method of playing our soon to be ASCII animation on loop.

Again, we will utilise the 'for loop,' nested inside an endless 'while loop'.

$ while true; do for FRAME in $(ls *txt | sort -V); do clear; cat $FRAME; sleep .1; done; done
camel walk cycle

Looks good! You can stop the animation with Ctrl-C.

Notes

These are my first impressions on making ASCII animations in shell. I aim to provide a follow-up, when I fine tune the results. My eventual target is to provide a single file shell script containing all frames, which in itself is not a daunting task, but I find it important to describe the underlying processes. Different terminal emulators provide different results with 'clear,' which might not be the perfect solution.

There are many caveats regarding different GIFS, which I aim to address in a follow-up. If jp2a outputs the ASCII frames with a filled background, try the -i flag to make the background transparent ^


The Timeless Modern Web Experience

2022-05-09

Note that these projects are intended for viewing content, not so much for active participation. You do not need to run javascript to use either of these.

A friend of mine raised a good point regarding the open sea which is the internet and its various corporate enclaves. "I may not like what they do, but I'd still very much like to know what they do so that I may know where they'll strike next."

Similarly to my short guide on the luakit browser, I will not play the part of a privacy advocate. While the primary reason why you should know about the following projects is undoubtably concerning your privacy, there are other more practical cases.

Maybe you do find some malevolence in the fact that someone is still attempting to construct your perfect copy that may be studied in an effort to serve you tailor-made content despite you refusing such services, but maybe, in a much less tinfoil-hatty approach, you'd simply like to view someone's tweet without the need to register an account of your own or visit a reddit thread without downloading half the internet. Or you're like me and watching a video on youtube sends you down its algorhytmic spiral - once you finish watching the sixth recommended video that you don't really know why you watched, you don't even remember what you were watching in the first place.

I write this from the perspective of an old tech enthusiast who refuses to be 'gatekept' by awful internet practices, dopamine overloading web design and blatant disregard of basic functionality.

The fundamental purpose of the internet is to serve text. Someone should inform its new generation of architects.

teddit.net | old.reddit sucks

Disregarding the culture of reddit itself, its not-so-recent reimagining of what the user experience should be clearly sent a message to its authors, since old.reddit.com still exists and does everything the new one can, while retaining the vastly superior user experience and simple web design. Alas, the only reason you should be using old.reddit is if you have an account of your own which you use to post. For everything else there is teddit.net.

teddit is an opensource project that works as a front-end to reddit. What it does is serve you reddit content without the need to use reddit whatsoever. But it is not just a reddit browser! It can locally store your subscribed subreddits so that you may customize what is shown to you.

The beauty of its simplicity is in the method by which you can now access reddit content. Say that you find a reddit link that you would very much like to open. Take the link that will look a little something like:

https://reddit.com/somestuff

and change the address to look like this:

https://teddit.net/somestuff

You're changing 4 letters to get a javascript free, tracker free, poor-ui free reddit experience. Now that's not a whole lot of work for such a trade off, if you ask me.

A pattern emerges which makes all the services I mention here extremely handy and easy to use.

nitter.net | twitter

To keep things short - nitter.net does very much the same things teddit does, only for twitter. Want to visit a twitter link? Change the twitter.com/ part of the URL to nitter.net/. Use it for profiles of your favorite tweeters, use it for direct links that your local news station posted as a source of their recent claims, use it to read replies to a tweet that would otherwise be accessible to you only if you had a twitter account, use it to not use twitter.

invidious.io | youtube

The best for last? invidious is THE front end to youtube. Not only can you safely watch any link to a youtube video you come across, you can create an account and subscribe to your favorite creators. invidious is highly customizable and will offer you the perfect blend of functionality and distraction free experience. No algorhytms here mean the related videos will stay related to the video you're watching. There are a bunch of other useful tools invidious offers, but I leave that to you to discover.

Unlike nitter and teddit, invidious is a project that exists in many independent instances, hosted by freedom enthusiasts. You could host your own or pick one of the many from the officially curated list(see Resources below).

Just to make things clear - you have a youtube link:

https://youtu.be/watchAVIDEO

replace the youtube part with the instance of your choosing. ie:

https://yewtu.be/watchAVIDEO

Bonus points

If you're like me, either a degenerate or a minimalist, you will appreciate that these projects are the perfect matches for text browsers such as my all time favorite links. Happy browsing, dear reader.

Resources


luakit steroids

2021-10-09

'I like the internet' is a phrase I'd like to use more often, but the powers that be forbid me from heartily embracing said statement. In this instance I will refrain from the spiritual issues some may attribute to the digital web of text files and will instead embrace the technical side of things. Disclaimer: I have nothing personal against javascript, in fact I might even feel bad for its abuse.

In this article we're going to be using luakit and a simple method to disable javascript. You probably already know, why you seek this functionality, though I believe you aim to use it to test your latest website project to make sure it can serve its content to those, who can't use javascript.

To tell you that you could get around all those "ALLOW COOKIES OR CRY" popups on a majority of websites that you only need to read from, would probably be immoral.

Of course if a website becomes disfunctional (for our purposes meaning "we can't access the content we came for"), after you pull this card out of your sleeve, that's its business. We all understand that's how it makes money, learns about our favorite meals, offers us relevant content, watches us urinate, etc. What's actually disgusting is that it prevents plain text browsing and treads on the very basal feature of the internet - serving text.

In the famous words of Emma Goldman:

"Plain text or bust!"

luakit's config file:

Copy the default file to your home folder of configurations.

$ cp /etc/xdg/luakit/rc.lua ~/.config/luakit/ #openbsd
$ cp /usr/local/etc/xdg/luakit/rc.lua /home/r/.config/luakit/ #freebsd

Next, open the newly copied file in your favorite editor and ucomment (remove --) the following line:

require "noscript"

In simple terms, as the config file itself will tell you, pressing ',ts' in a sequence will disable javascript for the current domain. Note that you have to refresh the page manually for it to take effect. Pressing it again will re-enable scripts back.

In more great news, your choices are saved locally, thus luakit will remember which sites to block scripts on, every time you visit them. You can press ,tr to reset these rules.

The purist variant

You can achieve the opposite functionality by appending the following somewhere in the user scripts section of rc.lua. Preferably after the previously uncommented line. This will disable javascript everywhere, leaving you to toggle it with ',ts' should you need it.

require "noscript"
local noscript = require "noscript"
noscript.enable_scripts = false

This article is sponsored by disgust. No, not the sugar company. The emotion.

Further reading


cwm tips

2021-09-19

It has been around a year since my exodus to cwm and to mark the anniversary, here are a few tips I have picked up along the way. cwm's native keybinding is already intuitive, but there are several habits I sought to recreate. Following are several bits from my .cwmrc file.

Desktop switching

I am a fan of i3's handling of desktop switching: Super + number to switch between numbered desktops, Shift + Super + number to send a window to a desktop of the specific number.

cwm is capable of emulating such feature by utilising the grouping function. To make it akin to i3, append your .cwmrc file with the following and restart cwm (default Ctrl+Shift+Alt+r):

bind-key 4S-1 window-movetogroup-1
bind-key 4S-2 window-movetogroup-2
bind-key 4S-3 window-movetogroup-3
bind-key 4S-4 window-movetogroup-4
bind-key 4S-5 window-movetogroup-5
bind-key 4S-6 window-movetogroup-6
bind-key 4S-7 window-movetogroup-7
bind-key 4S-8 window-movetogroup-8
bind-key 4S-9 window-movetogroup-9

bind-key 4-1 group-only-1
bind-key 4-2 group-only-2
bind-key 4-3 group-only-3
bind-key 4-4 group-only-4
bind-key 4-5 group-only-5
bind-key 4-6 group-only-6
bind-key 4-7 group-only-7
bind-key 4-8 group-only-8
bind-key 4-9 group-only-9

To have newly created windows stay on the current desktop, append .cwmrc with:

sticky yes

Once a desktop has accumulated several windows, they can be tiled. I believe this function is not natively bound. The following will use Super+h and Super+v to tile horizontally and vertically respectively.

bind-key 4-h window-htile
bind-key 4-v window-vtile

The currently selected window will always occupy the top left corner. Only raised windows are affected. Don't expect much functionality out of this feature, as you are still working with a floating window manager. You cannot easily change the position of the tiles.

Window switching

cwm offers no bar to keep track of open windows, instead one can get a list of windows with Alt+/. Note that the list comes up empty by default. Either begin typing a name of a window or press Ctrl+A to get a list of all open windows. Windows can also be labeled with Ctrl+Alt+n. Alt+Tab cycles through raised windows on a specific desktop.

Alt+Enter minimizes the focused window. You can raise it by switching to the numbered group (desktop) it is a member of, Alt+/ or left clicking the desktop. Minimized windows begin with &. View desktop/Minimize all/Show all windows

The following line has multiple uses. (Default Ctrl+Alt +a).

bind-key 4-d group-toggle-all

Press it once to minimize all windows and show the wallpaper. Press it again to raise all windows from all desktops. Otherwise press it once to hide the current desktop and return to it with Super + number.

Further reading:


The Case of Eternal Computing

2021-07-19

Through perpetually rising dependance on technological miracles, the computer addict has since evolved and interbred into the average denizen of western society. Gone are the days of denegenative television anchors cursing the younglings for their obsessive relationship with digital screens, since with the progression of time and further advances of technology even they became enamored by the ever present pocket computers that have revealed their addictive mechanisms to all but those who willingly and laboriously form the avantgard of backwardism.

The illustrated life of a computer addict goes to portray the average western person as a well-adjusted soul with access to a seemingly unchecked tap of information in its pocket - a very romantic perception on its own, in which mankind has evolved above the struggle for survival and became a technocratic civilization of demi-gods. But this Nietzchean perspective is flawed. Some would gladly proclaim that the age of progress has reached a point, where none ought be denied access to personal computing and the demi-godness in shape of a rectangular computer boasting access to the internet as a universal right for all the breathing peoples, but as is natural with any opinion birthed in the minds of men, the utopic surreality of flawless cyber civilization breeds the opposing thought of villainy - the pervasive thought of inherent evil within progress of any kind. The steam engine ruined lives of paddlers all over the world just as the internet will eventually reduce the majority of human activity to monitors. It is therefore understandable why our age sees the resurgence of socialistic thought, as it is becoming more and more obvious that we as humanity find ourselves on the path that ultimately leads to the unemployment of milions on account of our collective betterment - due to there not being a need for human work anymore in various fields that stand to be replaced by automatisation.

The Old Computer Challenge sought to test aging hardware against the needs of a modern person. Clearly it has become apparent that the growing technological advances and the greediness of capitalism renders the hardware of yesterday obsolete at an expontential rate without any need to tie a 512MB cinder block around one's ankle. Surely one could find individuals, who'd praise the Old Computer Challenge with laurels of admiration as they shake their heads and exclaim: "I couldn't do it!" just as surely one could find those, who'd shrug their shoulders and present you with a list of 10 commands, saying: "this is all we had in 83', challenge yourself to survive with ed alone." While my first Old Computer Challenge post did open with my relation to self-flagellation, it's important to note that it was not my aim to perceive the challenge as a punishment or a 'see what it was like 10, 15, 250 years ago,' or to complain about the business practices of the proverbial 'Big Tech,' or the despairing state of the bloated internet, but rather as a probe into the commonplace time-wasting activities and their compulsivity.

Most notable factor throughout the reports of the challengees was the instinctive desire for stimulation through media, notably video watching. 'How to stream videos on hardware that won't handle modern browsers' was a pervasive topic. This alone would be enough to rile up the backwardists with various envangelical symbols around their necks with proclamations of doomed future generations and the enslavement of human kind to technology. A point which does ring plausibly, lest one forgets the basal human instict - the universal desire for satisfaction. Only the most naive would opose the reality that describes the founding stone of civilization and all of human life as the act of procreation, while the remainder of our time is spent either avoiding said fact through the aforementioned time-wasting activities, that we may forget the animalistic purpose of our existence, or through work and self betterment in order to raise the prospect of better or more sexual partners.

It is not the fault of the computer, which stands behind the seeming degeneration of man. In fact, one comes to realise, there is no degeneration at all. Much like the television or books once did, the act of preoccuping the mind with arbitrary problem solving or chemical stimulation only evolves along the technological progress to shield the common man from the reality of human experience - the enslavement not to films, gaming or music, but to the sexual libido. People don't read as much not because they are reduced to mindless drones, but because technology has presented more accesible alternatives for casual time-wasting. Although perhaps jokingly, a point was raised during the challenge in the IRC space in regards to using insufficient hardware: 'What about porn?' While coated in satire, it presents the fundamentality of human relation with the every day struggle nonetheless.

The Old Computer Challenge only reminds us of the fast pace by which technology advances and aims to consume every individual, despite their skill to operate computers. One does not need to be a prodigal child to get by with a single core processor and two sticks of 256MB of RAM in 2021, as long as they know their way around. You could come across people cursing their state of mind, along with other unsatisfactory traits, when comparing themselves to the past. However, very little has changed in the grander scheme. Curse not the state of your concetration - turns out technology made it that you do not need it anymore.

Tune in next time to find out how your lust benefits the well-being of humanity.

How to gain the attention of a woman passing by:

|||||||
|||||||
|||||||
|||||||

OLD COMPUTER CHALLENGE

2021-07-17

I stuck my head out and saw the proposed challenge. Since I have the perfect match in the form of IBM's T42 and I do enjoy the occasional self-flagellation, I hopped on board. I see it as a useful experiment as far as monitoring of one's usual habits goes and re-evaluating the things that will undeniably be missed due to hardware limitations.

The play is simple: A single core processor and 512 MB of RAM for a week on a personal computer that is not used for work, as the project does not aim to decrease anyone's working output. Nevertheless, all personal and free time activities that one performs on a usual machine are to be performed, and possibly substituted, on the Old Computer.

While the experiment, or challenge, does have a playful ring to it, as solene notes in her description, certain feelings are bound to arise. Not only will the bloatedness of the modern web become ever more apparent, as most popular websites simply desire far more than the proposed limit of 512MB of RAM, moreso will the habits that one takes for granted, ie: social media, video watching or playing (recent-ish) video games, come to reveal their addictive nature as one attempts to mitigate the lack of access to the usual stimuli of the computer world. While the rules state that the use of a smart phone is allowed in full extent, and even encouraged specifically to record personal needs for learned behavior, since I have recently drowned mine and have not bothered to procure a new one, I will be forced to make due with the elderly machine. One may certainly argue that there are those, who are either forced to use old hardware due to necessity, or who willingly retain such hardware in working condition as it suits their needs. But to the modern digital citizen the experiment may very well reveal just how much their use of free time is dictated by sufficient hardware.

The setup:

Today I gutted the T42 and swapped its entrails for a 512MB stick. I have previously upgraded it to its maximum capability, just to see how far I could push the old machine, nevertheless turning it into a glorified digital typewriter and a book reader.

It is running OpenBSD 6.9 on an Intel Pentium M at 1.7GHz and a 40GB PATA HDD. I do not use a wi-fi and I have already noticed an issue with ethernet, which refuses to work after resuming from suspension. I'd rather put the computer to sleep than power it off, but I expect there will be a plenty of time to look into the problem during the course of the challenge. The screen has a resolution of 1024x768 and even though the machine is pushing the legal drinking age in the USA, looks still crisp. I will post a photo once I figure out what to take a picture with. Software:

Since I fall into the category of minimalist degenerates (not to be confused with minimalists) and the majority of my work-flow is already bound to the terminal prompt, most of the software I use on a daily basis should have no problem running on the Old Computer. I will update the list of software I will be using as the challenge progresses, but as of now here's a list of several programs that I intend to use. May it provide fellow challengees with inspiration.

As for the window manager, I will be staying with my favorite cwm, but I might explore other options, since I doubt I will have dozens of windows open.

Good luck!

The Old Computer Challenge pt. 2

2021-07-13

The fan isn't on yet. It'll come squeaking in morse soon enough. I can tell Puffy is not nervous occupying the T42's hard drive from more ancient times. Not trusting anyone ends one in comfort. We did not know where the machine came from, but it landed in our laps like I wish my erotic dancer friend would - for three packs of cigarettes and a bottle of Bohemian 'rum'. (The word is in quotes since it has been legally declared by the European Booze Heritage Council, or EBHC, 'as not legitimate rum, for rum is for pirates. But ever since pirates invented streaming services, they moved from rum to fine wine - second to last bottom shelf and higher.)

The DVD drive pops open from time to time. It's either my violent typing on the keyboard hitting some nerve cable operating the opening mechanism of the drive, or the blowfish is sending me smoke signals again. Whatever its intentions, the T42's been sailing the ship with the rest of us fools and paranoics. Its innards twice gutted, erased and degraded. The drive looks okay in very specific light angles, and won't itself do much to the modern DVD-drive connosieur, but the rest of the machine is drooling material for any orifices of retrofiles of various fetishisations.

I'm in CWM. The battery light flickers. It can do 20 minutes of the terminal experience with its original maximum capacity reduced to 27%. Until recently, when the T42 craved power, it woke up a couple of drum bursting sirens, as if to scare the rats away. A script that plays the counter-strike audio clip for a defused bomb whenever the computer is plugged in is what I think of. It has been commended as good idea in the #old-computer-challenge bar to remove the battery, since it's not doing much but consuming power, writhing in place, trying to feed a stomach that's no longer there. A battery will give you its maximum capacity exactly once. The rest of its life it will busy itself by trying to match the one output when it was used for the first time, agonizing as it grows older and progressively worse by the minute.

The battery is out and the revolutions of the fan reached a very specific number where it beggins purring without a hic. Unlike the battery, the DVD drive is not plug 'n' play, note to self. Staring at the gaping hole where the optical drive used to be, I'm reminded of all the possible pieces that could go there. Clearly this machine is from an era where changing the guttworks of one's computer was possible and even encouraged. Don't need an optical drive? Trade it in for a second hard drive. Maybe you could fit a GPU in there and surely one will find a use for a COM port, if he salvages long enough. The T42 can choke up to 2GB of RAM and there is a plethora (at least 6) of CPU models that would fit its socket. The digital marketplaces are blooming with all sorts of components for aging hardware and it can be quite astounding to see what people are giving away, thinking it obsolete.

Reminds me of that jared-the-thinkpad-guy. Man sold his decency for advertising an upgradable laptop with RAM and CPU soldered on, so the end result was the same machine with a better hard drive. That's not to say you can't tinker with a machine you purchase today. But the chances you have to do whatever you want have vastly decreased for the average consumer. The standard of dumbing down is apparent. The Curse of Pretty

Take a seat by the fire and let me tell you a tale of webcrawling. The cautious man already knows of the Jabberwock, but it is here with a single core CPU and 512MB of RAM that the powers that be reveal themselves. Say goodbye to javascript and forget the big web-browser players. The only browser that works out of the box on an i386 is luakit. It'll work fine for websites with little to no JS, but it won't hesitate to crash, should you visit one of the modern implementations of web. That's where links/lynx/w3m come in to help you stay in touch with recent information. Text browsing has a few advantages: no JS copulation, text formated to your liking and overall less obtrusiveness. Even though 'please, use javascript' will be one's new permanent comrade, if information you're looking for exists in written form, you'll get it.

Televised drugs

vid.puffyan.us

Undoubtedly one of the big JS-heavy players is youtube, its site inaccessible through a text browser. Luckily one can use any of the various invidious instances that provide a js-free youtube experience to browse for videos in a text browser, find the original link and stream it through mpv+youtube-dl or download it. As long as you have access to a link leading to a youtube video, you can watch it without a browser in the comfort of your shell. mpv will stream any direct link to a video.

Similarly, you can use feh for remote image viewing. Since the text browsers do tell you: "This is where an image is!" and can present its URL, it's just a matter of a few seconds to display them externally. Likewise will you perhaps notice that images don't add much to the reading experience unless absolutely necessary. ratpoison

Gave up cwm for ratpoison. My housemate [rat] is not very happy.

Brouk and Puffy cwm desktop ratpoison wm

Life without GUI I

2020-01-03

Originally composed for rawtext.club. This is an introduction to the 'project'. Several tips follow below.

Some time ago, by current standards a very long time ago, when I was introduced to *nices, I was initially enthralled by the unprecedented choices and options that presented themselves to the thrifty user. Migrating from the world of Microsoft's XP, I was already a naturally curious individual and when I found out that the looks and aesthetics of an operating system could be changed, I wasted no time in tinkering with them. I already had previous experience with scouring every option in Windows' 95 and 98 screensaver options and the customizable colors of windows and panels. Once the internet rolled its heavy threads into the neighborhood, I wasted no time in downloading all sorts of themes and changes to user interfaces. Looking back at those habits, I was definitely not very cautious when it came to messing around with how the operating system looked and must've been pulling all sorts of dubious software into the machine with every utility promising to perk up one's desktop. But no matter the choices and programs in the Windows sphere, one would still be working with the interface that was ultimately tailored across the big pond somewhere in California. Of course those programs that radically changed the appearance were probably the root causes of Internet Explorer's now diminishing web view size, numerous toolbars and a homepage in Arameic.

Every subsequent release of Windows seemed to further sterilise the options for wild customization, making it ever more attractive to pull worm infested programs off the internet to perform the slightest changes. And let's not get into a discussion on the quality of various themes that came with Vista and 7. But hey, nowadays one can change the color of the panel to one of 16 colors and disable opacity. And what about the D A R K M O D E ? Choices!

But back to my introduction to what was initially Kubuntu during highschool classes on UNIX systems. While part of my brain busied itself with the structure of the filing system, the other wasted no time in playing with the uncountable options of customization. I'm certain my terminal changed font and color every 20 seconds. But what about the look of windows? Not only could I now change the colors of title bars, or move the system panel to a different edge of the screen, I could have no title bars at all and if I so desired, have a massively obtrusive window list in the middle of the screen. This was the compiz era of wobbly windows and while today a rather useless feature, back then it blew my mind that all these things were seemingly native to the system. And I didn't even know yet of the variety of desktop environments and window managers, each with their vast array of customization.

As time went on and I grew comfortable with the different system, I moved from the aesthetic tinkering to a utilitarian approach. I was no longer forced to use a dedicated file manager with little to no customization, I could peruse the bookshelves of countless programs written by crafty people and discover what each had to offer. But perhaps it is of little use to present to you the open approach to customization that *nix systems follow, because after all, this is not an essay on tinkering with the looks and functionality of one's computer. In the end it was not so much the appearance and fluff, but the command line, that stole my heart. If there is one thing I took from it all, it is that rummaging through all possible options a program or an environment offers leads to better understanding and one grows more confident with its usage and is more couragous in bending it to their needs.

Soon after my full descend into Linux, I began valuing minimalism and simplicity, realizing I don't need most of the things that I was lead to believe I formerly needed to be presented with at all times in the case of Windows or even some *nix desktop environments. This being one of those lightbulb moments, where I realized that everything every graphical interface does is just commands in the shell with a sleek suit. During this time I made the switch from Fedora and xfce/gnome, two of the desktop enviroments I kept alternating between, to now defunct crunchbang distribution of Debian. My first real encounter with window managers, namely openbox. And again, I was blown away by the mix of simplicity and customization. But even before that I was already getting to know the bare system frequently by Ctrl+Alt+F1-ing into the GUI-less space and performing tasks that graphical programs did for me by hand.

That was when I began a series of tips I called 'Life without GUI,' which was shared with a single person, who also fell deeply in love with Linux during the same time, but our paths have since diverted, as he grew to value ease of use and sleek customizable modern interfaces, while I continued down the road beneath the hood of the system, so to speak.

My series was not so much on the fundamentals of UNIX use, akin to 'how to mount a disk,' or 'how to copy files,' but rather on some creative ways of doing things and interesting tools that existed only in the shell environment that could easily be missed by those too keen on having graphical utilities do most, if not all their tasks.

Being now here and a part of rawtext.club, it would be foolish to preach on the magic of the command line, but it has given me a nudge to perhaps resurrect this old project of mine and share some of my findings. Note that these would be mostly niche things with not much value to the average user of a computer, but could provide insight into some in the very least fun-to-try tools.

While this is mostly just my introduction into the topic, I will leave with you a recent discovery.

Playing videos:

"I rarely use X myself and when I do, it's for the lack of UTF-8 support in the OpenBSD tty! Even then I just fullscreen xterm! What even is a mouse?!" you cry and I commend you for it, but we all know that there are times when you just can't get by without either X or a window that hosts some graphical output. Surely you're one those who have since given up on video streaming sites, but you still like to watch your favorite Godard here and there. "It always ruins my no GUI-streak, retko! If only there was a way to watch videos without leaving the shell." Well, my fellow rawtextclubian, what if I told you there is a way to watch your favorite flick in the glorious ASCII, right there from the command prompt? Here's what you'll need:

mpv

mpv is a fantastic media player that can already play your audio files, similar to mplayer, but it has a few nifty perks that we'll make use of below. Okay, that wasn't a very demanding list. Here's how to get it, depending on your system or distribution:

# apt install mpv

or

# pkg_add mpv

or

# dnf install mpv

or

If you wish to build it yourself.

You get the gist.

mpv is very simple to use on its own. The basic syntax is:

$ mpv [file-to-play]

Of course for our purposes this will only work for audio. Not for long. Say you want to play that Godard film you mentioned before, but don't want to ruin your no-GUI streak. Note that there will be 'some' quality loss. You might not be able to tell much from the picture, depending on the resolution of your terminal.

$ mpv --vo=tct that-film-i-like.ogg

You're in business! You can specify a custom resolution with '--vo-tct-width=NUMBER --vo-tct-height=NUMBER' if mpv doesn't recognize the size of your terminal and choose between two methods of displaying the picture. It'll even work on on a terminal that doesn't support true color (taken from mpv manual):

--vo-tct-algo=ALGO
Select how to write the pixels to the terminal.

half-blocks Uses unicode LOWER HALF BLOCK character
to achieve higher vertical resolution.
(Default.)

plain Uses spaces. Causes vertical resolution to
drop twofolds, but in theory works in more
places.

--vo-tct-256=YES|NO
(default: no) Use 256 colors - for terminals which
don't support true color.

If you only plan to watch videos this way from now on, there are a few benefits, apart from the obvious lack of need for graphical support. No need for those 4K files, since you'll be effectively watching an impressionist animation made of squares. This might also help you watch videos on ancient hardware!

"Cool, but I still want to watch youtube." Fine, you heretic. You can even watch youtube videos without ever leaving the shell this way. Get youtube-dl here:

Note that it might be packaged in your distribution, but chances are it's outdated. Luckily for you, there's no need to compile it, since it's just a python script. So be sure to have python as well. Now it's just a matter of:

$ mpv --vo=tct https://link-to-the-youtube-video

Finale: Of course if you've been following the above tutorial, you can tell this doesn't have much value to you, if you have access to a graphical server and don't mind ruining your no-GUI streak. We can argue whether it actually counts as GUI if it's just a borderless window with a film some other time. But to leave you with some usefulness. You can use mpv (and youtube-dl combo) to just stream audio in the background like so:

$ mpv --no-video https://link-to-a-video-you-dont-mind-only-listening-to &
$ mpv --no-video video-file-you-dont-mind-only-listening-to &

Lastly: depending on your OS, you might be able to use the DRM driver to stream videos straight in the shell environment. The playing video will occupy one of the virtual terminal screens and it might feel like the X server with nothing but your video. But you do not need X and there is no mouse support. The following works on my freeBSD machine.

$ mpv --vo=drm [file-to-play]

That's it for now. See you next time on 'Life without GUI.'