Pages

Monday, June 14, 2010

A Windows style Fix to a WINE Problem

Author: Jacob Barkdull
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 Explorers 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//.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//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.

Run Microsoft Windows Applications and Games on Mac, Linux or ChromeOS save up to 20% off  CodeWeavers CrossOver+ today.

No comments: