tmux useful commands

tmux is a great alternative to screen if you’re looking for multiple virtual sessions in one terminal window.

Useful commands:

Ctrl-b c : open new session

Ctrl-b n | p : cycle next / previous through sessions

Ctrl-b % | ” : split horizontally / vertically

Ctrl-b left | right | up |down : cycle back /forward through visible split windows (left/right if split horizontally, up/down if split vertically)

Using Putty SSH, if you’re not getting line characters for the splits, change session charset to UTF8.

Disabling strict key checking on ssh

Key checking on ssh validates that the remote system you’re attempting to connect to is the same server that you connected to the last time, to help prevent the possibility that someone has hijacked the DNS name, IP, or the hardware itself.

However, some times you may want to avoid this checking. For example, I have a Raspberry Pi that I boot from multiple SD cards, but each is setup with the same IP. If strict key checking is enabled then your ssh client will prevent you from connecting when it detects a signature change. You’ll see this error:

RSA host key for 192.168.x.x has changed and you have requested strict checking.

To avoid this, edit or add ~/.ssh/config, and add:

Host 192.168.x.x
    StrictHostKeyChecking no

where the IP can be the IP of the machine you’re connecting to, or you can use a * wildcard too (maybe not as secure).

If you’ve already connected and have a key in your known_hosts, then I think you need to delete this entry first, and then try with this config.

 

Creating Atari ST disks from disk image files on Linux

Steps taken from article here.

Check disk geometry of disk image file – copy this to a .sh file and run it against a .st disk image:

#!/bin/sh od -v -Ad -t u1 -w1 $1 | awk 'NR==20 {sl=$2} NR==21 {sh=$2}
 NR==25 {spt=$2} NR==27 {s=$2; 
print "Sides: " s " Sectors: " spt " Tracks: " (sh * 256 + sl) / spt / s; exit}'

Format a 720k floppy using the sector and cylinder numbers from the prior step:

superformat /dev/fd0 dd ds sect=10 cyl=80

Copy the image to the disk:

cp image.st /dev/fd0