Xdg .desktop, .directory and mimetype files missing in the package

Bug #1576326 reported by AsciiWolf
132
This bug affects 30 people
Affects Status Importance Assigned to Milestone
wine (Ubuntu)
Fix Released
High
Unassigned
wine-development (Ubuntu)
Confirmed
High
Unassigned

Bug Description

The wine-development (and since Yakkety also the wine-stable) package does not contain any Xdg .desktop, .directory or mimetype files. Because of that, Wine and associated applications (winecfg, wine uninstaller etc.) cannot be started from the desktop menu, launchers of the installed Windows programs are not being put in the right (Wine) category and Windows binaries cannot be run directly from the file manager using development version of Wine.

Fixing this needs to consider the security implications of automatically starting Windows applications.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine-development (Ubuntu):
status: New → Confirmed
Revision history for this message
jre (jre-phoenix) wrote :

I'm working on this, by adding the .desktop file and giving instructions how to add it.

If you're using wine-development from my ppa:jre-phoenix/transition+wine1.6+wine, can you please download the desktop file and install it:

$ wget https://anonscm.debian.org/git/pkg-wine/wine.git/plain/loader/wine.desktop
$ sudo cp wine.desktop /usr/share/applications/

Does this give the full functionality you're asking for? Or if not which is missing and how might it be added?

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Here is a list of files that appears to be missing:
(Source: http://packages.ubuntu.com/xenial/amd64/wine1.6/filelist)

/usr/share/icons/hicolor/16x16/apps/wine-notepad.png
/usr/share/icons/hicolor/16x16/apps/wine-uninstaller.png
/usr/share/icons/hicolor/16x16/apps/wine-winecfg.png
/usr/share/icons/hicolor/16x16/apps/wine.png
/usr/share/icons/hicolor/16x16/places/folder-wine.png
/usr/share/icons/hicolor/22x22/apps/wine-notepad.png
/usr/share/icons/hicolor/22x22/apps/wine-uninstaller.png
/usr/share/icons/hicolor/22x22/apps/wine-winecfg.png
/usr/share/icons/hicolor/22x22/apps/wine.png
/usr/share/icons/hicolor/22x22/places/folder-wine.png
/usr/share/icons/hicolor/24x24/apps/wine-notepad.png
/usr/share/icons/hicolor/24x24/apps/wine-uninstaller.png
/usr/share/icons/hicolor/24x24/apps/wine-winecfg.png
/usr/share/icons/hicolor/24x24/apps/wine.png
/usr/share/icons/hicolor/24x24/places/folder-wine.png
/usr/share/icons/hicolor/32x32/apps/wine-notepad.png
/usr/share/icons/hicolor/32x32/apps/wine-uninstaller.png
/usr/share/icons/hicolor/32x32/apps/wine-winecfg.png
/usr/share/icons/hicolor/32x32/apps/wine.png
/usr/share/icons/hicolor/32x32/places/folder-wine.png
/usr/share/icons/hicolor/48x48/apps/wine-notepad.png
/usr/share/icons/hicolor/48x48/apps/wine-uninstaller.png
/usr/share/icons/hicolor/48x48/apps/wine-winecfg.png
/usr/share/icons/hicolor/48x48/apps/wine.png
/usr/share/icons/hicolor/48x48/places/folder-wine.png
/usr/share/icons/hicolor/scalable/apps/notepad-48.svg
/usr/share/icons/hicolor/scalable/apps/wine-uninstaller.svg
/usr/share/icons/hicolor/scalable/apps/wine-winecfg.svg
/usr/share/icons/hicolor/scalable/apps/wine.svg

/usr/share/applications/wine-browsedrive.desktop
/usr/share/applications/wine-notepad.desktop
/usr/share/applications/wine-uninstaller.desktop
/usr/share/applications/wine-winecfg.desktop

/usr/share/desktop-directories/wine-Programs-Accessories.directory
/usr/share/desktop-directories/wine-Programs.directory
/usr/share/desktop-directories/wine-wine.directory

/usr/lib/mime/packages/wine

/etc/xdg/menus/applications-merged/wine.menu

Anyway, good job!

Revision history for this message
jre (jre-phoenix) wrote :

Thanks. In the meantime I commited the .desktop file as a documentation example (so you don't have to wget it) and give instructions how to (un-)install it. Since I assume the same security considerations as for binfmt support apply, we won't automatically enable this (in Debian).

/usr/share/icons/hicolor/*
/usr/share/applications/*
Looks like this gives application icons/launchers for browsedrive (never heard, but the name is clear), wine-notepad, wine-uninstaller and wine-winecfg do. I'm not really interested in adding these.

/usr/share/desktop-directories/*
I'm not exactly sure what these do, screenshots might help me to understand them. But looks like they are creating (sub-)sections to group apllication launchers (which?).
In my Debian Gnome system I think I don't even have these (sub-)sections for launchers. So is this really useful today, or a relict from the past? I assume this is for a completely other GUI philosophy, than what current Desktop Environments (at least Gnome, I don't know Unity) do, and thus not really wanted.

/usr/lib/mime/packages/wine
See e.g. https://wiki.debian.org/MimeTypesSupport. I assume all functionality is given by the .desktop file today.

/etc/xdg/menus/applications-merged/wine.menu
If I'm not mistaken those aren't needed anymore, the menu system has been superseded by the .desktop system. The functionality should still be there.

So from my perspective I think everything is done. Please give specific descriptions/examples if I missed something.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

/usr/share/icons/hicolor/16x16/apps/wine.png
/usr/share/icons/hicolor/22x22/apps/wine.png
/usr/share/icons/hicolor/24x24/apps/wine.png
/usr/share/icons/hicolor/32x32/apps/wine.png
/usr/share/icons/hicolor/48x48/apps/wine.png
/usr/share/icons/hicolor/scalable/apps/wine.svg
These files are needed by the wine.desktop to show correct icon (for example if you choose "Open with" in Nautilus).

/usr/share/desktop-directories/wine-Programs.directory
/usr/share/desktop-directories/wine-wine.directory
Yes, these files do create a menu (sub)section for installed Wine programs. This is really useful for MATE, Cinnamon, XFCE and other non-GNOME/non-Unity DEs.

Revision history for this message
carlix (carlixlinux) wrote :

Same problem in wine-stable in both architectures

jre (jre-phoenix)
Changed in wine (Ubuntu):
status: New → Confirmed
AsciiWolf (asciiwolf)
description: updated
tags: added: xenial yakkety
AsciiWolf (asciiwolf)
description: updated
jre (jre-phoenix)
description: updated
Revision history for this message
AsciiWolf (asciiwolf) wrote :
Changed in wine-development (Ubuntu):
importance: Undecided → High
Changed in wine (Ubuntu):
importance: Undecided → High
AsciiWolf (asciiwolf)
tags: added: zesty
Revision history for this message
carlix (carlixlinux) wrote :

Remember Ubuntu is about easy and most people who use it don't know how to use a terminal, so this program can not be installed to a lot of people so that this problem is very important.

Revision history for this message
jre (jre-phoenix) wrote :

[ Quoting some previous comments with ">" ]

> Because of that, Wine and associated applications (winecfg, wine uninstaller etc.) cannot be started from the desktop menu

Wine in desktop menu
--------------------
AFAIK *Wine* itself could never be started from the desktop menu. If at all this might be possible if you enable the "Virtual Desktop" in winecfg (but usually people are only interested in the Windows applications, not in seeing the Windows desktop).

There's wine.desktop, but this does neither start Wine itself, nor does it add a launcher to the menu (NoDisplay=true). It only makes native file type associations, so it tells your system that it may start e.g. an .exe *with* Wine. For security reasons wine.desktop is not "activated" in the packages, but only shipped as an example.

Quoting /usr/share/doc/wine/README.Debian.gz:

~~~~~
To enable system-wide support for .exe files execute the following
command (replace /usr/share/doc/wine with
/usr/share/doc/wine-development if you use wine-development):
$ sudo cp /usr/share/doc/wine/examples/wine.desktop /usr/share/applications/
~~~~~

winecfg and uninstaller in desktop menu
---------------------------------------
I just commented on that in https://bugs.launchpad.net/ubuntu/+source/wine/+bug/1493044. Please followup there.

If I start winecfg here from a terminal it has its icon.

/usr/share/icons/hicolor/scalable/apps/wine.svg is/will be shipped again with src:wine 1.8.6-2 and src:wine-development 2.0~rc6-1

> launchers of the installed Windows programs are not being put in the right (Wine) category

Not sure if I understand this correctly. Maybe it's "just" working on my Debian GNOME system. Here if I install e.g. Steam for a fresh user:

Wine automatically creates the menu structure and creates an entry for Steam there.

Accordingly the following files are created:

~/.local/share/desktop-directories:
wine-Programs-Steam.directory
wine-Programs.directory
wine-wine.directory

~/.local/applications/wine/Programs/Steam/:
Steam.desktop

> /usr/share/desktop-directories/wine-Programs.directory
> /usr/share/desktop-directories/wine-wine.directory
> Yes, these files do create a menu (sub)section for installed Wine programs.
> This is really useful for MATE, Cinnamon, XFCE and other non-GNOME/non-Unity DEs.

But on these DEs the files in ~/.local are still created by Wine, right? So it still works!?

> and Windows binaries cannot be run directly from the file manager using development version of Wine.

True, due to security reasons your system will not know how to launch e.g. an .exe, see above.

Revision history for this message
jre (jre-phoenix) wrote :

Above answer was about the scope of this bug ("usability").

About installation: see https://bugs.launchpad.net/ubuntu/+source/wine-development/+bug/1571816 (fix committed).

AsciiWolf (asciiwolf)
tags: added: artful
Revision history for this message
AsciiWolf (asciiwolf) wrote :

Any news?

AsciiWolf (asciiwolf)
tags: added: bionic
Revision history for this message
carlix (carlixlinux) wrote :

please solve this

Revision history for this message
jre (jre-phoenix) wrote :

Tagging as "Opinion". We made some changes in the meantime, which address some, but not all related requests.

wine.desktop is provided as example in /usr/share/doc/wine/examples/wine.desktop. This is what probably most people here want, so that they can start an exe graphically by double-click or open-with. But it has the biggest risk of inadvertently running windows malware, and therefore won't be installed activated. Further I think it does users a disservice by obfuscating errors during installation of a Windows application, which unfortunately happens quite often.

You get activated binfmt support with the "wine-binfmt" package, which is suggested by wine. This helps when working in a text-terminal. Not installed by default because of security risks, and others explicitly not wanting this feature.

For these two issues please also see https://bugs.launchpad.net/ubuntu/+source/wine/+bug/256880 [ubuntu helps spreading windows viruses]).
/usr/share/doc/wine/README.Debian.gz (https://salsa.debian.org/wine-team/wine/raw/master/debian/README.debian) also explains it, and gives the needed manual commands.

If you install a Windows application which installs a desktop launcher, then that is also on the Linux desktop. Not verified, but this should be true for menu entries, too.

If you install a Windows application which comes with file associations (e.g. MS Word for .doc) these associations are also created in the Linux system.

So that only leaves Menu entries of winecfg and such. They might be added if they are taken upstream (winehq.org). But personally I see no use in them, and I assume most requests were not about them. This topic is at https://bugs.launchpad.net/ubuntu/+source/wine/+bug/1493044.

All above is valid for both wine and wine-development in Ubuntu.

Did I miss anything?

If anything of the above is not working as described please file a separate bug.

Changed in wine (Ubuntu):
status: Confirmed → Opinion
Changed in wine-development (Ubuntu):
status: Confirmed → Opinion
Revision history for this message
jre (jre-phoenix) wrote :

I forgot: /usr/share/icons/hicolor/scalable/apps/wine.svg gets installed.

Revision history for this message
carlix (carlixlinux) wrote :

Please check the comments of the people using the software center in the wine app section, people without knowledge installed the application and are unable to select "open programs with wine" because they dont know other methods, if you consider that its a risk because you can get viruses you must know that the default aplication for exe file is not wine its file roller but at least a normal user can select it from the menu and whats the point to not let the users excecute exe files? I thought it was the main porpuse of wine.

Many people quit Ubuntu because they werent able to play some windows video games or programs because of this little bug, belive me search on the internet there are many examples.

Changed in wine (Ubuntu):
status: Opinion → Confirmed
Changed in wine-development (Ubuntu):
status: Opinion → Confirmed
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Bug #1711855 (wine-stable is missing the standard Wine menu entries / .desktop files) seems to be a duplicate of this bug.

Revision history for this message
pemartins (paulo76-algarve) wrote :

"If you install a Windows application which installs a desktop launcher, then that is also on the Linux desktop. Not verified, but this should be true for menu entries, too."

No desktop shortcuts nor menu entries are being created for the Windows applications installed.
Also using wine-staging 4.8, same result with wine-stable 4.8 freshly installed.

Please fix this as soon as possible, it literally makes Wine useless for me and for every other regular user. As mentioned previously, if you read the comments in the software stores the application is being trashed because of this bug.

Revision history for this message
jre (jre-phoenix) wrote :
Download full text (3.5 KiB)

@carlix and @pemartins

First off, please read this comment carefully and assume good will. It might sound quite negative to you at first, but I'm really trying to see what can be changed, and therefore try different view points on this topic.

I can only check the comments in the Software-Center in Debian. There I see an upvoted, 5-star comment with some explanations why "Launch" in the Software Center cannot work, and later lots of 1-star "doesn't work" comments. That makes me wonder if adding Wine to the "Software Center" was the right decision. With multiarch (i386 needed on amd64 systems) and workarounds as described in appdb.winehq.org needed for specific programs, I still wonder if going the graphical way really helps people (being able to right-click on an application to "Start with Wine", but not seeing any error messages, might cause more trouble then help. And expecting that you can "Launch" Wine is completely off). So my personal feeling is to not lower the entry barrier too much, in order to not make people having false expectations. In that way I think about removing Wine from the Software-Center again.

Now, ignore that for now, and let's consider other options:

You gave me one example of comments about the right-click thing, so you want the wine.desktop file installed. Regarding the security-implications, and fileroller being preferred anyway: I don't think this assumption is true on every system (based on what I remember from the last time I had a thorough look at this). So this would need some investigation first. Maybe there's a way to ensure Wine is not the preferred application automatically.

However, I'm thinking about a new package "wine-desktop-integration", which installs wine.desktop and maybe other things (e.g. winecfg.desktop, which so far nobody here did care to submit upstream :( ). Would such a "wine-desktop-integration" package help? Or do you want this stuff in the "wine" package itself? For the former I could just put a warning in the package, for the latter the security issue needs to be solved for sure, but even then I expect some opposition e.g. for "cluttering menus".

@pemartins: Please elaborate. What system/desktop environment (DE) are you on? Does your DE allow you to put files on the Desktop at all? Do you have an applications menu?
E.g here (Debian Buster with Gnome as DE) I have the setting "Tweaks -> Extensions -> Applications Menu" enabled, and see the installed Windows application as expected in the "Applications - Wine" menu. I can also start installed programs after hitting the "Super/Windows" key. However I just noticed that Gnome 3.28 completely removed the option to show files on the Desktop. You need e.g. the nemo-desktop file manager to keep this feature. So I suggest you verify the contents of these folders (note that they might use translated names on your system, or be configured completely different):

$HOME/Desktop
$HOME/.local/share/applications/wine/Programs
$HOME/.local/share/desktop-directories

If you find the files there, or after a search somewhere similar in your home folder then Wine already works as expected, and the issue is somewhere else.

Is there anyth...

Read more...

Revision history for this message
carlix (carlixlinux) wrote :

Dear jre-phoenix,

We really apreciate your work and we encourage you to continue providing the wine package, here is my opinion:

*Leave the wine package as it is

*When you would press launch in software-center it would open wine-cfg

*Fileroller it's by default after wine installation the program to open exe files

*Give noobs the possibility of open wine by right click with desktop mime associations

*If people choose to install wine they assume security risks and they just want to use it (like windows users), if you want in the description on software-center you can warn people about that

*As an example you can see how manjaro and solus manage wine installation https://www.youtube.com/watch?v=XmwZiF3Wm9c

*I know friends that ditched Ubuntu because they say that they cant use wine and they choose other distros.

Thanks for your reply.

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

@jre : thanks for your work on the wine package, it helps a lot.

I understand the risk here and the decision to limit the usuability to open exe files with wine.

However , was it a consensus decision in Canonical ? the community ?

Revision history for this message
jre (jre-phoenix) wrote :

@michel.ekimia: As Debian Maintainer I work on the Debian packages in Debian. I also helped Ubuntu folks to migrate to our Debian packages. Since then there has never been any action from any Ubuntu developer to change things. I hinted to this a few times (probably in another related bugreport) by telling that Ubuntu is of course free to change things to their needs.

So no, there was no consensus decision, because there was just no activity/discussion/developer interest at all. There's only this discussion with (I assume) Ubuntu users here and related reports. My repeated pledge to at least send the winecfg.desktop file upstream never got any response/action.

I still plan to add (or at least propose) an additional package "wine-desktop-integration". But due to unrelated reasons this will still take me at least several weeks.

Changed in wine (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Which version contains the fix ?

Not in current focal https://packages.ubuntu.com/focal/all/wine/filelist

Revision history for this message
jre (jre-phoenix) wrote :

Please set status to "Confirmed" again.
And yeah, sorry, I'm not working on this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.