Código:
When logging out of a linux system running the BASH shell, file .bash_logout is executed. This file is usually very short, and contains commands users want to execute upon leaving the account. The most popular is the clear command, which clears the screen.
Coloca tus comandos en el archivo ~/.bash_logout
http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/advanced/node125.html
Con ls -a veo que en mi equipo .bash_logout está en /home/user/.bash_logout ¿lo edito con nano y meto los mismos comandos allí o cómo?
[Edito]
Ya lo he hecho, finalmente ha quedado así:
Citar
# ~/.bash_logout: executed by bash(1) when login shell exits.
#!/bin/bash
# Pequeño script para remover "Documentos recientes" en Ubuntu, a lo rapido.
cat "$HOME/.recently-used.xbel" | grep -vi "file:" > "temporal.txt"
mv "temporal.txt" "$HOME/.recently-used.xbel"
exit 0;
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
#!/bin/bash
# Pequeño script para remover "Documentos recientes" en Ubuntu, a lo rapido.
cat "$HOME/.recently-used.xbel" | grep -vi "file:" > "temporal.txt"
mv "temporal.txt" "$HOME/.recently-used.xbel"
exit 0;
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi