SYSLOGOUT(8) - man page online | administration and privileged commands

Modular centralized shell logout mechanism.

SYSLOGOUT(8)                         System Manager's Manual                         SYSLOGOUT(8)


syslogout - modular centralized shell logout mechanism


syslogout is a generic approach to enable centralized shell logout actions for all users of a given system in a modular and centralized way mostly aimed at avoiding work for lazy sysadmins. It has only been tested to work with the bash shell. It basically consists of the small /etc/syslogout shell script which invokes other small shell scripts having a .bash suffix which are contained in the /etc/syslogout.d/ direc‐ tory. The system administrator can drop in any script he wants without any naming conven‐ tion other than that the scripts need to have a .bash suffix to enable automagic sourcing by the /etc/syslogout script. For shell sessions, the contents of /etc/syslogout.d/" will be sourced by every user at logout if the following lines are present in his $HOME/.bash_logout: if [ -f /etc/syslogout ]; then . /etc/syslogout fi If used for X sessions it is advisable to include the former statement into the Xreset script of the X display manager instead to prevent that closing of an terminal emulator window yields unexpected results in your running X session if your X11 terminal emulator is using a login shell. Be sure then to run it under the user-id of the X session's user. See the example files in /usr/share/doc/syslogout/ for illustration. Users not wanting /etc/syslogout to be sourced for their environment can easily disable it's automatic mechanism. It can be disabled by simply creating an empty file called $HOME/.nosyslogout in the user's home directory using e.g. the touch(1) command. Any single configuration file in /etc/syslogout.d/ can simply be overridden by any user by creating a private $HOME/.syslogout.d/ directory which may contain a user's own version of any configuration file to be sourced instead of the system default. It's names have just to match exactly the system's default /etc/syslogout.d/ configuration files. Empty ver‐ sions of these files contained in the $HOME/.syslogout.d/ directory automatically disable sourcing of the system wide version. Naturally, users can add and include their own private scripts to be automagically exe‐ cuted by /etc/syslogout at logout time.


There are no options other than those dictated by shell conventions. Anything is defined within the configuration scripts themselves.


The README files and configuration examples contained in /usr/share/doc/syslogout/ and the manual page for bash(1), xdm(1x), xdm.options(5), and wdm(1x). Recommended further read‐ ing is everything related with shell programming. If you need a similar mechanism for executing code at login time check out the related package sysprofile(8) which is a very close companion to syslogout.


syslogout in its current form is mainly restricted to bash(1) syntax. In fact it is actu‐ ally a rather embarrassing quick and dirty hack than anything else - but it works. It serves the practical need to enable a centralized bash configuration until something bet‐ ter becomes available. Your constructive criticism in making this into something bet‐ ter" is very welcome. Before i forget to mention it: we take patches... ;-)


syslogout was developed by Paul Seelig <> specifically for the Debian GNU/Linux system. Feel free to port it to and use it anywhere else under the conditions of either the GNU public license or the BSD license or both. Better yet, please help to make it into something more worthwhile than it currently is.
This manual Reference Other manuals
syslogout(8) referred by sysprofile(8)
refer to bash(1) | sysprofile(8) | touch(1) | wdm(1x) | xdm(1) | xdm.options(5)