A Windows-style Fix to a WINE Problem

June 10th, 2010 by 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 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. It's wiser to use a program such as "Disk Cleaner" under WINE to delete only 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.)

On the Blog RSS

May 2nd, 2015

Over the past few days I've been in talks with a nice fellow named Kamil Jablonski, a concept artist, graphic designer, and web developer who recently contributed a Polish locale for HashOver. He shared with me a logo design for HashOver, that after some back and forth became, in my opinion, a very cool design.

September 17th, 2014

It was some time ago when I wrote the original share button for Identi.ca, back then Identi.ca enjoyed quite a lot of traffic and user activity, but more than that it was also developed heavily and was praised by many, including myself, for being technologically impressive whilst allowing easy online conversations and communication.

August 25th, 2014

This may sound like analyzing yesterday's news, but I think it's important, and more than that I need to put this here as a resource to point certain people to.

Subscribe to Newsletter

Want to get the latest news and updates about my software, blog posts and behind the scenes information? Than subscribe to my newsletter to stay up-to-date!