Clearing the tty console screen on logout
Hello, guys. I am just wondering if there is a way to clean the screen when u log out from the console(where you get to by pressing ALT+CTRL+F?)?
For example, when I log into from the console, do some work and edit some files there, after I logged out, the stuff I worked on is still showed on the screen. And that make other ppl easily find out what was I doing... (Although I am not doing anything strange... what can u expect from a console... :P) So, any idea? Thanks in advance :) |
I have the following in the file ~/.bash_logout:
# ~/.bash_logout: executed by bash(1) when login shell exits. # when leaving the console clear the screen to increase privacy case "`tty`" in /dev/tty[0-9]) clear esac but there are other ways to do it, too pressing STRG+L or (CTRL+L) for instance... pressing ALT+CTRL+F does nothing - at my machine, that is... |
oops - I misunderstood you here - because I use always ALT+Right-Arrow / ALT+Left-Arrow to change consoles
|
It is ok... I should hav put it like "ALT+CTRL+F[1-9]" maybe? :)
but the script doesnt work here... :scratch: I am using Gentoo, with a bash shell.... that means it should work doesnt it? weird.... :confused: |
Oh I found the problem... Gentoo names consoles as /dev/vc/[0-7]... :)
Thanks! |
You have devfs - the standard in Gentoo - at least it was that way.
Thats why (not only these) names are different. I used that too, but decided to switch back to "normal" and see what sysfs and udev might bring... |
devfs... I heard of this term before but dun actually understand what does it mean... and how does it differ from the traditional approach on handling devices..... coz I dun even know about the traditional ways.... :D I think I should grab a book on that later after I finish my exams next month :)
Thanks. |
devfs is about dynamically assigning device-nodes (or device-files ?) to avoid having hundreds of device-nodes under /dev that you actually never use - there are more than 150 entries for harddiscs for example (/dev/hd?).
Linux is not a System primarily for desktops, where one usually has one harddisc and a CD-Rom-drive and few people are having 4 or even more ide-drives - but still these entries are present. With devfs you just have device nodes for the hardware that is actually connected to your system and they get added dynamically, as they are present. That is more or less it (very roughly). Good luck -if it is a matter of luck :-; for you and your exams! |
Thanks for your explanation :)
That saved me a lot of time looking up :D Enjoy life! |
All times are GMT -5. The time now is 04:17 AM. |