Forum › Forums › New users › New Users and General Questions › Understanding desktop-session-antix › Reply To: Understanding desktop-session-antix
Thanks for info Dave, may I be so cheeky and ask for example here, this is especialy good clearing temporary files, cache files, and saving.
Basically the same as the snapshot excludes is a good place to start. Keep in mind that whatever you add will increase the shutdown/logout time. So if you have multiple GB worth of cached data, you will probably want to remove them manually the first time. Then with regular use (multiple logouts/logins) it should be kept small enough not to cause a significant speed problem. Another way is to move them to a trash location rather than remove them; then remove them when you do not mind waiting.
$ cat ./shutdown
rm -r $HOME/.cache/mozilla/30as99eb.Junk
rm -r $HOME/.mozilla/firefox/30as99eb.Junk
cp -r $HOME/.mozilla/clean/30as99eb.Junk $HOME/.mozilla/firefox/30as99eb.Junk
rm -r $HOME/.cache/mozilla/f74jq05y.Default
rm -r $HOME/.mozilla/firefox/f74jq05y.Default
cp -r $HOME/.mozilla/clean/f74jq05y.Default $HOME/.mozilla/firefox/f74jq05y.Default
rm -r $HOME/.cache/chromium
rm -r $HOME/.config/chromium
rm $HOME/.config/hexchat/logs
rm $HOME/.bash_history
rm $HOME/.lesshst
rm $HOME/.python_history
rm $HOME/.local/share/recently-used.xbel
rm $HOME/.local/share/Trash
rm $HOME/.Trash
#mv $HOME/.xsession-errors $HOME/.desktop-session/xsession-errors-$(date +"%Y-%m-%d_%H-%M")
rm $HOME/.xsession-errors
Another thing to note (That I am not sure is common knowledge):
After you are happy with your startup / shutdown files you may wish to make them immutable.
Log in as root in the users ~.desktop-session directory and run
chmod 544 shutdown && chattr +i shutdown
chmod 544 startup && chattr +i startup
Then when you need to make an edit
chattr -i shutdown && chmod 744 shutdown
chattr -i startup && chmod 744 startup
Of course you can leave the permissions at 744 and only make it immutable instead.
This prevents someone pulling a prank on you and adding a nasty rm -r $HOME when you are not looking. Unless they know your root login in which case you have bigger problems (or your user password depending on sudo configuration).
- This reply was modified 4 years, 9 months ago by Dave.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown