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}
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!



I do get a tty and that works fine if I start it manually. I can also ssh into it while on my local network.
I think what I need to configure is to have it automatically start a tty at boot with specific credentials and auto start whatever monitoring I want. That should work I think. The only downside of that is I don’t want it to run on the laptop screen at all, only the hdmi output, so that is where I want to learn more about how all of those display interfaces work on linux so I can configure the service accordingly (I think)
Yeah ok, that makes more sense. Some starting points (arch user by practice, but Mint will have similar interfaces):
${TERM}with something like/bin/sh -c '/bin/htop'.This was really helpful - It got me pointed down the right track to figure out the video= settings in the grub config. 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"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-setupI 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}Then I added
htopto the~/.bash_profilefor 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!
Well done! That looks amazing!
I’m not too sure about the overs can issue, I would have thought the options you found were the right ones.
Another option for display along the same lines might be btop. People like to get fancy with status monitors. Either way, I think yours is looking great.
Thank you! I’m very happy with it, and I learned a lot. If I can figure out the margin thing I will definitely try to set up a fancier looking monitor, but right now htop is the most legible because of how it is displayed. Mainly just menu labels get cut off
I enjoyed this journey, congrats.
I would also like to recommend btop.
Also don’t get a different monitor, that one has such a strong aesthetic.
Thank you! Once I can figure out the margins I’m going to get a custom btop preset configured. Right now I can’t configure it in a way that important info isn’t cut off on the edges.
The TV does have dials to adjust, but only slightly, and if I adjust too much, it messes up the scan lines and the signal doesn’t come through clearly. I feel like the answer is just a little further down the rabbit hole of kernel params :)
Oh, that makes sense.
For a quick and dirty fix, you might be able to define columns using a multiplexer like gnu screen or tmux. I think I know how to do that using byobu (a screen/tmux config wrapper), so that it would come up by default with three panes set up like columns, with the first and the third being narrow to create faux margins, and the middle pane running your top of choice.
Also your CRT might have dials that can make the picture more narrow and pull it away from the edges.
This is great info, thanks! I did some messing around yesterday and got it opening a tty on boot, and disabled the startx so it stays there. I will look into the monitor power stuff too. Thanks!