LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-07-2008, 04:47 PM   #1
RexCoeus
Member
 
Registered: Jul 2007
Location: Cantina on Mos Eisley
Distribution: Slackware, Ubuntu
Posts: 39

Rep: Reputation: 15
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.
 
Old 01-07-2008, 05:00 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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!
 
Old 01-07-2008, 05:01 PM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
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
 
Old 01-07-2008, 05:03 PM   #4
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
I wasn't aware that .bash_logout was a shell script and needed to be executable...

Hmm, learn something new every day!
 
Old 01-07-2008, 05:13 PM   #5
RexCoeus
Member
 
Registered: Jul 2007
Location: Cantina on Mos Eisley
Distribution: Slackware, Ubuntu
Posts: 39

Original Poster
Rep: Reputation: 15
great, thanks for your help everyone.
 
Old 01-07-2008, 05:33 PM   #6
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I display a logout message? gerben12 Linux - Server 2 10-30-2007 04:51 PM
how to clear bash history at logout yhus Linux - Software 6 09-27-2007 07:08 PM
clear screen on console logout sunpascal Linux - Newbie 6 02-09-2006 06:34 AM
X display resolution after logout amwink Slackware 14 04-07-2005 07:35 PM
How do I get the screen to clear on logout? muxman Debian 1 12-02-2004 03:13 AM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration