CALIFORNIA.SYSTEMS
California, IT, Vintage Computing, Earthquakes
This is a personal website unaffiliated with any office, agency, or service of the State of California.
Use Vice x64 Commodore 64 Emulator As A Linux Terminal
Decided I wanted to use my system's Linux shell from terminal software running in a virtual Commodore 64 under VICE. It seemed like more headache than connecting a real C64 to a physical serial port, but the result nevertheless proved novel. I used x64 with Kermit v2.2, available from the Internet Archive.
C64 emulator presented with a Linux login prompt! Looks like the getty presents the VT100 emulator with text it's not expecting, but it works well enough. Things are better once you log in, provided $TERM is set to vt100 (more below).
C64 emulator presented with the california.systems homepage. I could join scores of people who accomplished the same thing claiming - inaccurately - "Commodore 64 browsing the Internet in 2025!" But let's be honest: my computer is doing the browsing and merely ferrying the information to the VM. I'd nevertheless be lying if I said this wasn't fun.
Here's how I did it. Steps performed on Manjaro 25.0.8.
Install these packages:
- extra/vice-sdl2
- extra/socat
- aur/mgetty
Installing mgetty on Arch derivatives requires following the AUR build process. More info on installing AUR packages here; steps will naturally vary on other distros.
Steps
mkdir ~/.tmp
cd ~/.tmp
wget https://aur.archlinux.org/cgit/aur.git/snapshot/mgetty.tar.gz
tar -zxf mgetty.tar.gz
cd mgetty
makepkg
sudo pacman -U mgetty-*.pkg.tar.zst
As of this writing gcc15 won't compile the available mgetty package. If mgetty fails to compile and you are on gcc15, downgrade to gcc14 and try again. I managed this with the below command as I had the previous gcc version cached; you may need to download the packages manually:
sudo pacman -U /var/cache/pacman/pkg/gcc-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/gcc-libs-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst
Build an mgetty systemd template, which we'll use to enable mgetty on a virtual serial port (which we will create later). Credit to Majenko on ServerFault for this segment; we will skip configuring terminal types in /etc/mgetty/mgetty.config and enabling the system service, however (this is only temporary).
Create a file /lib/systemd/system/[email protected] with contents:
/lib/systemd/system/[email protected]
[Unit]
Description=Smart Modem Getty(mgetty)
Documentation=man:mgetty(8)
Requires=systemd-udev-settle.service
After=systemd-udev-settle.service
[Service]
Type=simple
ExecStart=/usr/sbin/mgetty -s 1200 -r /dev/pts/%I
Restart=always
PIDFile=/var/run/mgetty.pid.pts%I
[Install]
WantedBy=multi-user.target
From your own shell (not as root), launch pseudoterminals using socat. Set the baud rate to 1200 with b1200. Some credit to the top answer in this StackOverflow thread. Unfortunately, 1200 is the best speed I've achieved. Kermit supports up to 2400 baud, but I encountered garbage in the transmission at that rate.
socat -d -d pty,raw,echo=0,b1200 pty,raw,echo=0,b1200
Note the devices assigned the pseudoterminals. We will assign one to our machine's mgetty, and one to VICE x64's RS232 port.
$ socat -d -d pty,raw,echo=0,b1200 pty,raw,echo=0,b1200
2025/09/14 13:24:28 socat[82854] N PTY is /dev/pts/10
2025/09/14 13:24:28 socat[82854] N PTY is /dev/pts/11
2025/09/14 13:24:28 socat[82854] N starting data transfer loop with FDs [5,5] and [7,7]
Launch an mgetty. Use a root shell or sudo. Reassign to one of the two PTS devices marked above (change highlighted portion accordingly).
sudo systemctl start mgetty-pts@10.service
Launch VICE x64. Navigate Preferences > Settings > Peripheral Devices > RS232.
Use the settings indicated below; under RS232 devices, change the text in Serial 1 (highlighted) to the other pseudoterminal created.
- Enable ACIA RS232 Interface emulation: unchecked
- Enable userport RS232 emulation: checked
- RS-232 Interface type: RS-232, normal control lines levels
- Control lines: All unchecked
- Device: Serial 1 / Baud 1200
- RS232 Devices:
- Serial 1: /dev/pts/11 / Baud 1200 / IP232 Unchecked

Save settings on exit and close. Reset the machine CPU.
I recommend provisioning a user for the Commodore. In any case, ensure the connecting user's $TERM variable is set to VT100.
useradd -m commodore
echo export TERM=vt100 >> /home/commodore/.bashrc
Load your serial terminal application of choice. I recommend Kermit Terminal, but there are many alternatives.
Kermit Terminal's default settings work fine. Type simply 'connect' and you will receive a login prompt. You may need to hit enter or press arrow keys to spawn the getty.
With this slow session you may prefer to run vi in line-editing mode (vi -e), the historic file editing interface for days when slow modems bottlenecked terminal communications and full-screen refreshes took several seconds. There's a great line-editing tutorial here.
Caveats
Security: We're placing a real login getty on pseudoterminals owned and operated in our user context. This carries serious security implications - don't do it at work and/or in an environment with compliance requirements.
A final caution: Avoid fullscreen terminal applications with a high screen refresh rate. top in particular will clobber you at 1200 baud!!
[ Top ] [ Site Map ]