You are not logged in.

#1 2008-08-26 21:36:29

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Wine + KDE -- default program for .exe on upgrade

I find that every time I pacman -Syu, WINE gets set as the default program for opening windows .exe files.

Since I'm a sysadmin for several mail servers, I occasionally have to open suspicious e-mails and see what they are, including examining the attachments. I'm worried that one day I'll accidentally double-click one of the .exe ones and that wine will run it.

I'm sure WINE doesn't have the level of windows compatibility required for spyware & viruses to do much, but it still makes me nervous.

I always go into the KDE settings and remove this file association as soon as I notice it, but I'm wondering if there's any way to make it stay permanently gone?

Is this something the package maintainer for WINE and/or KDE has any control over, or is this the wrong place to complain about it?

~Felix.

Offline

#2 2008-08-27 03:51:18

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Wine + KDE -- default program for .exe on upgrade

Unfortunately I have not scceded in finding a way to disable this. Maybe it can't be done, maybe it can be done, but well is late here so I didn't put my best effort into searching. If anybody finds something please drop me a line here or to my email. Thanks. wink


Follow me in: Identi.ca, Twitter, Google+

Offline

#3 2008-08-27 05:12:20

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Wine + KDE -- default program for .exe on upgrade

This thing is crazy....

The other week I put a CD in...

KDE: Do you want to autorun CD?
Me: wtf!

Then sure enough, the AOEII installer ran flawlessly and the game started flawlessly from the new shortcut on my desktop! As easy as windows, except without the reboot tongue

I felt replaced! No longer did I need to mount, or mess with winecfg or open up a black box and type funny commands.

Last edited by iphitus (2008-08-27 05:13:03)

Offline

#4 2008-08-27 06:15:02

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Wine + KDE -- default program for .exe on upgrade

arg... one of the reasons I love linux so much is that we get away from all that autorun stuff. Autorun is a serious security hazard, as my digital camera will attest -- just the other week, it was assaulted by a virus that likes to drop autorun.inf plus itself onto everything it can find.

Fortunately, since I hate automount with a passion, nothing happened except that i noticed the autorun.inf and deleted it (actually, since I was cleaning the computer that gave it to me, I was kind of expecting it, but that's beside the point).

How close are we to having this all happen so flawlessly that we can get windows viruses, running under wine without any intervention from us?

This kind of thing must stop. Yes, it's slightly less "easy" to have to chmod something you downloaded or opened from an e-mail before you can run it, but that's precisely why there are no linux viruses in the wild.

~Felix.

Offline

#5 2008-08-27 06:17:39

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Wine + KDE -- default program for .exe on upgrade

Oh, and regarding a solution -- here's something i've been playing with today:

move /usr/bin/wine to /usr/bin/wine_real.

in /usr/bin/wine:

#!/usr/bin/perl

$filename = shift @ARGV;

if (substr($filename,0,1) ne "/") {
    $filename = $ENV{PWD}."/".$filename;
}

@safe_dirs = (
    "/home/felix/.wine"
);

$safe = 0;
foreach (@safe_dirs) {
    if ($filename =~ m/^$_?/) {
        $safe = 1;
    }
}

if ($safe) {
    `/usr/bin/wine_real "$filename"`;
}
else {
    die ("$filename is not in safe paths list");
}

Then, in /etc/pacman.conf, add /usr/bin/wine to the NoUpgrade list. I *think* (not positive) that future wine upgrades will result in /usr/bin/wine.pacnew and a warning from pacman about that; then you can go in there and mv wine.pacnew wine_real .

~Felix.

Offline

#6 2008-08-27 06:42:03

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Wine + KDE -- default program for .exe on upgrade

thetrivialstuff wrote:

I find that every time I pacman -Syu, WINE gets set as the default program for opening windows .exe files.

Since I'm a sysadmin for several mail servers, I occasionally have to open suspicious e-mails and see what they are, including examining the attachments. I'm worried that one day I'll accidentally double-click one of the .exe ones and that wine will run it.

I'm sure WINE doesn't have the level of windows compatibility required for spyware & viruses to do much, but it still makes me nervous.

I always go into the KDE settings and remove this file association as soon as I notice it, but I'm wondering if there's any way to make it stay permanently gone?

Is this something the package maintainer for WINE and/or KDE has any control over, or is this the wrong place to complain about it?

~Felix.

This seems like an issue you should be raising with Wine developers.  It's not an Arch package problem.  It's how Wine appears to be designed to work.

Offline

#7 2008-08-27 08:34:27

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Wine + KDE -- default program for .exe on upgrade

There's probably something within the wine package.

thetrivialstuff: It didn't just autorun it. It opened up a KDE dialog that just said it had detected autorun capability, and then asked if I wanted to. Might have had a warning too.

A better workaround would simply be to find what file that is being installed registers wine as the default handler for exe's under KDE -- and to find out why KDE isn't maintaining your setting.

James

Offline

#8 2008-08-27 21:54:57

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Wine + KDE -- default program for .exe on upgrade

fwojciec wrote:

This seems like an issue you should be raising with Wine developers.  It's not an Arch package problem.  It's how Wine appears to be designed to work.

I tried that yesterday; I added a feature request but it was already dismissed:
http://bugs.winehq.org/show_bug.cgi?id=15028

I think the person who responded misunderstood my suggestion as being some kind of filesystem access limit, rather than a simple run/don't run filter.

I suspect that what's doing the associating is the wine.desktop file:

[felix@ephrenon ~](0)$ pacman -Qo /usr/share/applications/wine.desktop
/usr/share/applications/wine.desktop is owned by wine 1.1.3-1

Which I guess I should bring up with the arch package maintainer for WINE, but it'd still be nice if this were fixed within WINE itself, since Arch isn't the only distro that associates .exe with it automatically.

~Felix.

Offline

#9 2008-08-27 22:00:20

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Wine + KDE -- default program for .exe on upgrade

Well, I am the wine package maintainer, so email me your suggestions and I will discuss with other developers. Thanks.


Follow me in: Identi.ca, Twitter, Google+

Offline

#10 2008-08-28 04:35:53

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Wine + KDE -- default program for .exe on upgrade

kensai wrote:

Well, I am the wine package maintainer, so email me your suggestions and I will discuss with other developers. Thanks.

Oh, cool. Anyway, I think I figured out a way to fix it -- just remove this line from usr/share/applications/wine.desktop in the wine package:

MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;

That'll stop KDE (and probably everything else that uses /usr/share/applications as its mime provider database) from automatically associating it.

I know the .desktop file will then be technically incorrect by not listing WINE as being a handler for any mime types, but this way users will have to set it up manually if they want the ability to run strange programs by accident ;)

You could also add a message about it to the pacman install, something like

==> by default, WINE is not associated with Windows executables for safety reasons.
  If you want to run ANY Windows executable by just double-clicking it (NOT recommended),
  you'll have to do this as root:

echo "MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;" >> /usr/share/applications/wine.desktop

~Felix.

Offline

#11 2008-08-28 12:06:45

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Wine + KDE -- default program for .exe on upgrade

OK, thanks for the info, as I mentioned earlier I didn't had the time to research this so thanks. I will discuss this with other developers and see what are the pros and cons.

Last edited by kensai (2008-08-28 12:07:04)


Follow me in: Identi.ca, Twitter, Google+

Offline

#12 2008-08-28 16:01:51

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Wine + KDE -- default program for .exe on upgrade

Follow the developers discussion here, http://archlinux.org/pipermail/arch-dev … 07720.html


Follow me in: Identi.ca, Twitter, Google+

Offline

Board footer

Powered by FluxBB