FreeBSD – running HTOP instead of login screen on TTY0 console
Author: Yaroslav Koisa
Created on 6 January 2021
Last edit commited on 5 July 2023
Please note:This blog post is not yet finished. Everything should work as expected, but the post lacks some screenshots/photos, explanation to most of the steps, etc.
Table of Contents
1. Install htop and tmux or build them from ports
pkg install htop
## I will be using nano as my editor of choise and bash as my shell of choise. Let's install them:
pkg install nano bash
2. Edit /etc/gettytab
Edit /etc/gettytab and add few additional lines to end of that file:
nano /etc/gettytab
HTOP|htop|HTOP running inside of TMUX:\
:ht:np:sp#15200:lo=/root/start-htop.sh:al=root:
3. Create start-htop.sh and run chmod +x to allow execution
Create our start-htop.sh and add the required commands to it:
nano /root/start-htop.sh
And replace the line that starts with ttyv0 (it was at line 32 in my config) with the next line:
ttyv0 "/usr/libexec/getty htop" xterm on secure
5. Reboot or run kill -1 1 to reflect the latest changes
At this point everything is ready and you have 2 options – reboot the system or hup the init system in order to show the latest changes on the screen at TTY level.
a) Reboot:
reboot
OR
b) Send HUP to init system:
kill -1 1
Consider donating towards our project, to support a future content release