Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-07-2008, 03:47 PM
|
#1
|
Member
Registered: Jul 2007
Location: Cantina on Mos Eisley
Distribution: Slackware, Ubuntu
Posts: 39
Rep:
|
Clear display on logout
I decided to install Slackware 12 on an extra computer in an attempt to really learn a no-nonsense linux distro. So far everything is going well, but I'm having a slight problem. When I log out of an account in multiuser mode (runlevel 3), the screen does not clear when the new login prompt appears. I have a Linux security book that tells me to place a ( /usr/bin/clear ) line in the .bash_logout file, but I cannot seem to find that file. It is not in my home directory, or in the /etc/skel directory either. I know it is a hidden file, so don't think that I'm just making that mistake. Is it possible that the slackware distro has placed this file elsewhere, or that it is called by another name? Thanks for any suggestions.
|
|
|
01-07-2008, 04:00 PM
|
#2
|
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181
Rep:
|
You can simply create the file to suit your needs -- go ahead and type the following and it'll create the file with all of the relevant details: "echo '/usr/bin/clear' > .bash_logout" -- it's that simple!
Many of the .bash files aren't created by default (this includes .bashrc, .bash_profile, et cetera), at least not by Slackware -- if they aren't needed, they aren't included (Slackware's MO for quite some time now).
Happy slacking!
|
|
|
01-07-2008, 04:01 PM
|
#3
|
Member
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446
Rep:
|
If the file doesn't exist, simply create it.
put:
Code:
#!/bin/bash
/usr/bin/clear
in your ~/.bash_logout and
chmod u+x ~/.bash_logout
to make it executable 
|
|
|
01-07-2008, 04:03 PM
|
#4
|
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181
Rep:
|
I wasn't aware that .bash_logout was a shell script and needed to be executable...
Hmm, learn something new every day!
|
|
|
01-07-2008, 04:13 PM
|
#5
|
Member
Registered: Jul 2007
Location: Cantina on Mos Eisley
Distribution: Slackware, Ubuntu
Posts: 39
Original Poster
Rep:
|
great, thanks for your help everyone.
|
|
|
01-07-2008, 04:33 PM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
This may be a better way as this would work for all users on the system. This is not my work but taken from the BLFS project.
Quote:
One of the most common things which people want to do is clear the screen at each logon. The easiest way of doing that is to put a "clear" escape sequence into /etc/issue. A simple way of doing this is to issue the command clear > /etc/issue. This will insert the relevant escape code into the start of the /etc/issue file. Note that if you do this, when you edit the file, you should leave the characters (normally '^[[H^[[2J') on the first line alone.
|
Note that you will need to do this as root.
|
|
|
All times are GMT -5. The time now is 10:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|