Wine Useful Registry Keys

13 views
Skip to first unread message

Eleanora Parrot

unread,
Aug 3, 2024, 5:39:31 PM8/3/24
to fighscatissnor

Starting from Wine 2.8, the simple symlink-editing method of configuration doesn't work. One has to configure COM ports by editing Wine registry. From Wine User's Guide/Other Things to Configure/Serial and Parallel Ports:

To override Wine's default device mapping, run wine regedit and create string entries in HKEY_LOCAL_MACHINE\Software\Wine\Ports where the entry name is the Windows device name and the entry value is the path to the Unix device. Continuing with the above example, to make COM1 the first USB-attached serial port, create an entry with the name COM1 and the value /dev/ttyUSB0. You might also want to create an entry named COM5 with no value to remove the COM5 device which is now a duplicate of COM1. After editing the registry, shut down Wine with wineserver -k and the next time Wine runs a program, your changes will take effect.

In some cases, MS software using GetCommConfig() under Wine needs a registry key explictly set if the automatic detection feature described in _User%27s_Guide#Serial_and_Parallel_Ports doesn't automatically detect your port.

Make sure you have the needed rights to access your computer's serial and parallel ports. On Linux, a user must typically be a member of the sys or dialout group to access serial ports

I haven't done this kind of work before but I really need Adobe Illustrator to get work on ubuntu! I don't care if it is cs3 or 4. I have installed CS3 and 4 master collection on windows and with wine on ubuntu can't run it (yes, no registry entries added to the wine!) I can copy all the needed file to the /home/prasad/.wine/dosdevices/C: directory with hidden files included, but how to add registry entries to them? (windows registry editor like thing to wine) is it possible to make illustrator run in ubuntu like that, i tried to install Master collection but it failed number of times. I use ubuntu 10.10

One common troubleshooting step is changing Windows registry key settings to get applications running through CrossOver. Wine has a registry editor similar to Windows' regedit that can be used to make advanced configuration changes. There's a great breakdown of useful registry keys over at WineHQ. This example shows how to set the renderer key.

I could use string processing to find and open the parent key of the one I'm looking for, and then enumerate the subkeys of that key to find out if the one I'm interested in exists, but that feels both like a performance hog and a weird way to have to implement such a simple function.

Update 3: It looks like you guys are right. This fails on one specific test example (mysteriously). If I try it on any other key, it returns the correct result. Double-checking it with the registry editor still does not show the key. Don't know what to make of all that.

First of all don't worry about performance for stuff like this. Unless you are querying it 100x per sec, it will be more than fast enough. Premature optimization will cause you all kinds of headaches.

I would look at the value of key and subPath and make sure they are what you expect, and that the key does not actually exist. What is the value of subKey afterwards? It is obviously opening something - try enumerating it to see what the keys and values under it are.

Maybe you have a registry key that is not visible to you, the user that is running the registry editor, but not to your code? A permissions problem perhaps? Is your code running as an elevated user in windows Vista or server 2008? Did you try running the registry editor as administrator?

Note that beside the "core" Registry functions that start with "Reg" there are also helper functions starting with "SHReg". These are intended for use by the Shell i.e. Explorer but are documented and can be used in normal applications too. They're typically thin wrappers that make some common tasks easier. They're part of the "Shell LightWeight API" (shlwapi.dll)

Wine is a compatibility layer capable of running Microsoft Windows applications on Unix-like operating systems. Programs running in Wine act as native programs would, without the performance/memory penalties of an emulator.

Wine can be installed by enabling the multilib repository and installing the wine (development), wine-stableAUR (stable) or wine-staging (testing) package. Wine Staging is a patched version of Wine, which contains bug fixes and features that have not been integrated into the stable or development branch yet.

Consider installing wine-gecko and wine-mono for applications that depend on Internet Explorer and .NET, respectively. These packages are not strictly required as Wine will download the relevant files as needed. However, you should manage them with pacman.

