From owner-freebsd-questions@FreeBSD.ORG Fri Feb 20 03:57:55 2015 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAEC5441 for ; Fri, 20 Feb 2015 03:57:55 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA90C88F for ; Fri, 20 Feb 2015 03:57:55 +0000 (UTC) Received: from r56.edvax.de (port-92-195-149-162.dynamic.qsc.de [92.195.149.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 75CB83CCFE; Fri, 20 Feb 2015 04:57:47 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t1K3vfBx002188; Fri, 20 Feb 2015 04:57:41 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Fri, 20 Feb 2015 04:57:40 +0100 From: Polytropon To: Toomas Aas Subject: Re: Graphical Linux app on FreeBSD Message-Id: <20150220045740.214a6cea.freebsd@edvax.de> In-Reply-To: <20150219205247.17861nw45qwx2t6s@webmail.raad.tartu.ee> References: <20150219205247.17861nw45qwx2t6s@webmail.raad.tartu.ee> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 03:57:56 -0000 On Thu, 19 Feb 2015 20:52:47 +0200, Toomas Aas wrote: > I am trying to run a Linux binary on my FreeBSD system using the Linux > compatibility layer. This is a GUI application. I tried to run it as > regular user and as root, but each time I encounter different error > message: > > $ ./the_linux_binary > XOpenIM() failed > Abort (core dumped) Try to run "truss " to get more details. Maybe this program needs Linux procfs? In that case, add the required line to /etc/fstab. If the program also needs additional Linux libraries, you'd have to install them to /compat/linux. Note that if you've installed the program from the ports collection, those tasks should have been performed automatically. If that's some "3rd party stuff", you need to fulfill the requirements manually. > $ su > Password: > root@mypc:/home/toomas/tmp # ./the_linux_binary > No protocol specified > Can't open display: :0.0 That's normal. You have to set $DISPLAY if a program run by root should be able to access the X server, for example "setenv DISPLAY :0.0" should be sufficient. But running something as root usually doesn't help here. :-) > Is there any hope to get such application running? What kind of application is that? Can you be specific? > Relevant system info follows. > > $ grep COMPAT MYKERNEL > options COMPAT_LINUX32 > > $ uname -a > FreeBSD mypc.lan 9.3-STABLE FreeBSD 9.3-STABLE #0 r278030: Sun Feb 1 > 21:19:50 EET 2015 toomas@mypc.lan:/usr/obj/usr/src/sys/MYKERNEL > amd64 > [...] > $ file the_linux_binary > the_linux_binary: ELF 32-bit LSB executable, Intel 80386, version 1 > (GNU/Linux), statically linked, stripped You're running a 64 bit kernel. Is there a known problem for running Linux binaries of 32 bit in that constellation? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...