[hint] How to perform a fast library override in Wine within seconds


Well-Known Member
Feb 25, 2019
Reaction score
Some of you prefer to use Lutris and other tools for gaming but guys like me prefer the old-fashioned way - by doing a library override in Wine. For the most of the games it's enough to just place the DXVK and VKD3D libraries where the game.exe is located. However, for some games, like those by WarGaming, that's FAR from enough. These games use hundreds of other libraries that you need to add to the tab "Libraries" in winecfg. But since the number of these libraries can easily go above 100, it would quickly become a tedious job adding them one by one here and pressing "Add" for each.


(Sorry that winecfg is in Bulgarian, IDK how to change it to English, short of changing my entire system locale)

So I created two aliases to do this job for me - it takes 2 minutes tops. In the following video I'm using an empty user.reg file which is just for the demonstration. You will have to open ~/.wine/user.reg, find the last line containing "native,builtin" (DO NOTE that this is not the last line in the whole file) and add the resulted strings (one string per line) to ~/.wine/user.reg.

Alias listdlls points to a bash script which contains this:

find *.dll > /B/123/$1.txt

A little hint about this script: use "find" instead of "ls". Using "find", lists each file on a separate line which is exactly what you need!

I still haven't figured out how to remove '.dll' from each line in a text file using CLI, so for the moment I'm doing that manually, using Ctrl+H in GEdit.

Alias winelibs points to a bash script which contains this:

sed -i 's/^.*$/"&"="native,builtin"/g' $1

This surrounds the resulted extensionless names in the text file with double quotes and also adds


Thus you'll get the file names in the same format Wine is using.

And that's it! You have just saved yourself at least an hour of a tedious job to add librarires names manually.

If there's anything unclear, feel free to ask! :D

I wonder what Gandalf-Oz will think about this "life hack" I just came up with. :p
Last edited:

Members online