Entries Tagged as 'Werkzeuge'

Installing FastChat on Ubuntu 22.04 using Docker

a lama with sunglasses next to a computer, generated using stable diffusion with Steps: 48, Sampler: LMS Karras, CFG scale: 6, Seed: 1937289325, Face restoration: CodeFormer, Size: 512x512, Model hash: 4711ff4dd2, Model: v2-1_768-nonema-pruned, Version: v1.2.1

In this blog post, we will walk you through the process of installing FastChat on Ubuntu using Docker. FastChat „is an open platform for training, serving, and evaluating large language model based chatbots“.

[

Psion Series 3a data transfer over serial interface to modern Linux

Psion Series 3a

Transferring data from and to the Psion Series 3a digital assistant is surprisingly easy, still. This is thanks to the plptools, that are still packaged for Ubuntu LTS and Debian.


  • Psion Series 3a
  • Psion Series 3 Link (RS232)
  • USB to D-sub serial adapter cable
  • Null modem adaptor or cable – only needed if the D-sub of the USB adaptor isn’t male
  • A Linux system with USB interface and the plptools package installed
[

Setting up castor as handler for gemini URLs on a Gnome desktop

Gemini capsule paragliderSo, you’ve heard of that slick new gemini:// internet protocol and you managed to install or build (see below) the castor browser to use it. It works great, but now you would like to be able to click on a link in your http(s) browser to gemini and have it open castor for you. Here is how to do this on a Gnome desktop.

Step 1 – create a launcher for castor, by adding the following configuration into the file  „~/.local/share/applications/castor.desktop“:

[Desktop Entry]
Comment=Gemini Browser
Exec=castor %u
Icon=/[path to castor repository]/data/org.typed-hole.castor.svg

Step 2 – register the gemini protocol to open with castor, by issuing this command:

xdg-mime default castor.desktop x-scheme-handler/gemini

[

Which UNIX tool to use for text processing?

A short decision flow chart to pick the optimal text processing tool on a UNIX-like system (dowload it as plaintext):

                                   | I want |
                                   | to ... |
                            yes  / ... search  \  no
                          .-----(  in freeform  )-----------------.
                          |      \    text.    /                  |
                          v       '-----------'                   v
                   ____________                           .---------------.
                   \           \                    yes  /    ... work     \  no
                    ) use grep  )                 .-----(  with structured  )--------.
                   /___________/                  |      \      text.      /         |
                          |                       v       '---------------'          v
                          v                 ___________                       .-------------.
                     .--------.             \          \            replace  /   ... work    \  delete
               yes  /   It's   \  no         ) use awk  )             .-----(  with freeform  )-----.
            .------(  a simple  )-------.   /__________/              |      \     text.     /      |
            |       \ pattern. /        |                             |       '-------------'       |
            v        '--------'         v                             v           extract           v
.-----------------------.  .-------------------------.  .--------------------------. | .-------------------------.
| grep 'simple pattern' |  |  egrep 'regex pattern'  |  | sed 's/search/replace/g' | | | sed '/search pattern/d' |
'-----------------------'  |            or           |  '--------------------------' v '-------------------------'
                           | grep -E 'regex pattern' |           .---------------------------------------.
                           '-------------------------'           | sed 's/^.*\(search pattern\).*$/\1/g' |
                                                                 |                  or                   |
                                                                 |       grep -Po 'search pattern'       |

[

Atari Portfolio data transfer over serial interface to modern Linux

There are already great tutorials on transferring data from/to the Atari Portfolio digital assistant for MacOS and Windows. Here is how to have it talk to Linux – the quick and shell way.

The biggest obstacle is to get some XMODEM software onto the Portfolio, as the serial connection can be quite unreliable. After a one time bootstrap procedure using a copy over the serial device, subsequent transfers become much more reliable and convenient.

Alternatively to the complicated one time setup procedure, you may also just use the XTERM.COM from the dip Utilities card, that you might still find on eBay.


  • Atari Portfolio
  • Atari Serial Interface HPC-102
  • USB to D-sub serial adapter cable
  • Null modem adaptor or cable – only needed if the D-sub of the USB adaptor isn’t female
  • A Linux device with USB interface and the minicom and coreutils packages installed
  • A copy of XLOAD.COM and XTERM2.COM on your Linux device

[

VoCore2 Ultimate as SMS gateway

This article describes a setup of OpenWRT on the VoCore2 Ultimate to send SMS via a HTTP API using smstools and a GSM modem (a Huawei E3531, in this case). This method uses docker to build a custom OpenWRT image, which can be then be installed via the firmware update mechanism in the preinstalled OpenWRT on the ROM of the VoCore2. [Read more →]

IMSAI 8080 & Altair 8800 hex dumps to octal

If you play around with entering programs via the toggle switches on the Altair 8800 or IMSAI 8080 or one of their clones, recreations, replicas or simulators, you may want to enter a hex dump of an assembler program via your front panel. While most experienced programmers prefer the hex notation, it is a bit error prone to convert the hex digits in your head into the binary notation of a nibble (4 bits). This is why many example programs in the original manuals and also the front panels of these systems feature the unusual octal notation. It is very simple to convert octal into binary and if you are used to UNIX permissions, you will already know these by heart. [Read more →]

Replacing indicator-multiload with system-monitor in Ubuntu 18.04

Recently the 18.04.1 point release of Ubuntu came out and I finally started upgrading my desktops & laptops to it from my 16.04 LTS installations. As usual, the upgrade went smoothly, but as can be expected with the switch from Unity to Gnome, the UI has changed dramatically.

Unfortunately, while the indicator-multiload still is getting displayed, changing its settings doesn’t seem to work any more and it is so small that it becomes unreadable. I did find a replacement in the form of the system-monitor widget for the Gnome shell. To install it you need to install the following prerequisites:

  1. chrome-gnome-shell is the user space component to install Gnome shell extensions
  2. gir1.2-gtop-2.0, gir1.2-networkmanager-1.0 and gir1.2-clutter-1.0 are libraries required for this particular widget
  3. The Firefox extension GNOME Shell integration allows you to install the widget from the comfort of your browser. There is a similar extension for Chrome(ium).

To install all the components and uninstall indicator-multiload in a terminal session, use:

sudo apt install chrome-gnome-shell gir1.2-gtop-2.0 gir1.2-networkmanager-1.0 gir1.2-clutter-1.0
sudo apt purge indicator-multiload

Finally you can navigate in your browser to the GNOME Shell Extensions page and enable the widget (or disable it again, if you don’t like it after all).

Some other nitpicks I had with the upgrade to Ubuntu 18.04, while we are on the topic:

  • The window controls (minimize/maximize/close) are back to the right side. It took me a long time to adjust to the MacOS-style left hand window controls back in 2008 and now we move back to the right. I will suffer for a while, but hope to be happier long-term, if most of the GUIs I encounter follow the same standard. Of course in my day job as of 2016 I am now using a MacOS device… 😕
  • The boot-up time significantly increased: On one of my last HDD equipped desktops from under 30s to about 2 minutes and on my fastest SSD laptop from 5s to about 30s. 😥

Outgoing IPs & Ports for WordPress

I recently locked down all outgoing connections from my DMZ to the internet and now have to open things explicitly in my packet filter. For wordpress I did not find any documentation on that, so here are my findings to be able to update plugins and themes (I don’t care about the RSS feed on the dashboard):

IP Port(s) Description 80 (HTTP) & 443 (HTTPS) downloads.wordpress.org 80 (HTTP) & 443 (HTTPS) api.wordpress.org 80 (HTTP) & 443 (HTTPS) api.akismet.com 80 (HTTP) & 443 (HTTPS) api.akismet.com

How to make your Unix prompts more useful

Thanks Sandra!

A customized prompt can serve as a gentle reminder of what system you’re working on — especially helpful if you often find yourself logged into 3-4 systems at a time, window hopping to get several things done at the same time. or if you log in with different accounts. A customized prompt can help if you like to be reminded where you are sitting in the file system or prefer *not* to be reminded where you are in the file system (a full path can take up quite a bit of screen space when you’re seven levels deep into /home/username/apps/docs/…).

All you need to do to define your PS1 variable and save it in your .bashrc or .bash_profile file. As it turns out, however, you have a lot of flexibility on what you put into that prompt.

[…] Set your prompt to the current time. […]

$ PS1="\A> "
PS1="\t> "

NOTE: The > at the end of these prompts and the blank that follows are optional, but my preference. I like these characters separating my prompts from my commands.

Have trouble remembering what system you’re logged into?

$ PS1='\h> '

[…] If you can’t remember where you are, the w setting will show your path relative to your home directory. The ~, of course, is your home itself.

PS1='\w '

When you need some cheering up:

$ PS1=':-) '

When you have amnesia or just want to be reminded what account you’re logged into:

PS1="\u> "

You can expand this to show both the username and system name like this:

PS1=“\u@\h “

$ PS1="\u@\h> "

Any of the following can be use din your prompt, though I suspect that few of us will hear the bell even if we use that character string in our prompts.

\a     an ASCII bell character (07)
\d     the date  in  "Weekday  Month  Date"  format (e.g.,
       "Tue May 26")
\e     an ASCII escape character (033)
\h     the hostname up to the first `.'
\H     the hostname
\j     the  number of jobs currently managed by the shell
\l     the basename of the shell's terminal  device name
\n     newline
\r     carriage return
\s     the  name  of  the shell, the basename of $0 (the
       portion following the final slash)
\t     the current time in 24-hour HH:MM:SS format
\T     the current time in 12-hour HH:MM:SS format
\@     the current time in 12-hour am/pm format
\u     the username of the current user
\v     the version of bash (e.g., 2.00)
\V     the release of bash,  version  +  patch level (e.g.,
\w     the current working directory
\W     the  basename  of the current working directory
\!     the history number of this command
\#     the command number of this command
\$     if the effective UID is 0, a #, otherwise a $
\nnn   the  character  corresponding  to  the octal number nnn
\\     a backslash
\[     begin a sequence of non-printing characters, which could
       be used to embed a terminal control
       sequence into the prompt
\]     end a sequence of non-printing characters