[PLUG] Auto start HTOP in tty.

Chuck Hast wchast at gmail.com
Fri Aug 28 23:41:20 UTC 2020


There that brought a bunch of stuff back (old sux) and I
started seeing light flashes, as I knew I had done it in the
past but just could not remember how.

This is a server box so there is no X on it.  I will take a
look at screen/tmux, and see how that does.  Thank you
very much.


On Fri, Aug 28, 2020 at 6:34 PM King Beowulf <kingbeowulf at gmail.com> wrote:

> On 8/28/20 12:00 PM, Chuck Hast wrote:
> > Folks,
> > I have a server that I would like to have HTOP startup in
> > one of the TTY's so far all I find are how to do it from the
> > GUI (no gui this is a server) I would like for HTOP to start
> > in say terminal 3 for grins (I use 1 and 2 for doing changes
> > or whatever stuff I need if I am not doing it over and SSH
> > screen)
> >
> > So far I have not been able to find some instruction to have
> > a terminal (tty) start a program, any guidance here?
> >
> >
>
> As mentioned, assuming no X sessions, you can add a line to /etc/inittab
>
> For example (in Slackware):
>
> ...
> # These are the standard console login getties in multiuser mode:
> c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
> c2:12345:respawn:/sbin/agetty 38400 tty2 linux
> c3:12345:respawn:/sbin/agetty 38400 tty3 linux
> c4:12345:respawn:/sbin/agetty 38400 tty4 linux
> c5:12345:respawn:/sbin/agetty 38400 tty5 linux
> c6:12345:respawn:/sbin/agetty 38400 tty6 linux
> htop:2345:respawn:/usr/bin/htop </dev/tty7 >/dev/tty7 2>&1
>
> ...
>
> That last line runs htop in tty7 accessible via ALT-F7
>
> However, a better way is to use screen or tmux (or similar).  That way
> you can access everything locally OR via ssh. If htop is already running
> on a tty, there is no good way to access it via ssh.
>
> If you are on a systemd box, then there is a config file for tty setup.
>
> -Ed
>
> _______________________________________________
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>


-- 

Chuck Hast  -- KP4DJT --
I can do all things through Christ which strengtheneth me.
Ph 4:13 KJV
Todo lo puedo en Cristo que me fortalece.
Fil 4:13 RVR1960



More information about the PLUG mailing list