View previous topic :: View next topic |
Author |
Message |
meekrob Tux's lil' helper
Joined: 13 Apr 2002 Posts: 81 Location: Tempe, AZ USA
|
Posted: Thu Apr 18, 2002 12:07 am Post subject: clear on logout |
|
|
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 |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Thu Apr 18, 2002 2:20 am Post subject: |
|
|
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 |
|
|
dacoval n00b
Joined: 17 Apr 2002 Posts: 6 Location: Qld, Australia
|
Posted: Thu Apr 18, 2002 2:40 am Post subject: |
|
|
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 |
|
|
fghellar Bodhisattva
Joined: 10 Apr 2002 Posts: 856 Location: Porto Alegre, BR
|
Posted: Thu Apr 18, 2002 2:49 am Post subject: |
|
|
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 |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Thu Apr 18, 2002 2:56 am Post subject: |
|
|
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 |
|
|
Framba n00b
Joined: 18 Apr 2002 Posts: 18 Location: Italy
|
Posted: Thu Apr 18, 2002 10:13 am Post subject: |
|
|
And what should I do to change the message I see before I log in? |
|
Back to top |
|
|
+BroNNoS+ n00b
Joined: 17 Apr 2002 Posts: 46 Location: Groningen, The Netherlands
|
Posted: Thu Apr 18, 2002 6:13 pm Post subject: |
|
|
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 |
|
|
meekrob Tux's lil' helper
Joined: 13 Apr 2002 Posts: 81 Location: Tempe, AZ USA
|
Posted: Thu Apr 18, 2002 6:46 pm Post subject: Thanks! |
|
|
Thanks guys. I got it like this:
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 |
|
|
Framba n00b
Joined: 18 Apr 2002 Posts: 18 Location: Italy
|
Posted: Fri Apr 19, 2002 7:06 am Post subject: |
|
|
+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 Sorry
But issue has such a short man page... How can I display the tty? Using getty (no man pages for it)? |
|
Back to top |
|
|
sven Apprentice
Joined: 19 Apr 2002 Posts: 274
|
Posted: Fri Apr 19, 2002 12:27 pm Post subject: |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20417
|
Posted: Sun Mar 16, 2003 3:47 am Post subject: |
|
|
Some more info in clear console at logout? _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|