Wine v4.0 won't run anything

Questions about Wine on macOS.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Wine v4.0 won't run anything

Post by The_SamminAter »

Wine-stable v4.0 won't run anything. Wine was working earlier today, but now whenever I try to run any applications in wine it just opens wine's terminal window. Here is what happens when I try to run notepad.exe, which was working earlier today:

Code: Select all

$ wine ~/Desktop/notepad.exe 
0137:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0137:err:winediag:nodrv_CreateWindow The explorer process failed to start.
I've re-installed Wine, but there isn't a difference.

The last thing that I ran was Setup_FileViewPro_2019.exe, just a couple of mins ago
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:Wine-stable v4.0 won't run anything. Wine was working earlier today, but now whenever I try to run any applications in wine it just opens wine's terminal window. Here is what happens when I try to run notepad.exe, which was working earlier today:

Code: Select all

$ wine ~/Desktop/notepad.exe 
0137:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0137:err:winediag:nodrv_CreateWindow The explorer process failed to start.
I've re-installed Wine, but there isn't a difference.

The last thing that I ran was Setup_FileViewPro_2019.exe, just a couple of mins ago
Reboot your mac then try again.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:Wine-stable v4.0 won't run anything. Wine was working earlier today, but now whenever I try to run any applications in wine it just opens wine's terminal window. Here is what happens when I try to run notepad.exe, which was working earlier today:

Code: Select all

$ wine ~/Desktop/notepad.exe 
0137:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0137:err:winediag:nodrv_CreateWindow The explorer process failed to start.
I've re-installed Wine, but there isn't a difference.

The last thing that I ran was Setup_FileViewPro_2019.exe, just a couple of mins ago
Reboot your mac then try again.
Now it runs some of the things it used to, but whenever I try to run a .exe it opens Wine's terminal GUI, which I then have to run

Code: Select all

wine ~/path/to/.exe
to launch anything.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The wine apps from winehq also support using “Open With” for direct launches using the default .wine prefix.
Or make yourself a launcher, you can define the required wineprefix etc as needed.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:The wine apps from winehq also support using “Open With” for direct launches using the default .wine prefix.
Or make yourself a launcher, you can define the required wineprefix etc as needed.
I am using open with.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:
Gcenx wrote:The wine apps from winehq also support using “Open With” for direct launches using the default .wine prefix.
Or make yourself a launcher, you can define the required wineprefix etc as needed.
I am using open with.
That sounds strange as by default “open with” will directly launch any exe files, even works with my customized wine.app bundles.

If the things your wanting to launch already work then your better making yourself launchers to avoid needing to deal with terminal for those.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:
Gcenx wrote:The wine apps from winehq also support using “Open With” for direct launches using the default .wine prefix.
Or make yourself a launcher, you can define the required wineprefix etc as needed.
I am using open with.
That sounds strange as by default “open with” will directly launch any exe files, even works with my customized wine.app bundles.

If the things your wanting to launch already work then your better making yourself launchers to avoid needing to deal with terminal for those.
How do I make launchers then? This has never happened for me in the past.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:How do I make launchers then? This has never happened for me in the past.
How to make a launcher shows how, edit the wine location examples are shown in the above “Adding wine to terminal” then edit application, wineprefix if your not using the default .wine prefix
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:How do I make launchers then? This has never happened for me in the past.
How to make a launcher shows how, edit the wine location examples are shown in the above “Adding wine to terminal” then edit application, wineprefix if your not using the default .wine prefix
That honestly seems like going to a lot of trouble, is there any other thing that could possibly make it work like it used to, such as re-installing wine manually (using pacifist?)? Could it also be what version of X11 I have?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:
Gcenx wrote:
The_SamminAter wrote:How do I make launchers then? This has never happened for me in the past.
How to make a launcher shows how, edit the wine location examples are shown in the above “Adding wine to terminal” then edit application, wineprefix if your not using the default .wine prefix
That honestly seems like going to a lot of trouble, is there any other thing that could possibly make it work like it used to, such as re-installing wine manually (using pacifist?)? Could it also be what version of X11 I have?
It kinda is I don’t use it even thought I updated it.
I’m not sure as I’ve never seen the Winehq apps not function in that way before you might as well try just be sure no third party wine bundles are installed on your system

No the version of XQuartz only affects the font rendering and that’s fixed easy, I included that on the same page I linked before along with some other keyboard related registory keys.


