Skip to main content

Raymii.org Raymii.org Logo

Quis custodiet ipsos custodes?
Home | About | All pages | Cluster Status | RSS Feed

I've packaged up CKermit as a snap, for Ubuntu 20.04

Published: 16-05-2021 | Author: Remy van Elst | Text only version of this article


❗ This post is over three years old. It may no longer be up to date. Opinions may have changed.


Get it from the Snap Store

Last year I packaged up gnash as a snap because it was missing from the Ubuntu 20.04 apt repositories. Recently I found out that ckermit is also not in Ubuntu 20.04, as far as I can tell because it wasn't in the Debian repositories when the Ubuntu 20.04 initial sync happened. Which is very inconvenient for an LTS release. I often use ckermit to connect to our hardware via a script, to automatically boot from NFS (via u-boot). I could do that manually via screen or minicom, but I have a kermit script that does it for me, which is very convenient. Since the snapping of gnash was so easy, I decided to do it for ckermit as well, since I now know how to convert deb packages to snaps. I also have a few colleagues who also use those kermit scripts and are going to update to 20.04 in the (near) future. The snap packaging is based on work by Phil Roche, he wrote about re-packaging older debian packages with an Ubuntu 18.04/16.04 base layer as a snap. My ckermit package is confined (no --classic needed), the source code for the snap is on my github and on any snap-enabled distro you can now 'snap install ckermit-raymii' to enjoy CKermit.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!

Here is a screenshot of the current package search for ckermit on the Ubuntu package archives. No 20.04 LTS as you can see:

screenshot packages

Important setup information for the snap

You must execute the following commands to access a serial port over USB (ttyUSB0 for example). If you don't do this, this snap won't work:

sudo usermod -a -G dialout $USER #replace $USER with your linux login username

sudo snap connect ckermit-raymii:raw-usb

Now restart your computer and you're good to go!

The snapcraft code is up on github, the version is 9.0-302. Since there is no snap core for 21.04, I cannot convert 9.0-305. But as far as support is concerned, this is the LTS version from 18.04.

What is (c)kermit?

Quoted from the project website:

Kermit is the name of a file-transfer protocol and a suite of computer programs for many types of computers that implement that protocol as well as other communication functions ranging from terminal emulation to automation of communications tasks through a high-level cross-platform scripting language. The software is transport-independent, operating over TCP/IP connections in traditional clear-text mode or secured by SSH, SSL/TLS, or Kerberos, as well as over serial-port connections, modems, and other communication methods.

The Kermit Project was founded at the Columbia University Computer Center (now CUIT) in 1981, and until the mid- to late 1990s, Kermit was Columbia's standard connectivity software, used by students, faculty, and staff to connect from desktop microcomputers, PCs, Macintoshes, and Unix workstations tothe central computing facilities: the IBM mainframes, the DECSYSTEM-20s, CLIO, and Cunix (our Unix-based severrs). At Columbia, the mainframes and DEC-20s are long gone, but Kermit still may be used for SSH sessions to CUNIX.

C-Kermit is an implementation of the kermit protocol, a kermit client/server for unix/linux (and VMS). The PiDP-8, an emulated hardware clone of the PDP-8 also has a kermit implementation so you could use it to communicate with any PDP-8's you might have laying around.

Here is a screenshot (source) of kermit connecting to a Variscite board, similar to the ARM boards I use at work:

screenshot ckermit

This is one of my kermit scripts, after connecting a serial cable, to interrupt the u-boot process. Saves me pressing any key at the right moment, as well as sending some custom boot options to the board.

#!/snap/bin/ckermit-raymii +
kermit -l /dev/ttyUSB0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 4096
set send pack 4096
set window 5

SET INPUT ECHO ON
INPUT 999 Hit any key to stop autoboot:
LINEOUT
INPUT 5 =>
LINEOUT setenv console ttymxc0
INPUT 5 =>
LINEOUT setenv optargs serial.getty=ttymxc0
LINEOUT boot
connect

This kermit script is the only way I have to test this snap, so nothing else than this is tested.

Tags: blog , ckermit , deb , debian , dpkg , kermit , linux , pdp-8 , serial , snap , ubuntu