Eliminating Flash Cookies via the Command-Line
In a previous article I wrote about Flash-Cookies and some ways of controlling them from the desktop. Controlling Flash Cookies via the command-line is just as easy.
Basically for those working from a graphical desktop, dealing with flash-cookies means installing a browser plugin or accessing Adobe's control panel via their web-site. (Personally, I like the Mozilla-Firefox/BetterPrivacy-plugin combination).
Before you start, visit Adobe's Settings Manager Page to see your current cookie history.
It's been reported that Method 1 breaks flash on some sites, so I've updated the how-to to include some alternate suggestions.
Here is Method 1 for eliminating flash-cookies via the command-line, (in a terminal):
- For non-Ubuntu systems, go into superuser mode by typing:
su
Note:This step is not necessary in most cases, since you're only changing the setup for your /home user you won't need superuser privileges – I've just gotten so used to using su and sudo that I automatically include it in most of my terminal commands.
If you're not sure, run the commands without superuser powers, if the system balks, change to superuser or sudo.
Same applies to Ubuntu based systems – try without sudo, and use sudo only if the system demands it by preceding the commands withsudo - In your terminal type:
find -iname '*.sol'
This command will list all the relevant folders. - Backup, backup, backup - backup the relevant folders in case it becomes necessary to revert the changes:
mkdir ./.macromedia.sav
then:
cp -a ./.macromedia/* ./.macromedia.sav/ - Now remove the ./.macromedia folders.
rm -rf ./.macromediaYou may or may not be familiar with warnings about using rm- rf – it's a very powerful command that deletes folders and files recursively so be very careful with it. - Now the ./.macromedia folder needs to be linked to /dev/null.
ln -s /dev/null ./.macromediaCheck to make sure the command worked with:
ls -al ./.macromediaWhich should return a result ending with:
./.macromedia -> /dev/null
Voila. Flash Cookies will no longer be stored.
Check by visiting a flash-site. (eg: This Ted Talks Video of the Month), and visiting Adobe's Settings Manager page to see if any cookies are listed.
At this point you might be wondering what /dev/null is, so here's the definition:
To undo Method 1:
sudo rm -rf ./.macromediamv ./.macromedia.sav ./.macromediachown yourusername:yourusername ./.macromedia
then
And since cleanliness is next to godliness, if everything worked ok and you're happy with the changes,
rm -rf ./.macromedia.sav to get rid of the old ./.macromedia folder.
Method 2
- Move to the .macromedia folder
cd ~/.macromedia - Remove the Flash_Player folder:
sudo rm -rf Flash_Player - Create a symbolic link to /tmp:
ln -s /tmp Flash_Player
The Flash plugin should now happily use the /tmp folder to store flash-session data, and since /tmp is cleared on reboot, all the flash-cookies will be cleared when you log-out.
Source: Pallgone's Blog
To undo Method 2
- Move back to the macromedia folder:
cd ~/.macromedia - Have a look inside the folder, only Flash_Player should be there:
ls -al - Remove the symbolic link:
sudo rm -rf Flash_Player - Re-install the flashplugin to make sure the file hierarchy is as it needs to be:
sudo apt-get install --reinstall flashplugin-nonfree - Adobe's Setting Manager
- Pallgone's Blog
- The Inquirer – Banish Flash Cookies...
- WikiAnswers – What is /dev/null
- ghacks.net – article
- I'm a Super.com article
Both of these methods will remove all flash-cookies from your system. They are "absolute". There are some situations in which you might want to keep certain flash-cookies on your system, and for those who do, the Firefox and BetterPrivacy Plugin combination is a very effective way of controlling what stays and what doesn't.
Resources:
As per usual, comments are welcome...
Comments
flash cookie removal
thanks, very nice
Post new comment