But I don’t use the Winehq wine bundles too much since I turn everything into self contained app bundles.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:It kinda is I don’t use it even thought I updated it.
I’m not sure as I’ve never seen the Winehq apps not function in that way before you might as well try just be sure no third party wine bundles are installed on your system

No the version of XQuartz only affects the font rendering and that’s fixed easy, I included that on the same page I linked before along with some other keyboard related registory keys.


But I don’t use the Winehq wine bundles too much since I turn everything into self contained app bundles.
Could winetricks, installed but not ever used, possibly be the problem?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:Could winetricks, installed but not ever used, possibly be the problem?
No having winetricks installed won’t break “open with” as it still functions on my system when I tested it last night.

I even added my custom “Wine CX.app” into PATH (so I can use wine from a normal Terminal session) and “open with” is still worked as normal.

So something else is causing the issue on your system.


Only thing I can think of is did you already launch something to setup the default .wine prefix?
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:Could winetricks, installed but not ever used, possibly be the problem?
No having winetricks installed won’t break “open with” as it still functions on my system when I tested it last night.

I even added my custom “Wine CX.app” into PATH (so I can use wine from a normal Terminal session) and “open with” is still worked as normal.

So something else is causing the issue on your system.


Only thing I can think of is did you already launch something to setup the default .wine prefix?
Not as far as I know, but could you please tell me how that would be done, so I can think back and see if I may have?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:Not as far as I know, but could you please tell me how that would be done, so I can think back and see if I may have?
How to launch wine from Terminal that’s how you would add a Winehq wine bundle to your users PATH allowing wine to be launched from a normal Terminal session including the fontrendering fix if your using XQuartz 2.7.11 as wine 4.0, does not like that versions default rendering mode.

To configure the default .wine prefix you can launch the wine app and type;

Code: Select all

wineboot
It might prompt you to install gecko two times and mono click “ok” if asked.
After the terminal window returns to a normal prompt the prefix is setup, the common alternative it’s to do the following;

Code: Select all

winecfg
Once you see the winecfg windows open you know the wineprefix is setup.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:Not as far as I know, but could you please tell me how that would be done, so I can think back and see if I may have?
How to launch wine from Terminal that’s how you would add a Winehq wine bundle to your users PATH allowing wine to be launched from a normal Terminal session including the fontrendering fix if your using XQuartz 2.7.11 as wine 4.0, does not like that versions default rendering mode.

To configure the default .wine prefix you can launch the wine app and type;

Code: Select all

wineboot
It might prompt you to install gecko two times and mono click “ok” if asked.
After the terminal window returns to a normal prompt the prefix is setup, the common alternative it’s to do the following;

Code: Select all

winecfg
Once you see the winecfg windows open you know the wineprefix is setup.
Ok, I don't think I've done that accidentally. By chance, is the PATH file ~/.bash_profile ?
Also, I'm running XQuartz 2.7.9 :D it doesn't have rendering/graphics problems like 2.7.11
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Now that I've tried re-installing Wine Stable 4.0, the same thing happens. Could this possibly be a Wine 4.0 'open with' integration issue?

Edit: Wine Devel 4.7 also has the same issue :/
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

It’s not that XQuartz has a rendering bug, it’s the other way around Wine didn’t support the new Freetype rendering mode sticking to only working with rendering mode 35, so to keep comparability with lower wine versions but have the fixes included in XQuartz2.7.11 it’s better to just force the older rendering mode.

The location I listed within the linked section yes.

I doubt it since Wine Stable/devel/Staging and my custom versions all work correctly and I’m running Mojave.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

So do you have any ideas on how I could fix this problem, preferably without having to learn how to create, and then create custom launchers?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:So do you have any ideas on how I could fix this problem, preferably without having to learn how to create, and then create custom launchers?
I’m not sure, I would try making another user account on your Mac and see if the issue persists, if not it’s a configuration setting in your account causing this issue.

Second would be grabbing a clean usb hard driver and installing macOS onto that then booting from it, then unmount the internal drive from “Disk Utility” so it won’t interfer with the clean install and try again.


The above is the route I would go to try to narrow down the potential cause as I’ve never seen or heard of this problem before.

Personally I backup regular and clean install only copying back my iMessage history anything else has to be reconfigured.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:So do you have any ideas on how I could fix this problem, preferably without having to learn how to create, and then create custom launchers?
I’m not sure, I would try making another user account on your Mac and see if the issue persists, if not it’s a configuration setting in your account causing this issue.

Second would be grabbing a clean usb hard driver and installing macOS onto that then booting from it, then unmount the internal drive from “Disk Utility” so it won’t interfer with the clean install and try again.


