Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
clear on logout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
meekrob
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2002
Posts: 81
Location: Tempe, AZ USA

PostPosted: Thu Apr 18, 2002 12:07 am    Post subject: clear on logout Reply with quote

I've been able to clear the screen upon logout by adding clear to ~/.logout but I was wondering if there is a way to make this happen globally (meaning for every user)?
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Thu Apr 18, 2002 2:20 am    Post subject: Reply with quote

Try:
Code:
clear > /etc/issue
and
man issue


You can also had some special variables to print the time, users logged in, kernel, etc.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
dacoval
n00b
n00b


Joined: 17 Apr 2002
Posts: 6
Location: Qld, Australia

PostPosted: Thu Apr 18, 2002 2:40 am    Post subject: Reply with quote

correct me if im wrong, but wont have have to add `clear` not just clear to /etc/issue to make this work???
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Thu Apr 18, 2002 2:49 am    Post subject: Reply with quote

No, the command clear actually sends a special sequence of characters to the terminal, just like a command for it to clear up. These are called escape sequences. You can try it doing this:
Code:
clear > test
nano test
cat test

_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Thu Apr 18, 2002 2:56 am    Post subject: Reply with quote

dacoval wrote:
correct me if im wrong, but wont have have to add `clear` not just clear to /etc/issue to make this work???


If i said "echo clear > /etc/issue" it would be as you expected.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
Framba
n00b
n00b


Joined: 18 Apr 2002
Posts: 18
Location: Italy

PostPosted: Thu Apr 18, 2002 10:13 am    Post subject: Reply with quote

And what should I do to change the message I see before I log in?
Back to top
View user's profile Send private message
+BroNNoS+
n00b
n00b


Joined: 17 Apr 2002
Posts: 46
Location: Groningen, The Netherlands

PostPosted: Thu Apr 18, 2002 6:13 pm    Post subject: Reply with quote

I don't understand this last question:
from man issue:

The file /etc/issue is a text file which contains a mes-
sage or system identification to be printed before the
login prompt. It may contain various @char and \char
sequences, if supported by getty(1).

So there you have your answer... or not?
Back to top
View user's profile Send private message
meekrob
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2002
Posts: 81
Location: Tempe, AZ USA

PostPosted: Thu Apr 18, 2002 6:46 pm    Post subject: Thanks! Reply with quote

Thanks guys. I got it like this:
Code:
clear>/etc/issue

Then I edited the file to add my login message.

If you want to add a message after login, edit motd.

Thanks again!
Back to top
View user's profile Send private message
Framba
n00b
n00b


Joined: 18 Apr 2002
Posts: 18
Location: Italy

PostPosted: Fri Apr 19, 2002 7:06 am    Post subject: Reply with quote

+BroNNoS+ wrote:
I don't understand this last question:
from man issue:

The file /etc/issue is a text file which contains a mes-
sage or system identification to be printed before the
login prompt. It may contain various @char and \char
sequences, if supported by getty(1).

So there you have your answer... or not?

Yes, You are right :oops: Sorry :P
But issue has such a short man page... How can I display the tty? Using getty (no man pages for it)?
Back to top
View user's profile Send private message
sven
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 274

PostPosted: Fri Apr 19, 2002 12:27 pm    Post subject: Reply with quote

If you want to clear the screen after logging out (/etc/issue cleans the screen before the login prompt I guess, did not try it though) you have to put the clear command (the command, NOT the escape code) into the file .bash_logout in your home directory (as long as you are using bash, of course). If you also want this to happen to all new users you create, copy .bash_logout into /etc/skel.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sun Mar 16, 2003 3:47 am    Post subject: Reply with quote

Some more info in clear console at logout?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum