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 9th, 2021

GNOME 40 is finally out and I'm happy to say a small contribution of mine made it into the release. My contribution adds a new feature to GNOME System Monitor version 40. Few articles about GNOME 40 mention it, but some power users might find my contribution useful.

November 15th, 2019
If you leave this option checked when you export your image, any pixels you erased will be saved in the exported image. They will not be truly erased, just made fully transparent. In other words, the data that describes the color of each pixel will be preserved, they will just be made invisible. This option has privacy implications. With it enabled, what you erase from an image may still be present in transparent pixels.
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.

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!