5

I have a headless Ubuntu server that I decided I wanted to put a monitor on to display status information. There are a ton of great programs available that display all sorts of status information, my problem is that I can't figure out how to get it to display on boot. When the server starts it just sits at the log-in prompt, of course I could just have it automatically log in at boot and run the program, but that is a security risk. How do I go about running, and displaying a program after boot without giving anyone with a keyboard access to the server?

I can imagine creating an unprivileged account and having it log into that at boot would work but I would prefer to have the program run independent of a terminal session.

Is there any alternatives?

Thanks

--UPDATE--

Ok, so I found this link: https://unix.stackexchange.com/questions/211544/run-top-instead-of-getty which almost completely describes what I want. I just need to know how to set the default displayed tty to tty5.

Any thoughts?

2
  • I'll write this as a comment. Personally, I'd configure the spawned getty on tty1 (virtual console 1) to run something else (like top). Alas, I have absolutely no idea how to do that now that 16.04 is running systemd. I googled around and all solutions seem very convulsed. Aug 25, 2016 at 7:45
  • Not exactly what you are asking for - but i guess i would run some kind of sys-info tool (i.e. glances) which allows cli & web-access. This gives you easy access to system informations from anywhere in your network and doesn't need a login on the machine itself
    – dufte
    Aug 25, 2016 at 7:50

1 Answer 1

0

I managed to follow some breadcrumbs to a solution.

Using a combination of both these links I managed to successfully have Glances display without login at boot. https://unix.stackexchange.com/questions/211544/run-top-instead-of-getty https://unix.stackexchange.com/questions/265014/how-to-start-a-script-on-tty-instead-of-asking-for-login-in-systemd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .