You are not logged in.

#1 2018-06-27 06:23:09

zegkljan
Member
Registered: 2017-12-30
Posts: 60

[SOLVED] How to prevent Wine from launching native mono apps?

I have tried the example from https://wiki.archlinux.org/index.php/mono:

test.cs

using System;

public class Test {
 public static void Main(string[] args) {
  Console.WriteLine("Hello World!");
 }
}

Then run:

$ mcs test.cs
$ mono test.exe
Hello world!

Everything is fine. However, if I run the program directly, it obviously runs with wine:

$ ./test.exe 
000f:err:service:process_send_command receiving command result timed out
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 1053
0009:err:module:load_builtin_dll failed to load .so lib for builtin L"l3codeca.acm": libmpg123.so.0: cannot open shared object file: No such file or directory
Hello World!

which, among other issues, takes about 10 seconds to even start, while in the native mode it starts immediately.

I have removed all wine file associations (as described in https://wiki.archlinux.org/index.php/wi … ociations) and I have stopped and disabled systemd-binfmt.service (as described in https://wiki.archlinux.org/index.php/wi … mplicitly). And despite all that, wine still hijacks my native mono exe.

It's not critical (I can always run explicitly with mono) but it's very annoying and I have a feeling of wine doing more than I want it to do. Does anybody have some tips on solving this (other than removing wine)?

Last edited by zegkljan (2018-07-16 05:48:07)

Offline

#2 2018-06-27 08:06:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 12,244
Website

Re: [SOLVED] How to prevent Wine from launching native mono apps?

Have you enabled systemd-binfmt.service?

https://wiki.archlinux.org/index.php/Wi … implicitly


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-06-27 09:47:55

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: [SOLVED] How to prevent Wine from launching native mono apps?

Maybe systemwide XDG mime settings are involved, check xdg-mime outputs.
See https://wiki.archlinux.org/index.php/Xdg-utils

Also look at mimeapps.list (multiple locations) , see https://wiki.archlinux.org/index.php/XD … eapps.list


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2018-07-03 10:06:12

zegkljan
Member
Registered: 2017-12-30
Posts: 60

Re: [SOLVED] How to prevent Wine from launching native mono apps?

WorMzy wrote:

Have you enabled systemd-binfmt.service?

https://wiki.archlinux.org/index.php/Wi … implicitly

I have disabled it, as I have written in the original post.

Lone_Wolf wrote:

Maybe systemwide XDG mime settings are involved, check xdg-mime outputs.
See https://wiki.archlinux.org/index.php/Xdg-utils

Also look at mimeapps.list (multiple locations) , see https://wiki.archlinux.org/index.php/XD … eapps.list

This might be the right track:

$ xdg-mime query default application/x-ms-dos-executable 
wine.desktop

Should I set this default to mono then? There is no mono.desktop.

Offline

#5 2018-07-03 11:39:18

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: [SOLVED] How to prevent Wine from launching native mono apps?

xdg-mime only accepts *.desktop files that are in a usermenu, it also only works within an X session.
Mono appears to position itself as a compiler, compilers on linux are not started as gui applications.



Using binfmt seems like a better approach , check man binfmt.d 5
you can disable the binfmt file supplied by wine and add one that starts mono instead.

EDIT
Actually mono does install a binfmt file at usr/lib/binfmt.d/mono.conf .
disabling the wine binfmt file might be enough to solve this.

Last edited by Lone_Wolf (2018-07-03 11:42:30)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2018-07-16 05:47:46

zegkljan
Member
Registered: 2017-12-30
Posts: 60

Re: [SOLVED] How to prevent Wine from launching native mono apps?

Lone_Wolf wrote:

Actually mono does install a binfmt file at usr/lib/binfmt.d/mono.conf .
disabling the wine binfmt file might be enough to solve this.

That did the trick. Thanks! Marking as solved.

Offline

Board footer

Powered by FluxBB