Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



BROWSERS & PRIVACY


For people worried about their privacy on a computer shared by more then one user, the most obvious option is, of course, to make a user account for each user. But if you would want to do some additional cleaning, this tip may be one for you.

In the KDE Control Center under Security there is a section called "Privacy" where you can clear the cache, history, cookies etc. from the Konqueror web browser. If, however, you use the Galeon or Firefox web browser this action has no effect on the privacy related items of that browser.

What you can do in that case is make a little script that will run every time you log in to KDE . . . here is what you do ( as user ):

CODE
$ vi ~/.kde/Autostart/clean-browser.sh
( or use any other editor if you are not comfortable with Vi )

Copy and paste the next lines:

QUOTE = Script
#!/bin/bash
# Browser Privacy script
rm -rf ~/.galeon/favicon_cache.xml
rm -rf ~/.galeon/mozilla/galeon/Cache/*
rm -rf ~/.galeon/history.xml
rm -rf ~/.galeon/mozilla/galeon/cookies.txt
rm -rf ~/.galeon/mozilla/galeon/cookperm.txt
rm -rf ~/.galeon/mozilla/galeon/search.rdf
rm -rf ~/.galeon/session_crashed.xml

rm -rf ~/.mozilla/firefox/*.default/history.dat
rm -rf ~/.mozilla/firefox/*.default/cookies.txt
rm -rf ~/.mozilla/firefox/*.default/downloads.rdf
rm -rf ~/.mozilla/firefox/*.default/formhistory.dat
rm -rf ~/.mozilla/firefox/*.default/history.dat
rm -rf ~/.mozilla/firefox/*.default/search.rdf
rm -rf ~/.mozilla/firefox/*.default/Cache/*


Save the file ( In Vi with Esc+ZZ )

And make the script executable:

CODE
$ chmod 755 ~/.kde/Autostart/clean-browser.sh


Now every time you log in the script will run and clear out the cache, cookies and history of the Galeon browser.


If you would like to automate the same thing for Konqueror ( so you don't have to go to the KDE Control Center --> Security --> Privacy after every session ) you can add the next lines to the script above:

QUOTE = Script
rm -rf ~/.kde/share/apps/konqueror/konq_history
touch ~/.kde/share/apps/konqueror/konq_history
rm -rf ~/.kde/share/apps/kcookiejar/cookies
touch ~/.kde/share/apps/kcookiejar/cookies
rm -rf ~/.kde/share/config/konq_history
touch ~/.kde/share/config/konq_history


And maybe . . now that you are removing traces anyway . . what about the "recent documents" ? . . Just add this one as well:

QUOTE = Script
rm -rf ~/.kde/share/apps/RecentDocuments/*



So now you can stop worrying if your browsing habits will be visible to the next person that boots your computer.


Hint: Just giving the command "~/.kde/Autostart/clean-browser.sh" will do the cleaning for you without logging out and back in again.



Bruno


-- Apr 5 2005 ( Revised Mar 06 2008 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email