Note that many Windows applications are 32-bit, and will require 32-bit versions of the respective libraries, some of which are only available on the AUR. Standard (64-bit) libraries can be used for 64-bit applications, or for any application if you are running a version of Wine with the new WoW64 mode (see note in #Installation). You can check whether a Windows executable is 64-bit by using the file(1) command.

MIDI was a quite popular system for video games music in the 90s. If you are trying out old games, it is not uncommon that the music will not play out of the box.Wine has excellent MIDI support. However you first need to make it work on your host system, as explained in MIDI. Last but not least you need to make sure Wine will use the correct MIDI output.

Aside from system dependencies, many programs require additional fonts and DLLs to be installed to the Wine prefix [3]. To satisfy these dependencies you can use Winetricks, a primitive "package manager" where each verb either installs something or applies a configuration tweak. There are two ways to use Winetricks:

Due to conflicts between dependencies, you may not be able to create the "perfect" Windows installation that can run everything [4] [5]. Rather, you should treat prefixes as disposable (unless they contain important configurations or data) and use separate prefixes for programs with different dependencies. You can use the #WINEPREFIX environment variable to control which prefix the verbs act on.

Determining the verbs required by a program needs can require much trial and error. See the Bottles dependency page for some of the more common dependencies, as well as the following program-specific resources:

You can override the location Wine uses for a prefix with the WINEPREFIX environment variable. This is useful if you want to use separate configurations for different Windows programs. The first time a program is run with a new Wine prefix, Wine will automatically create a directory with a bare C-drive and registry.

By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for winecfg, winebrowser, etc). This can be achieved by installing wine-installerAUR or wine-installer-gitAUR meta-package (the latter has no additional dependencies), otherwise these instructions will add entries for these applications.

If these settings produce a ugly/non-existent icon, it means that there are no icons for these launchers in the icon set that you have enabled. You should replace the icon settings with the explicit location of the icon that you want. Clicking the icon in the launcher's properties menu will have the same effect. A great icon set that supports these shortcuts is gnome-colors-icon-themeAUR.

By default, Wine runs on Wayland through Xwayland, providing a satisfactory experience for most users. As of version 9.0rc1, Wine has made substantial progress on merging native Wayland support, now making it suitable for some use cases.

Often you may need to run .exe's to patch game files, for example a widescreen mod for an old game, and running the .exe normally through Wine might yield nothing happening. In this case, you can open a terminal and run the following command:

Winetricks is a script to allow one to install base requirements needed to run Windows programs. Installable components include DirectX 9.x, MSXML (required by Microsoft Office 2007 and Internet Explorer), Visual Runtime libraries and many more.

Note that CSMT may actually hurt performance for some applications - if this is the case, disable it by runing wine regedit and set the DWORD value for HKEY_CURRENT_USER -> Software > Wine > Direct3D > csmt to 0x00 (disabled).

Some games might have an OpenGL mode which may perform better than their default DirectX mode. While the steps to enable OpenGL rendering is application specific, many games accept the -opengl parameter.

VKD3D-Proton is a fork of VKD3D which aims to implement the full Direct3D 12 API using Vulkan. The project serves as the development effort for Direct3D 12 support in Proton improving performance and compatibility for DirectX 12 games.

When using gallium-based mesa drivers (mostly AMD and Intel cards) there is a native Gallium Direct3D driver that provides good performance for DirectX 9. It's mostly fallen out of favor due to DXVK, but you may still find it useful if you do not have Vulkan support. Performance on both DXVK and Gallium Nine should be around the same.

By default, Wine takes over as the default application for a lot of formats. Some (e.g. vbs or chm) are Windows-specific, and opening them with Wine can be a convenience. However, having other formats (e.g. gif, jpeg, txt, js) open in Wine's bare-bones simulations of Internet Explorer and Notepad can be annoying.

The wine package installs a binfmt file which will allows you to run Windows programs directly, e.g. ./myprogram.exe will launch as if you had typed wine ./myprogram.exe. Service starts by default on boot, if you have not rebooted after installing Wine you can start systemd-binfmt.service to use it right away.

Also installing lib32-libxinerama might fix dual-head issues with wine (for example, unclickable buttons and menus of application in the right most or bottom most monitor, not redrawable interface of application in that zone, dragging mouse cursor state stucked after leaving application area).

c80f0f1006
Reply all
Reply to author
Forward
0 new messages