LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 09-21-2007, 11:21 AM   #1
Coviti
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
dash logout script?


Currently, when I log out (Ctrl-D), dash doesn't clear the screen before showing the new login prompt. I'd like to have dash execute a script (or simply execute /usr/bin/clear) when I press Ctrl-D.

I know I could do this in bash with ~/.bash_logout. But for dash -- Google has been no help. So, is something like this possible (and somewhat simple)?

Thanks
 
Old 09-24-2007, 10:50 AM   #2
LeLutin
LQ Newbie
 
Registered: Sep 2007
Distribution: Debian, Ubuntu
Posts: 5

Rep: Reputation: 0
Post

Found no help either.
But what you could do is this: in dash, the command to exit the shell is "exit" so you could have in your .profile:

alias logout='clear;exit'

and logout will clear before exiting. this is only useful for an interactve logout though.

edit: oh, and it won't work with Ctrl-D either -_-

Last edited by LeLutin; 09-24-2007 at 10:52 AM.
 
Old 09-24-2007, 01:40 PM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
That way you can have something as a login shell, and in initialization you can put 'dash; doexit; exit' . It will work better, I guess..
 
  


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
logout/exit script ?? aherrys Linux - Software 3 12-30-2006 11:42 AM
KDE logout script - where is it? Riddick Linux - Software 7 09-08-2005 04:02 PM
.logout script On NetBSD EECore *BSD 0 07-10-2005 12:27 PM
logout after script runs bigdog0007 Linux - Newbie 6 06-24-2005 05:42 PM
logout script jaraju Linux - General 1 02-25-2005 10:44 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration