Sponsored Content
Top Forums Shell Programming and Scripting How can i TRAP a user Logout action? Post 303002127 by mohtashims on Friday 18th of August 2017 06:14:57 AM
Old 08-18-2017
Quote:
Originally Posted by apmcd47
Try adding:
Code:
trap 'source ~/.bash_logout' exit

in your .bash_profile file. This will force the .bash_logout file to be sourced every time you exit.

Andrew
Thank you. After implementing your suggestion it works no matter how you close the session.Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Canīt logout to user inactive

I have SCO OpenServer release 5 I used TIMEOUT and TMOUT in .profile but I donīt Know if is correctly WND=/usr/synergy/dbl DTKMAPFIL=/u/ics/icsdat/icsmap.ics umask 000 ... (1 Reply)
Discussion started by: lalox
1 Replies

2. UNIX for Advanced & Expert Users

tracking user action

Hi, we are using solaris8. we have some files disappear. I would like to know how to track who and when the files was remove ??? thanks, (7 Replies)
Discussion started by: xitrum
7 Replies

3. HP-UX

setup a logfile for user login/logout ???

Hi everybody, im a newer, i want to setup a logfile to capture information about user login/logout (and some other events ex: a user ftp, run a speacial command) on my system in HP-UX, pls help me. i think only edit file /etc/syslog.conf but dont know how to do it. Help me. (0 Replies)
Discussion started by: pwd
0 Replies

4. UNIX for Dummies Questions & Answers

setup a logfile for user login/logout ???

Hi everybody, im a newer, i want to setup a logfile to capture information about user login/logout (and some other events ex: a user ftp, run a speacial command) on my system in HP-UX, pls help me. i think only edit file /etc/syslog.conf but i dont know how to do it. Help me. (3 Replies)
Discussion started by: pwd
3 Replies

5. Linux

What happens when user logout?

Hi When executing some commands, we need to re-login into the account. What happens when logged out and login ? Are there any scripts (.bashrc .... ) to be executed or to update system files. Help Me .......... (1 Reply)
Discussion started by: yhacks
1 Replies

6. Shell Programming and Scripting

run a script on logout by a non-root user

hi , i need to run a script that delete files when i logout as a user other than root user . I have tried out using .bash_logout but that doesnt seem to work , so any alternative for this to be done. Thanks in advance, Harsha (6 Replies)
Discussion started by: harsha10
6 Replies

7. UNIX for Dummies Questions & Answers

trap signal on user logout ?

hi all , I want to execute a script on the user logout(using gnome environment). Is ther any way to execute it through TRAP stmt? (2 Replies)
Discussion started by: harsha10
2 Replies

8. Shell Programming and Scripting

How to trap a user keypress

Yo, I program Unix for fun- except when editing my website removed by reborg - and wanted to learn how to track, trap, and use to my advantage a user keypress. I know there is a built-in JS function that can do that, but Javascript is a client-side language, therefore not usable in Unix, and... (2 Replies)
Discussion started by: signebedi
2 Replies

9. AIX

AIX Syslog login/logout User

Hi, i'm trying to configure /etc/syslog.conf for log user access. In debian i add: auth,authpriv.* @serverName I don't know the correct Aix syntax for syslog :( My @serverName get the log successfully.. I need to log correct/incorrect login attempts. Thanks (5 Replies)
Discussion started by: hankBuck
5 Replies

10. UNIX for Dummies Questions & Answers

Capturing the login logout details of user

Hi I'm new to Shell scripting .Can anyone please help me how to capture user's login and logout details and load them into a table... we are using Oracle DB on UNIX:confused: (3 Replies)
Discussion started by: rajmohan146
3 Replies
xfce4-session-logout(1) 				      General Commands Manual					   xfce4-session-logout(1)

NAME
xfce4-session-logout - Logs out from Xfce SYNOPSIS
xfce4-session-logout DESCRIPTION
This manual page documents briefly the xfce4-session-logout command. The xfce4-session-logout command allows you to programmatically logout from your Xfce session. It requests the session manager to display the logout confirmation screen, or, if given one of the command-line options below, causes the session manager to take the requested action immediately. OPTIONS
xfce4-session-logout takes the following command line options: --logout Log out without displaying the logout dialog. --halt Halt without displaing the logout dialog. --reboot Reboot without displaying the logout dialog. --suspend Suspend without displaying the logout dialog. --hibernate Hibernate without displaying the logout dialog. --fast Do a fast shutdown. This instructs the session manager not to save the session, but instead to quit everything quickly. --help Print a help screen and exit. --version Output version information and exit. AUTHOR
xfce4-session-logout and this manual page were written by Brian Tarricone <kelnos@xfce.org> and Benedikt Meurer <benny@xfce.org> as part of the Xfce project. REPORTING BUGS
Report bugs to http://bugzilla.xfce.org/. COPYRIGHT
Copyright (C) 2004 Benedikt Meurer. Copyright (C) 2008 Brian Tarricone. Oct 7, 2008 xfce4-session-logout(1)
All times are GMT -4. The time now is 04:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy