does wine have something like /etc/wine/wine.inf?

Questions about Wine on Linux
Locked
lesmana
Newbie
Newbie
Posts: 2
Joined: Tue Mar 07, 2017 5:33 am

does wine have something like /etc/wine/wine.inf?

Post by lesmana »

does wine have something like /etc/wine/wine.inf? or in other words: does wine have a configuration file in /etc with which i can, for example, disable winemenubuilder without editing /usr/share/wine/wine.inf?

background:

i want to disable winemenubuilder. or rather i want to prevent wine from adding file associations to my desktop environment. the wine FAQ mentions three methods of which only the third is really useful for me because i frequently create new wineprefixes.

Code: Select all

WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe
this works fine but has one little annoyance. the following two lines appear everytime i start something with wine:

Code: Select all

wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
the "fix" seems to be to edit /usr/share/wine/wine.inf and change or remove the following line:

Code: Select all

HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r"
this works fine. the error messages no longer appear. but everytime i update my arch linux system my changes in /usr/share/wine/wine.inf are overwritten with the default version from the package.

i filed a but about this: https://bugs.archlinux.org/task/53167
the arch linux developers closed the bug as "not a bug" because "Files in /usr are not meant to be customized".

so my question again: does wine have something like /etc/wine/wine.inf? or in other words: does wine have a configuration file in /etc with which i can, for example, disable winemenubuilder without editing /usr/share/wine/wine.inf?
User avatar
dimesio
Moderator
Moderator
Posts: 13204
Joined: Tue Mar 25, 2008 10:30 pm

Re: does wine have something like /etc/wine/wine.inf?

Post by dimesio »

lesmana wrote: this works fine but has one little annoyance. the following two lines appear everytime i start something with wine:

Code: Select all

wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
So what? That shouldn't prevent anything from working, and there's no reason to even look at the console output unless something's not working.
so my question again: does wine have something like /etc/wine/wine.inf? or in other words: does wine have a configuration file in /etc with which i can, for example, disable winemenubuilder without editing /usr/share/wine/wine.inf?
No.

You could try the "do-nothing" program another user wrote if it really bothers you that much. https://web.archive.org/web/20160110040 ... d4c7ae042a
lesmana
Newbie
Newbie
Posts: 2
Joined: Tue Mar 07, 2017 5:33 am

Re: does wine have something like /etc/wine/wine.inf?

Post by lesmana »

thank you for the information. i appreciate the effort for digging that up from the internet archive.

i tried to compile the "do-nothing" program. i was not successful. i tried to study the documentation (for winegcc and related tools) but it quickly became quite complicated. i could not justify that much effort for "just an annoyance". furthermore, if i understand the guide correctly, the "do-nothing" program doesn't even satisfy my needs. as i understand it the "do-nothing" program would have to be copied to every wineprefix. i wanted to avoid just that.

i am sad that there is no possibility to configure wine with a config file in /etc. i guess i have to endure those two error lines.

other alternatives i might pursue:
* find a way to patch /usr/share/wine/wine.inf after arch system update.
* write a wrapper around wine and filter exactly those two lines.
User avatar
dimesio
Moderator
Moderator
Posts: 13204
Joined: Tue Mar 25, 2008 10:30 pm

Re: does wine have something like /etc/wine/wine.inf?

Post by dimesio »

lesmana wrote:i tried to compile the "do-nothing" program. i was not successful. i tried to study the documentation (for winegcc and related tools) but it quickly became quite complicated. i could not justify that much effort for "just an annoyance". furthermore, if i understand the guide correctly, the "do-nothing" program doesn't even satisfy my needs. as i understand it the "do-nothing" program would have to be copied to every wineprefix. i wanted to avoid just that.
Now you know one of the reasons I didn't include that info when I ported the FAQ to the new wiki. The other reason is that, as someone who relies on console output to help users, I don't want any messages suppressed. That message tells me clearly that winemenubuilder has been disabled.
other alternatives i might pursue:
* find a way to patch /usr/share/wine/wine.inf after arch system update.
* write a wrapper around wine and filter exactly those two lines.
Wine prints lots of harmless messages in the console. You can suppress all of them by running with WINEDEBUG=-all. Just don't do that when asking for help here.
Locked