LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-24-2011, 01:51 PM   #1
j_kubik
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Rep: Reputation: 1
Clear screen on logout using pam


If I logout on terminal, old contents are still possible to be read. I was trying to get it to work using pam_exec, by adding
Code:
session         optional        pam_exec.so     /usr/script/clrscr
to my /etc/pam.d/login, with /usr/script/clrscr contents
Code:
#!/bin/bash

export TERM="linux"
exec clear
This however didn't do antyhing. How to make it work using pam? I know that i can simply add some control codes to /etc/issue to get basically the same effect, but i wanted to do it using pam. Anybody knows how to?
 
Old 06-24-2011, 09:25 PM   #2
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
Clear screen before logout

Seems a lot of work,

clear;logout

works beautifully
 
  


Reply



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
Clear display on logout RexCoeus Linux - Newbie 5 01-07-2008 04:33 PM
how to clear bash history at logout yhus Linux - Software 6 09-27-2007 06:08 PM
clear screen on console logout sunpascal Linux - Newbie 6 02-09-2006 05:34 AM
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 05:02 PM
How do I get the screen to clear on logout? muxman Debian 1 12-02-2004 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:10 PM.

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
Open Source Consulting | Domain Registration