dumb question: how to clear console after bsd logout?

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
when i log out of my openbsd machine the stuff the previous user was doing is still on the screen. of course this is only for local console, and yes i could simply do a 'clear' before i logout, but its the principle of the matter. is there any type of motd or rc. file that would handle this?
 
 

Bremen

Senior member
Mar 22, 2001
658
0
0
I second this: the same thing happens in Slackware... I'm guessing you would modify some file in agetty, or whatever BSD uses. Since no one else uses my machine I haven't been motivated to dig deep enough yet :0)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Wow! I was right!

7.3 - Clearing the console each time a user logs out.

To do this you must add a line in /etc/gettytab(5). Change the current section:

P|Pc|Pc console:\
:np:sp#9600:

adding the line ":cl=\E[H\E[2J:" at the end, so that it ends up looking like this:

P|Pc|Pc console:\
:np:sp#9600:\
:cl=\E[H\E[2J:


 

Bremen

Senior member
Mar 22, 2001
658
0
0
hrm, maybe we should build a monument to monkey's genius... or better yet, we'll make a faq or HOWTO about his genius ;0)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< hrm, maybe we should build a monument to monkey's genius... or better yet, we'll make a faq or HOWTO about his genius ;0) >>



If you could get people to read the FAQs and documentation before posting Id be even happier ;)
 

Bremen

Senior member
Mar 22, 2001
658
0
0
First I think we'd have to teach people how to read and write. Then maybe they'd be able to read documentation.
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
Hey, I've been reading the bsd faq like its my job the past few days. I just happened to miss that one i guess. thanks n0c
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
i've never been too sure about what getty does. i take this recent information to mean that it controls local terminal connections?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< Hey, I've been reading the bsd faq like its my job the past few days. I just happened to miss that one i guess. thanks n0c >>



I flame the Windows users for frequently asked questions I have to flame those that use real OSes too. I didnt think my flame for this one was too bad ;)

As far as getty goes, it can go a WHOLE lot. Including a lot with the terminals and other login methods I believe.
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
i think part of the problem with understanding getty is that each distro has a different version that does different things. i know that linux uses a different one for example. since i'm learning linux and bsd largely at the same time, it gets hard to distinguish between the two implementations sometimes.