Search My Blog

Sunday, June 13, 2010

TildeHash - A Windows-style Fix to a WINE Problem

tildehash:~# A Windows-style Fix to a WINE Problem
Author: Jacob Barkdull on Thursday, June 10 2010
The problem with emulating Windows -- or since "WINE Is Not an Emulator" I should say: the problem with developing a "Windows Compatibility Layer" -- is you end up having the same problems Windows has. If WINE is compatible with anything, it seems to be mostly with Windows' flaws :)

If you remember "Microsoft Windows XP" you may be aware of Windows' little problem of keeping too many "temporary" files for too long (I don't know if this is still a problem with Vista and 7.) These files can be Internet files (web cache, history, downloaded files, and Internet Explorer's apparent backups of these files) or ".bak" files, etc. All of these files over a year or two of usage can make up a total size anywhere between 3 to 15 gigabytes. That's a lot of hard drive space used simply for files that are supposed to be temporary.

And you may have guessed it by now, but yes, WINE has the same problem. If you use WINE regularly, view the properties of the directory "~/.wine" that is "/home/<username>/.wine", you'll probably be surprised at the directory's size (1.3 gigabytes here, and I never use WINE.)

In "~/.wine" you'll find a sub-directory at "~/.wine/drive_c/users/<username>/Temp" to be the main source of the "~/.wine" directory's size. This is because it is where programs running under WINE store their "temporary" files. To gain some hard drive space, you may, of course, simply delete the "Temp" directory, but you may lose passwords and configurations you may have stored in some of the programs you have been running under WINE. This is why it may be wiser to use a program such as "Disk Cleaner" under WINE to delete only the unnecessary files.



This way has the potential to mess up your GNU+Linux operating system if done wrong, though. Because by default WINE has permission to delete any files owned by the user you're logged in as -- to be more specific: every file you have permission to read, modify, and delete, so does WINE. If you let "Disk Cleaner" scan for files to delete on your GNU+Linux FileSystem, "Disk Cleaner" may begin deleting files that it thinks are Windows "temporary" files that are actually your personal files.

The situation becomes fatal if you are running "Disk Cleaner" under WINE as "root", because in this case "Disk Cleaner" now has permission to read, modify, and delete any file on the system, even important system files (such as kernel images, Debian packages, logs, configuration files, etc.) Never run programs under WINE as "root", running certain other programs under WINE as "root" can be fatal to your GNU+Linux system.

If you're going to do it the "Disk Cleaner" way, don't scan your GNU+Linux FileSystem. You can remove WINE's access to your GNU+Linux FileSystem by opening "Wine Configuration" (press ALT+F2, type "winecfg" without quotes, and hit enter), go to the "Drives" tab and remove the "/" and "/home" "Drives" and any other "Drives" you're uncomfortable with WINE having access to.

Using "Disk Cleaner" I've commonly seen it delete as much as 8 gigabytes of "temporary" files on some computers. Deleting these files can make some programs under WINE run faster (just like on Windows.)

Go there, comment and read more articles...
http://www.tildehash.com/?article=a-windows-style-fix-to-a-wine-problem


Don

No comments: