[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: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.
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.