[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] running top on its console?
On Thu, 2005-01-06 at 13:54 +0000, Seb James wrote:
> On Thu, 2005-01-06 at 13:34 +0000, somecoolpc wrote:
> > All,
> >
> > Is it possable to run top on a console , but start the top process @
> > boot without any userinteraction on say console 5 or 6? , have tried
> > to do this for a while and could not figure it out!
> >
> > any help appricated
> >
> > Brett
> >
>
> Compile this tiny program, which will autologin a user of your system:
>
> int main() {
> execlp( "login", "login", "-f", "a_random_user", 0);
> }
>
> Call it autologin and stick it in /usr/local/sbin or something similar.
>
> Have init run this program; pop a line in /etc/inittab on your gentoo
> box.
To put it on the 6th console, for example replace this line in your
inittab (this is gentoo specific, other inittabs will differ slightly):
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
with:
c6:12345:respawn:/usr/local/sbin/autologin
>
> Put this in the .bashrc or .bash_profile of a_random_user :
>
> #!/bin/sh
> /bin/top
>
> And you're done.
>
> Seb
>
--
Sebastian James - Embedded Systems.
Hypercube Systems Ltd 'Embedded Linux Solutions'
35 Walkley Crescent Road, Sheffield, S6 5BA
Tel: 0845 4580277 Web: www.hypercubesystems.co.uk
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.