0

I have a Proxmox 6.2 HV (based on Debian10) in my chamber.

I would like to see BPYTOP instead of the login-prompt on my direclty to the server attached monitor. If bpytop is closed, the login-prompt should appear.

How is this possible?

1 Answers1

0

bpytop runs in the user world, so it needs to be run by a user. I would create a system user for this. If you don't give this system user sudo rights, then it's pretty limited in what it can do with this password-less scenario. Instead of using a conventional shell, I'd set this user to run bpytop.

adduser --system --shell $(which bpytop) bpytop-monitor

Now when you sudo su bpytop-monitor, bpytop will start running. When you exit out of bpytop, the user will log out.

Next we need to automatically log-in as bpytop-monitor when the machine boots. There have already been some answers on this here, so I'm going to paraphrase/customize:


Stuff below this line I haven't tested. Consider trying this in a VM or using a backup in case this prevents you from accessing your machine.


Edit your /etc/systemd/logind.conf, change #NAutoVTs=6 to NAutoVTs=1

Create /etc/systemd/system/getty@tty1.service.d/override.conf through:

systemctl edit getty@tty1

Paste the following lines

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin bpytop-monitor --noclear %I $TERM

Enable getty@tty1.service then reboot

systemctl enable getty@tty1.service
reboot
Stewart
  • 13,677
  • Great work, thanks a lot. BUT: If I close bpytop (Strg+C) it restarts instead of login-screen. Can this be improved? – Johannes C. Schulz Nov 16 '20 at 08:19
  • Hmmm, I think I see what's happening. getty@.service contains Restart=always. When you logged out, I expected it to be at the login prompt, but it appears that getty itself exits, then systemd restarts the service per Restart=always, giving you the loop. What happens if you CTRL+ALT+F2? If that works, you could reserve TTY1 for this monitor, then TTY2+ for normal user logins. – Stewart Nov 16 '20 at 10:17
  • Sadly, Strg+Alt+F2 doesn't anything . – Johannes C. Schulz Nov 16 '20 at 10:58