https://bugs.winehq.org/show_bug.cgi?id=53260
Bug ID: 53260 Summary: Wine won't open distro-installed text editors and the like Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: orowwith2os@gmail.com Distribution: ---
I've seen, multiple times, people have an issue where Wine won't open a file (from inside the wine prefix) with an external host application, like NeoVIM, Kate, or Visual Studio Code, instead stating I believe it would be a minor, but worth it, feature to add to Wine. If I had to suggest a way to implement this, I would suggest using the xdg-desktop-portals, as they work with sandboxed applications like Flatpak, and may be the ideal method to use for Wine.
TL;DR, please add the ability to open files from inside Wine with external applications, possibly by using the XDG desktop portals.
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #1 from Austin English austinenglish@gmail.com --- How are you trying to run the native application? It's not clear what you're asking for here.
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #2 from orowwith2os@gmail.com --- (In reply to Austin English from comment #1)
How are you trying to run the native application? It's not clear what you're asking for here.
What I am asking for is a popup menu that allows you to select a native application to open, say, a .txt file with, similar to how Windows will show a menu to select an app if there's no default app to run/open that file.
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to orowwith2os from comment #2)
(In reply to Austin English from comment #1)
How are you trying to run the native application? It's not clear what you're asking for here.
What I am asking for is a popup menu that allows you to select a native application to open, say, a .txt file with, similar to how Windows will show a menu to select an app if there's no default app to run/open that file.
Where would this dialog be found/called from?
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #4 from orowwith2os@gmail.com --- (In reply to Austin English from comment #3)
(In reply to orowwith2os from comment #2)
(In reply to Austin English from comment #1)
How are you trying to run the native application? It's not clear what you're asking for here.
What I am asking for is a popup menu that allows you to select a native application to open, say, a .txt file with, similar to how Windows will show a menu to select an app if there's no default app to run/open that file.
Where would this dialog be found/called from?
I'm having a bit of trouble understanding the sentence, but assuming you mean how Wine would show the dialog: XDG desktop portals. Wine can call xdg-desktop-portal on the host and it'll redirect to the DE/WM equivalent. Flatpak utilizes this inside its sandbox to give access to the host system, like for file pickers.
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to orowwith2os from comment #4)
(In reply to Austin English from comment #3)
(In reply to orowwith2os from comment #2)
(In reply to Austin English from comment #1)
How are you trying to run the native application? It's not clear what you're asking for here.
What I am asking for is a popup menu that allows you to select a native application to open, say, a .txt file with, similar to how Windows will show a menu to select an app if there's no default app to run/open that file.
Where would this dialog be found/called from?
I'm having a bit of trouble understanding the sentence, but assuming you mean how Wine would show the dialog: XDG desktop portals. Wine can call xdg-desktop-portal on the host and it'll redirect to the DE/WM equivalent. Flatpak utilizes this inside its sandbox to give access to the host system, like for file pickers.
No. I mean, what sequence of actions, under a wine program, would invoke this theoretical dialog. I.e., if I ran 'wine notepad', how would I get to the point of seeing this theoretical dialog?
The reason I ask is that the windows dialogs can't easily be changed to allow running unix binaries. They need to remain compatible with windows. FWIW, there's an existing bug for this that I couldn't find in a quick search.
OTOH, running a unix binary from windows should be supported, at least in some cases, see https://wiki.winehq.org/FAQ#How_do_I_launch_native_applications_from_a_Windo...
https://bugs.winehq.org/show_bug.cgi?id=53260
--- Comment #6 from orowwith2os@gmail.com --- (In reply to Austin English from comment #5)
(In reply to orowwith2os from comment #4)
(In reply to Austin English from comment #3)
(In reply to orowwith2os from comment #2)
(In reply to Austin English from comment #1)
How are you trying to run the native application? It's not clear what you're asking for here.
What I am asking for is a popup menu that allows you to select a native application to open, say, a .txt file with, similar to how Windows will show a menu to select an app if there's no default app to run/open that file.
Where would this dialog be found/called from?
I'm having a bit of trouble understanding the sentence, but assuming you mean how Wine would show the dialog: XDG desktop portals. Wine can call xdg-desktop-portal on the host and it'll redirect to the DE/WM equivalent. Flatpak utilizes this inside its sandbox to give access to the host system, like for file pickers.
No. I mean, what sequence of actions, under a wine program, would invoke this theoretical dialog. I.e., if I ran 'wine notepad', how would I get to the point of seeing this theoretical dialog?
The reason I ask is that the windows dialogs can't easily be changed to allow running unix binaries. They need to remain compatible with windows. FWIW, there's an existing bug for this that I couldn't find in a quick search.
OTOH, running a unix binary from windows should be supported, at least in some cases, see https://wiki.winehq.org/ FAQ#How_do_I_launch_native_applications_from_a_Windows_application.3F
I don't know how specifically this would work, since I don't have the necessary skills to implement it myself, but if an application inside Wine tries to open a .txt file for example, it should pass that to the host for it to pick what app to open the file inside, is what I'm thinking of.
Maybe something like how wine cmd works can be used to implement this functionality, but I'm not sure. I'm just a gal on the internet who wants to help improve apps through bug reports and feature requests, in the hopes that more new users can switch to Linux with little issue.
https://bugs.winehq.org/show_bug.cgi?id=53260
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Version|unspecified |7.12
--- Comment #7 from Zeb Figura z.figura12@gmail.com --- I think you can get the desired behaviour by changing the contents of HKCR\txtfile\shell\open\command, replacing "notepad.exe" with "winebrowser.exe". That will automatically delegate to xdg-open, which will open the user's preferred file browser.
I don't know if we want to do that by default. It's theoretically possible that a program would depend on notepad being started in those cases, although it doesn't strike me as very likely.
"wine start /exec file.txt" is a simple way to observe or test this behaviour.
It's also possible that some programs manually open notepad rather than delegating to shell32. We could override notepad to xdg-open as well, but I'm not sure we want to do that.