Categories
Uncategorized

Opening Legacy Java Applets with Docker

If you’ve ever had to deal with those ancient Java-based tools — like IPMI KVM consoles, iDRAC virtual media, or some random vendor’s “management” interface — you know the drill:
Modern browsers hate them, Java updates break them, and you end up stuck on some old machine that still works “because we never touch it.”

What It Is

It’s an Ubuntu 18.04 desktop inside a Docker container, with:

  • XFCE desktop (light and quick)
  • VNC server (so you can connect from anywhere)
  • Firefox 45 ESR (last version that supports Java applets)
  • Java 8 plugin already set up
  • A shortcut on the desktop to open Firefox with Java ready to go

Basically, you spin this up, connect via VNC, open the site, and the applet runs — no fighting with your main system.


How to Run It

1 – Clone the repo

# git clone https://github.com/heroseloi/docker-java-apples.git
# cd docker-java-apples

2 – Make the script executable and run it:

# chmod +x run.sh
# ./run.sh

3 – Connect with a VNC client to:

localhost:5901

Password: docker

Before building, edit:

java_config/exception.sites

Add the URLs or IP ranges for the sites you’ll visit — otherwise Java will block them.

Why This Beats the Old Way

  • No mess on your host — you’re not installing old Java system-wide.
  • Guaranteed browser compatibility — Firefox 45 ESR just works with the plugin.
  • Portable — run it anywhere Docker runs.
  • One-click start — once the container’s up, just click the desktop shortcut inside the VNC session.

This is for those times when you have to use an old Java applet, but you don’t want to ruin your main system to make it work.

Repo’s here:
https://github.com/heroseloi/docker-java-apples

Categories
Linux Technology Virtualization

Enabling Serial Console Access on Linux VMs in VMware ESXi 5.5.0

Sometimes you just need good old serial console access — maybe to troubleshoot a headless server, recover from a broken network config, or simply because SSH isn’t an option. If your Linux host is running on VMware ESXi 5.5.0, you can actually hook into its serial console by using a named pipe and a bit of socat magic.

Here’s how to get it done.


1. Enable serial access inside the Linux VM

First, make sure the VM itself is ready to serve a serial console session. On most modern Linux distros using systemd, this means enabling the serial-getty service:

# systemctl enable serial-getty@ttyS0.service

This will make the login prompt available on ttyS0 after each reboot.


2. List your VMs in ESXi

SSH into your ESXi host and get the list of registered VMs:

# vim-cmd vmsvc/getallvms

Find the VM you want and note its ID (the number in the first column).


3. Power off the VM

You can either shut it down from inside the guest OS:

# poweroff

Or, if that’s not possible, do it from ESXi:

# vim-cmd vmsvc/power.off ID

4. Make sure it’s really powered off

Double-check the VM’s state:

# vim-cmd vmsvc/power.getstate ID

It should return Powered off.


5. Edit the VM’s configuration

Open the VM’s .vmx file (located in its directory on the datastore) and add these lines:

serial0.fileType = "pipe"
serial0.fileName = "/vmfs/volumes/datastore1/vm-host-dir/serial0.pipe"
serial0.tryNoRxLoss = "TRUE"
serial0.yieldOnMsrRead = "TRUE"
serial0.present = "TRUE"
serial0.pipe.endPoint = "server"

Make sure to adjust the path to match your VM’s folder.


6. Power the VM back on

# vim-cmd vmsvc/power.on ID

7. Get socat on ESXi

ESXi doesn’t come with socat built-in, but we need it to connect to our serial pipe.

You can build it yourself using my repo here:
https://github.com/heroseloi/socat-builder

Once compiled, SCP it over to your ESXi host.


8. Connect to the serial console

With socat in place, run:

# socat -,raw,echo=0 UNIX-CONNECT:/vmfs/volumes/datastore1/vm-host-dir/serial0.pipe

If all went well, you should see something like:

Rocky Linux 8.10 (Green Obsidian)
Kernel 6.15.9-1.el8.elrepo.x86_64 on an x86_64

server login:

Boom — you’re in the VM’s console without needing a virtual display.


Summary

That’s it — you’ve just set up a working serial console for a Linux VM on ESXi 5.5.0.
The key steps were:

  1. Enabling the serial-getty service in Linux.
  2. Configuring the VMX file to use a named pipe for serial output.
  3. Using socat to hook into that pipe from ESXi.

It’s a handy trick for rescue situations, minimal VM setups, or when you just want a bit of retro charm in your sysadmin life.