I have an old laptop set up with mint (what I had a usb laying around for) and running foundryvtt with docker. That’s all set up and working great, starts services on reboot, runs headless.

What I would like to do, mainly because I think it would look cool, is have a small CRT screen that I have plugged into the laptop via HDMI to display the performance status with htop, or docker output or something. I can do this with starting a terminal session with the other display plugged in, but this requires user interaction and all of that.

This side of linux is kind of new to me, so I am not sure what direction I need to start looking in. Is it possible to set up a service to run headless and output to a display in a way that automatically comes up if the device is rebooted? Or is it possible to modify my existing docker container to output logs to display?

Appreciate any input to help get me pointed in the right direction.

EDIT: Solved!

Thanks to everyone for pointing me towards getty, grub boot settings, and bash profiles - got a setup that I’m happy with.

I was able to disable the laptop monitor and enable the CRT by adding this to /etc/default/grub

# Disable laptop monitor (LVDS-1) and only output to CRT (HDMI-A-1)
GRUB_CMDLINE_LINUX_DEFAULT="video=LVDS-1:d video=HDMI-A-1:1024x768"

(don’t forget sudo update-grub to apply)

I initially set it to 640x480, but display was better with higher res and large font size, which I scales up with sudo dpkg-reconfigure console-setup

I created a service account for this, and set up a systemd service to start getty on that account based on those docs

[Service]
Type=idle
ExecStart=
ExecStart=-/sbin/agetty --skip-login --noreset --noclear --autologin axies - ${TERM}![](https://ttrpg.network/pictrs/image/cf0ab3f3-9674-4578-a230-c8f3df7a7bdc.webp)

Then I added htop to the ~/.bash_profile for that user and… done!

Only thing is there is some overscan on the display and initially about 3 rows / cols were cut off on each side. I was able to adjust the CRT display itself to mostly mitigate this, so now only a bit is cut off and it’s usable, but it’s not perfect. I tried setting the margin in the video options in grub with margin_top, margin_left etc., as per these docs but that didn’t work, even though I verified the resolution was applying correctly. But it is functional!

  • ikidd@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 day ago

    You can enable Dropbear SSH server during boot, I know it’s used to be able to enter disk encryption passwords during boot on headless servers. Presumably you could use this to display boot processes on another system quite easily with an SSH session on the system with a display. You could automate that system to monitor for available SSH sessions and start displaying it when it’s available.

    • AldinTheMage@ttrpg.networkOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      You mean like using a separate computer to display? I thought about that. Actually this old thing has a battery compartment with enough space to fit a raspberry pi inside so I may try and make it a self contained PC at some point. Would be cool to have it monitor multiple servers and display a status dashboard when they’re up. That sounds like a fun future project :)