From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 12:48:36 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B4B716A4CE; Fri, 5 Dec 2003 12:48:36 -0800 (PST) Received: from cs78135006.pp.htv.fi (cs78135006.pp.htv.fi [62.78.135.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B22E43FE0; Fri, 5 Dec 2003 12:48:32 -0800 (PST) (envelope-from jau@cs78135006.pp.htv.fi) Received: from cs78135006.pp.htv.fi (localhost [127.0.0.1]) hB5KmVQ9049956; Fri, 5 Dec 2003 22:48:31 +0200 (EET) Received: (from jau@localhost) by cs78135006.pp.htv.fi (8.12.10/8.12.3/Submit) id hB5KlAeq049954; Fri, 5 Dec 2003 22:47:10 +0200 (EET) Posted-Date: Fri, 5 Dec 2003 22:47:10 +0200 (EET) Message-Id: <200312052047.hB5KlAeq049954@cs78135006.pp.htv.fi> To: hackers@freebsd.org Date: Fri, 5 Dec 2003 22:47:10 +0200 (EET) From: jau@iki.fi (Jukka A. Ukkonen) Sender: jau@iki.fi Latin-Date: dies Veneris V Decembrie a.d. MMIII Organization: Private person OS-Platform: FreeBSD Phone: +358-9-6215280 (home) Content-Conversion: prohibited X-Mailer: ELM [version 2.4 PL25+pgp] MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: running wine automatically as a shell for w32 binaries X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jau@iki.fi List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2003 20:48:36 -0000 Hi all, I wrote a new imgact function for FreeBSD to start wine automatically as a sort of an "interpreter" for windows binaries. Obviously the interpreter does not have to be exactly wine. You can change the program using a sysctl variable. You can also use another sysctl variable to tell the kernel whether the emulator requires windows binaries to be compatible with the host processor architecture. The idea of allowing systems to use wine automatically as a shell style "interpreter" for windows binaries was born as a kind of BSD advocacy stunt. It was simply nice to be able to tell people my system was able to do something they had never expected. People kept telling me they are stuck with windows, because they are unable to use their everyday applications in any other system. When I have told about things like wine to help with their problem people usually start complaining they are unable to do any special tricks to start their programs in an emulator. So, they do not know how to do it and they do not really want to know. Obviously what they need is some mechanism which "knows" instead of the user. This lead me to thinking that the analogy with emulators and shells is obvious. With the BSD imgact system one could just add another imgact module logically similar to the one used for the shell scripts. I just had to write one. The patch is available here... The diffs were done against 4.9-STABLE sources, but originally the imgact_wine function was created in a 3.5.1 environment. There are some things which might have to change. (1) Currently the CPU architecture recognition does not work for any other system but iX86, because the processor type macros i386, alpha, ppc, etc. seem to no longer exist during 4.9 kernel compilation. Actually I would like to get all those i386, alpha, ppc, and what-not back!!! (2) In case there is a w32 emulator within the kernel itself, as I believe some people try to tackle the same issue in NetBSD, there is a need for one more sysctl variable to tell the kernel whether to use the internal emulator or an external one like wine. (3) Lacking any information of a better place to put my w32 related sysctl variables I put them in the kernel branch (kern.w32xxx). They might have to be moved somewhere else. Anyhow, this is such a small change to the system and so easy to switch on and off using sysctl I see no good reason to not support this functionality. OTOH the advocacy value for novice users with windows backgrounds might be quite remarkable. Any GUI oriented program launcher would instantly become able to handle also w32 binaries without any special knowledge of wine or windows binary formats. That again is what any novice with a windows background expects. If you find the idea worthy to use also in your systems, feel free... You may use it or abuse it, and if it breaks you get to keep the pieces. Cheers, // jau .--- ..- -.- -.- .- .- .-.-.- ..- -.- -.- --- -. . -. / Jukka A. Ukkonen, Mawit Ltd, Finland /__ M.Sc. (sw-eng & cs) (Phone) +358-500-606-671 / Internet: Jukka.Ukkonen(a)Mawit.Com (Home) +358-9-6215-280 / Internet: ukkonen(a)nic.funet.fi v Internet: jau(a)iki.fi + + + + My opinions are mine and mine alone, not my employers. + + + +