Running Wine as OSX app and file permissions

Questions about Wine on macOS.
Post Reply
jwong
Level 2
Level 2
Posts: 25
Joined: Thu Feb 17, 2011 4:58 pm
Location: US

Running Wine as OSX app and file permissions

Post by jwong » Thu Oct 17, 2019 5:03 pm

I've created a notepad.app wrapper which runs the notepad application included with Wine. If I run Wine from the Terminal (ex. 'wine64 notepad'), everything works fine. But if I click/run my notepad.app from the Finder window, I don't see any files on my system when using the common file Open dialog. I see folders but not the files.

I've gone into System Preferences->Security & Privacy->Privacy->Full Disk Access and added my notepad wrapper to the list, but that didn't change anything.

Something about starting my wrapper interactively is limiting its file access/permssion but runninng via command does not.

How do I go about granting access to my wrapper?

Note, I am using Catalina. I was not able to check if the problem existed prior to Catalina.

The_SamminAter
Level 2
Level 2
Posts: 41
Joined: Sun Sep 09, 2018 6:16 pm
Location: Earth

Re: Running Wine as OSX app and file permissions

Post by The_SamminAter » Mon Oct 28, 2019 8:43 pm

You can't run any non-fully 64 bit exes in macOS 10.15 (Catalina). That aside, you can create a text file with no extension, that contains this (or a variant of this):

#!/bin/bash
/Applications/Wine\ Devel.app/Contents/Resources/wine/bin/notepad
killall Terminal

Gcenx
Level 5
Level 5
Posts: 308
Joined: Mon Dec 25, 2017 12:11 pm

Re: Running Wine as OSX app and file permissions

Post by Gcenx » Tue Oct 29, 2019 10:05 am

@jwong You said wrapper? If your using my updated version of Wineskin it’s not going to work properly as it’s not notarized nor does it pass permissions from the wrapper onto wine processes.

@The_SamminAter the notepad within /bin is just a bash script, it would be better to use

killall wine64-preloader
Or if the wineprrfix is mapped then using
wineserver -k
That usually shuts down the current wine precedes within the currently launched prefix

jwong
Level 2
Level 2
Posts: 25
Joined: Thu Feb 17, 2011 4:58 pm
Location: US

Re: Running Wine as OSX app and file permissions

Post by jwong » Wed Oct 30, 2019 4:40 pm

By wrapper I meant an OSX application bundle. I therefore created an application called notepad.app. The idea was to create a native OSX 'application' that would simply run Wine's version of Notepad.

In it, I placed the 64 bit Wine binaries that I compiled and built from the Wine source (so I am not using Wineskin).

The issue is if I click my notepad.app icon, notepad runs, but if I select file->open, no files are listed in dialog regardless of the file type and the directory. Directories however are listed which means I can navigate the hard drive. Basically, the dialog will only list directories and not files.

If on the other hand, I use Terminal.app (ie. unix shell), run 'wine64 notepad ' and then select file->open, the files are listed in the dialog.

So something about running via an OSX application bundle is stopping notepad from seeing the files on my system.

Gcenx
Level 5
Level 5
Posts: 308
Joined: Mon Dec 25, 2017 12:11 pm

Re: Running Wine as OSX app and file permissions

Post by Gcenx » Wed Oct 30, 2019 7:34 pm

If that’s the case you should provide more information on how your launching wine from within the bundle you created as it can be done multiple different ways.

Catalina has a lot of gatekeeper restrictions I’ve got an open issue from someone running Catalina who is experiencing issues.


Depending how you compiled wine64 could have also affected how it functions, I’ve only briefly updated the macOS wiki building section it’s still rather lacking.

Post Reply