The above is the route I would go to try to narrow down the potential cause as I’ve never seen or heard of this problem before.

Personally I backup regular and clean install only copying back my iMessage history anything else has to be reconfigured.
How do I change/reset my configuration settings? I've also noticed this with other software, basically anything that has been installed recently has this problem.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

The_SamminAter wrote:How do I change/reset my configuration settings? I've also noticed this with other software, basically anything that has been installed recently has this problem.
First you should make another user account to see if the issues persists into that account, if they do it’s system wide preferences that’s are the issue and we don’t ever want to touch those. It would be better then to clean install macOS.

This is where macOS stores your user preferences;

Code: Select all

/Users/[your account]/Library/Preferences
Usually referred too as;

Code: Select all

~/Library/Preferences
~/ is always your users folder same as using $HOME

Make a system backup (Time Machine) before proceeding I won’t be held responsible for any issues!

Once your system backup is completed, delete everything in ~/Library/Preferences and reboot your system for the changes to take effect.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:
The_SamminAter wrote:How do I change/reset my configuration settings? I've also noticed this with other software, basically anything that has been installed recently has this problem.
First you should make another user account to see if the issues persists into that account, if they do it’s system wide preferences that’s are the issue and we don’t ever want to touch those. It would be better then to clean install macOS.

This is where macOS stores your user preferences;

Code: Select all

/Users/[your account]/Library/Preferences
Usually referred too as;

Code: Select all

~/Library/Preferences
~/ is always your users folder same as using $HOME

Make a system backup (Time Machine) before proceeding I won’t be held responsible for any issues!

Once your system backup is completed, delete everything in ~/Library/Preferences and reboot your system for the changes to take effect.
Don't worry, I know about the dangers of deleting files and the importance of backups (I once lost about 300gb of data because my boot drive corrupted :/). After all, I fix laptops, know macOS quite well, and help people with OS problems and viruses (fun little things) :D .

Would you know exactly which file(s) would control open-with prefrences? I'm looking through ~/Library/Prefrences, and don't see much that would have anything to do with my problem, other than

Code: Select all

wine64-preloader.plist
or

Code: Select all

wine64.plist
Update: Wine is sometimes launching the .exe I choose now. I think this has something to do with how I re-installed Wine Stable 4 while logged into root (after re-installing macOS).
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

Always gotta be sure I learned that the hard way before with end-users, with the forums been visable to anyone better to be safe. (Someone forgets the ~ and kills there system)

The file responsible for “open with” menu would be;

Code: Select all

com.apple.LaunchServices.plist
Deleting it would force macOS to remake the menu.
The_SamminAter
Level 3
Level 3
Posts: 52
Joined: Sun Sep 09, 2018 6:16 pm

Re: Wine v4.0 won't run anything

Post by The_SamminAter »

Gcenx wrote:Always gotta be sure I learned that the hard way before with end-users, with the forums been visable to anyone better to be safe. (Someone forgets the ~ and kills there system)

The file responsible for “open with” menu would be;

Code: Select all

com.apple.LaunchServices.plist
Deleting it would force macOS to remake the menu.
I've restarted my computer (because it was having problems and I needed to re-install an NTFS driver), and now am having the original "open with" problem. Honestly, my computer seems to be randomly working and then not working.

I just deleted this inside of .../com.apple.LaunchServices/com.apple.launchservices.secure.plist:

Code: Select all

		<dict>
			<key>LSHandlerContentType</key>
			<string>com.microsoft.windows-executable</string>
			<key>LSHandlerPreferredVersions</key>
			<dict>
				<key>LSHandlerRoleAll</key>
				<string>-</string>
			</dict>
			<key>LSHandlerRoleAll</key>
			<string>org.winehq.wine-devel.wine</string>
		</dict>
Now some apps when launched with Wine seems to be working. Thanks for the help!

Edit: None of them work again :(

I deleted ../com.apple.LaunchServices/ and com.apple.LaunchServices.plist and relaunched finder, I was able to open one .exe properly before opening any brought me to Wine's terminal GUI.

Also, unless someone has SIP disabled and uses root, they shouldn't be able to run that command (but I'm not going to test that to make sure).
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Wine v4.0 won't run anything

Post by Gcenx »

I have a weird question related to your issue exe files.

By any chance does the path or exe file name contain spaces?

Edit;
Remember SIP was introduced in El Capitan, below don’t have that safety net (or as most see it a hinderance)
Locked