[pkg-wine-party] Bug#845334: wine32: breaks xdg-open, which wants to start wine and crashes

Jens Reyer jre.winesim at gmail.com
Tue Jan 3 13:49:17 UTC 2017


control: tags -1 + patch

On 03.01.2017 13:16, Vincent Lefevre wrote:
> Not tried yet, but even if the .wine directory already exists,
> wine-extension-*.desktop files can be re-created when wine is run.
> This is what has just happened, as I got:
> 
> -rw-r--r-- 1 vlefevre vlefevre  218 2017-01-03 13:02:23 wine-extension-pdf.desktop
>
> and without a default for application/pdf, I get:
> 
> cventin:~> xdg-mime query default application/pdf
> wine-extension-pdf.desktop
> 
> I don't know what is the cause, perhaps the upgrade I did in the
> morning, where wine was upgraded.

I still don't know *exactly* what triggers the recreation, but I think
it happens on certain Wine updates, and  if relevant parts of wine.inf
changed.


More importantly I think I found a good place to fix this: Attached
patch blacklists the creation for htm, txt and pdf.

It looks like as if this keeps the Wine internal associations intact, so
e.g. Wine applications are still able to open pdf's with evince here.

And as intended it prevents the association for the native applications
to Wine, so xdg-open still uses evince directly. I think we all agree
this is the wanted behavior, especially for freshly created Wine prefixes.

The only point I'm unsure about the wanted behavior is on installing a
Windows pdf reader: Some people might want that to get their default
also for the native system (e.g. xdg-open), because they always require
a specific feature from Windows Adobe Acrobat. Others might install it
and use it from time to time, but would generally prefer e.g. evince.

Currently this patch would work for the latter, because it always
prevents the creation of desktop associations for pdf's.


This meets my personal preference. What do others think?


Besides that I want to look a bit more into this to understand
winemenubuilder better, and then discuss it with upstream.

Any tests or feedback is welcome.

Greets
jre
-------------- next part --------------
>From a5fa99f73004f584cfcfce56921212aac7aa743a Mon Sep 17 00:00:00 2001
From: Jens Reyer <jre.winesim at gmail.com>
Date: Sat, 17 Dec 2016 16:33:52 +0100
Subject: blacklist htm, txt and pdf.


diff --git a/debian/patches/menubuilder-blacklist b/debian/patches/menubuilder-blacklist
new file mode 100644
index 0000000000..624ee759ac
--- /dev/null
+++ b/debian/patches/menubuilder-blacklist
@@ -0,0 +1,18 @@
+--- a/programs/winemenubuilder/winemenubuilder.c
++++ b/programs/winemenubuilder/winemenubuilder.c
+@@ -2465,9 +2465,15 @@ static BOOL is_extension_blacklisted(LPC
+     static const WCHAR comW[] = {'.','c','o','m',0};
+     static const WCHAR exeW[] = {'.','e','x','e',0};
+     static const WCHAR msiW[] = {'.','m','s','i',0};
++    static const WCHAR pdfW[] = {'.','p','d','f',0};
++    static const WCHAR htmW[] = {'.','h','t','m',0};
++    static const WCHAR txtW[] = {'.','t','x','t',0};
+ 
+     if (!strcmpiW(extension, comW) ||
+         !strcmpiW(extension, exeW) ||
++        !strcmpiW(extension, htmW) ||
++        !strcmpiW(extension, pdfW) ||
++        !strcmpiW(extension, txtW) ||
+         !strcmpiW(extension, msiW))
+         return TRUE;
+     return FALSE;
diff --git a/debian/patches/series b/debian/patches/series
index 89222299ce..1e8e711392 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+menubuilder-blacklist
 version-string.patch
 manpages-wineserver-persistence.patch
 


More information about the pkg-wine-party mailing list