From owner-freebsd-java@freebsd.org Mon Jun 29 15:43:56 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 573A634C98C; Mon, 29 Jun 2020 15:43:56 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wWxR4nF4z3gR0; Mon, 29 Jun 2020 15:43:55 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd35.google.com with SMTP id k23so17616734iom.10; Mon, 29 Jun 2020 08:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1dsHVv+wXxrWuO2NyOk4H0pBvjdvT2FMOVbM7ef5uUk=; b=X60bl1RF0PBjXSZ4+qY2/F+ezQTmVgaRvEqhyZpf1FEVo02db6pYN6QyRN2wMNnOmM FDxVfFYaRWoQMZfOv7IZ8l4uawTV7ESST0np2CkhItXWpAOYLL1rDPCbLGYzx1c0PsGX VMWoRbLaMUYWQ36uphQcVFts0eK7BTV2JbjS6gSWeKTOfJGatUSeO6NNQCeHM7T9F7Ku O/3zKd5BrrvYJ9Sx7jWSmznLAHxCyDl2wzThsAYxFwsqYDnw0gt9QYkk9lM2ywv7lMYw ArSrPeTX60LYbfPwDwe48NWDo4iYwxsEH86otpiZG72FJ1OW1NBHezYuzN82njNygUHJ 8Gdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1dsHVv+wXxrWuO2NyOk4H0pBvjdvT2FMOVbM7ef5uUk=; b=cf6puQzoZlpJCVJAUgMmNk7zOPN/riaQUzYmYD8Mq1+pMWV/n2dCmFyDmeZZazJ00b bhPVL2Uo7GH62Q07kPkEeOI3LSCrc99AT29L8WE417OmKG89pzQuMUwMa9kH9b+Focdd Hf4Di2P+dCAjsqQdPW1ONbbEzehqDWg0nEAgaFU3DdrqW4k2jM8zUJHD9E7ctfg/A2M8 X/mAi3crFvEOz65WmbQhQ7Qy5jcEzpLYa0+OFrbHzKrSTgp61hKDaimTrtbl8Kh4GbZZ RUikP82VnGZ/aaYhz5hA1D83LML+SqCIJJUrSr+eoZySWDIveg5x6dy/gqUcvuGHQHpE 3MOA== X-Gm-Message-State: AOAM532L3slQQ6jihwiX1bDxThOB2xkebZr8HHCf6pkJ7E9CiVuu9kzl aV/lGHik0fk4s5rcqHANjp3gnzntZyYBCSpyhNX36rFT X-Google-Smtp-Source: ABdhPJxhYTzPMmi9c7P2rk8/X/1y4GldyliGOfgmu31xVh8PocwaIZQli/5gMWJLENrK10BidZqd4FMpSedf98hwyzA= X-Received: by 2002:a05:6638:2485:: with SMTP id x5mr18685632jat.138.1593445434183; Mon, 29 Jun 2020 08:43:54 -0700 (PDT) MIME-Version: 1.0 From: Aryeh Friedman Date: Mon, 29 Jun 2020 11:43:43 -0400 Message-ID: Subject: Min. ports needed for headless AWT/Swing To: freebsd-java@freebsd.org, FreeBSD Mailing List X-Rspamd-Queue-Id: 49wWxR4nF4z3gR0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=X60bl1RF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.03 / 15.00]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.04)[-1.044]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.02)[-1.015]; NEURAL_SPAM_SHORT(0.03)[0.028]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d35:from]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 15:43:56 -0000 I have a java application that works fine with setenv DISPLAY :0.0 on my desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the same app on a VM that has the minimum ports needed to install OpenJDK 8 and Tomcat I get an exception saying that it can't connect to the X server even though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). Note it is the same user on both machines (NIS/NFS password DB/home dirs) doing the running on both machines but is a different user then the one logged in at the console (I do all my development in a separate account) -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Mon Jun 29 18:27:58 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46110351B9F for ; Mon, 29 Jun 2020 18:27:58 +0000 (UTC) (envelope-from 1983-01-06@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wbZj0BZ8z4Bwg for ; Mon, 29 Jun 2020 18:27:56 +0000 (UTC) (envelope-from 1983-01-06@gmx.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1593455273; bh=Fp7a30a/fyoJogL603F4TipJuInb7el/WAZcYK5O1LQ=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=SNr3MXMIjjt+0IW+cERR3myht0rHQbbJLEe+P7cprs4yL08qdkUKdBIDvyHjcRDgX t0341SAOUbcrbaC4VVYuD6N6XG2AjqkQYZ4OvyQN4qaVhb72hnnpeB3IZ3EH670HTC 6adTJa1kbRw0RkYuGEG5rk7GXmEaPszE9YD7kx80= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.13] ([84.143.149.232]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MqJqN-1j3O4g1uK3-00nUaL for ; Mon, 29 Jun 2020 20:27:53 +0200 Subject: Re: Min. ports needed for headless AWT/Swing To: freebsd-java@freebsd.org References: From: Michael Osipov <1983-01-06@gmx.net> Message-ID: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> Date: Mon, 29 Jun 2020 20:27:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:DgfZnN3Gd/8JjFNniCv9rKtzgXnCnSIDpxAHIBOP7iQUNg2TvL6 MMyD0NfkyRp4g4JoFRFFbe0BcOoyFg78BjdRnAGp7vCvUtjHOmG11/jm4Xue1FU+9k4djBY MYWC87qV1Hzaz4X31v+KVSU50bB5ZqPco+N8y6khfNC4xkWWKB5xVZ0TZpcHhbRFaq05B1g NgnY8Lmk7mVhJrt+HuH6w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4AZZLnC9meE=:p5tFyivCkuOzZBpsk8EuYB 2zD7KL8xRNdRwehIkdAiJ70xxQaszH6SzIVhXMAzLdlSo5Gv1+Vr7XgnxMqc5pRspT1BdRdzG fs7mid7W91WFgN3P6xjsDOKx8G67j/UieMHNa+vJAaHr2k9Nnydz7Kwqd55+oNGvXSn0OONnB egCX2oaEdk0vT5uVnoSwGARGTKopAtdg97MmCJeTK1gHralA8WowSSKI7N73t5yEKWeme1+Vg BaNI+ns6CVYRh6pbhTSxHPnHoZ43Hj/JIs4GLIiAA2SUXZmCGzhuT7vVi/SvQT/9LVdjORzLa 7Gg1WqzHJ0vxhz2hwsb4UPlVDEeBBi1iQe+jaLDJCKHFXuWGwaKbCZs4x3inzeGSciaICkBMO zbUYAbxJmZpuLG6fUF8lJvbZ0d9atI0xpolPHLisV3rwoQHGmcInWmiZLzmeeh8ZM50EQ1Pmh d9KO58CGxkG1ghMQw3xpmkyNBqumXNSCG8bwASZGafXn9iZRhKTG4m468cf/Ar5umnY7bWkhf g5hEYv1LrFcd/6HHcSItv/NT0r5RBNN8k6Ptw8+Xat4VlT0pRAoxR730XzskAdWnhvEJOL5yx M0mSNIBI+/S4LcK1Al0czh9kP/WDWyCw0OdmaULHWtLJruPbvY51lJWE+mHg8YfIgZM4Q1K06 ZCXnmel2gZh69MZtemFae4NRNah4xMoe38+xosYllW/sRF4UmQtOvEvB4XFlhjYb3qrc/4jXQ JXY8wI4j8NhuWobiychbShZQhVFkRD4+ZBsqW0WQxkLAGXhvqjmkR7xhKtrRtelUeGgz8o+X6 UWueDLKQABeqXn9mw20EWu52vNTZwYPumId9OzkL6G/3PyMlun5aKPxGJuJ6akfj6lhNMB9XX SwH3xXZoltP+1NA2iwyzBGpHb9Aza/tQ/jo/5WgpAeT7FRoj9CCQqicJVA2u07dwK3YCRIZK5 vBQlP3pObu1PyyR8uG5MIwf2X7Z1YHH6r6KIJ1exevVlaAkRVobEkkVAq7XkCLwi6mFLQRJio 3HeBORQ3wCrPQ/wO6uueqp/l9jWJef6IzKfad9Q59KdYERBpXrUlIOW78vz0IY2ppjN++ff/a QYNC5+EMPLH5jmgTaw+kKCpdx0RdJcZPaFOCKVVlwSfpzo3+s8lv2Ks35z4fszF/irkFqwg+/ 36xqGOdncXX0y7ZgtqLBuitsnejqK9NHIKBnrvUDTuIdUMwZvevffAa6MTHq4R78/ztaTyPrG pp53CW8FAuXPciUISpP90iKnc192+QTNucNgeXA== X-Rspamd-Queue-Id: 49wbZj0BZ8z4Bwg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=SNr3MXMI; dmarc=none; spf=pass (mx1.freebsd.org: domain of 1983-01-06@gmx.net designates 212.227.17.21 as permitted sender) smtp.mailfrom=1983-01-06@gmx.net X-Spamd-Result: default: False [-2.34 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmx.net]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.21:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.net]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmx.net:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.86)[-0.857]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RECEIVED_SPAMHAUS_PBL(0.00)[84.143.149.232:received]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-0.97)[-0.971]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[gmx.net]; NEURAL_SPAM_SHORT(0.09)[0.093]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.17.21:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 18:27:58 -0000 Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > I have a java application that works fine with setenv DISPLAY :0.0 on my > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the > same app on a VM that has the minimum ports needed to install OpenJDK 8 and > Tomcat I get an exception saying that it can't connect to the X server even > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). > Note it is the same user on both machines (NIS/NFS password DB/home dirs) > doing the running on both machines but is a different user then the one > logged in at the console (I do all my development in a separate account) Are you look for "-Djava.awt.headless=true"? From owner-freebsd-java@freebsd.org Mon Jun 29 18:59:43 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 065FE3524A2 for ; Mon, 29 Jun 2020 18:59:43 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wcHK6FWKz4Dym for ; Mon, 29 Jun 2020 18:59:41 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd2b.google.com with SMTP id c16so18326190ioi.9 for ; Mon, 29 Jun 2020 11:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bskPD4bgqVfLc3kB7kZvoeyjr34U5D6fIIVnSBY0Wj0=; b=WS89/VmzZ38Qx8u1hsg1McjuiY5ZhI5ak/KyHFHgPyyXamzqMJbvmvYWx4D1F6pokz b1yj3/FGdd5RaLueHOOteEzQL5SeXPPVI3hIiHPBQnON3n+gWiQbaf8HEqW1H0ECpdDK kVIwotw1LJAsxm8Rf8BtF5P1pzyskWElslrszLREY+ykg/tuVBzq5i33d6i+4YsMA9DK pID6Y6kUH0oo49yOTdi4bC6HGyYvR+G4LH7obXapTPm+9MltcOoW5NTHcHthdw/VJTOi 0GbYOpLVBAnGY30TnrklbAI2hYHKEOv79G8yswZUajWfFYQ03hjK/FNWPYtMyCJx8Ivc 7JAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bskPD4bgqVfLc3kB7kZvoeyjr34U5D6fIIVnSBY0Wj0=; b=RGDWBoeKOC5G128LTKiEKmG3HyPyrvJ75woB0bv3hgDTdSbRwR2EU1cp3w/2EHOrxy UvxaARnxowi2eFUvwg6Tl8tCWgbHH7EP9wQBccpLfXAdQ23rNZ1b3LJUY+XJW+oPPfoX n42oimQqsM3sJEpJr9FD1C1LBMiY4twIqe+yPhhOM//dzylOUX7NS4impPgiY7rohE5s leWj8VVLCnWdD++k/rYYsT0t3R3ZAXFptZX+pUm3q2gSaLIwh8UYdb2htnxLklwjghYp FIkRs8YFHNHAkD2ygp7GW/RkC9udYywiRhGT2u1Q7HXTqiKGx4plGm+Q1BMUeHu856un qbtw== X-Gm-Message-State: AOAM530VLkheZ7Mg4hRAcABz9bDBHKoRqOI+m8eWRIZe7DJonL0GCQuw kyeoiXONuXTlFJL4UMe0pdCk734QadmMrbnRPLJIiGU19MQ= X-Google-Smtp-Source: ABdhPJxVBThii3XzYmKCxIb8AkW0u34vsnwEC0qWCYCmDa2fUXUHLkiTjQQ8hej/wdekPf/jE/PTJbbmfPU262cEzWw= X-Received: by 2002:a6b:e617:: with SMTP id g23mr18314501ioh.103.1593457180807; Mon, 29 Jun 2020 11:59:40 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> In-Reply-To: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> From: Aryeh Friedman Date: Mon, 29 Jun 2020 14:59:29 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Michael Osipov <1983-01-06@gmx.net> Cc: freebsd-java@freebsd.org X-Rspamd-Queue-Id: 49wcHK6FWKz4Dym X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=WS89/Vmz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.05)[-1.051]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-1.02)[-1.019]; NEURAL_HAM_SHORT(-0.33)[-0.330]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2b:from]; FREEMAIL_TO(0.00)[gmx.net]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 18:59:43 -0000 On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > > I have a java application that works fine with setenv DISPLAY :0.0 on my > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the > > same app on a VM that has the minimum ports needed to install OpenJDK 8 > and > > Tomcat I get an exception saying that it can't connect to the X server > even > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). > > Note it is the same user on both machines (NIS/NFS password DB/home dirs) > > doing the running on both machines but is a different user then the one > > logged in at the console (I do all my development in a separate account) > > Are you look for "-Djava.awt.headless=true"? > Since this is a screen capture/recording program (which I am the developer) I need to be able to capture the console (running X) that I am currently on. So the question is what is the minimum set of ports/packages I need to install on the VM to make it see and X server? It should be noted the program has no GUI but does use java.awt.Robot#createScreenCapture (using the full screen resolution as it's bounds) individual frames of the longer video. Here is the specific exception I am attempting to fix: On desktop (192.168.11.20) % xhost + On VM (192.168.11.4): % setenv DISPLAY 192.168.11.20:0.0 % java -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* -cp /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar test.TestMain Result of the jvm invocation on the VM (not it works no problem su(do)'ing to another account on the desktop if I do setenv DISPLAY :0.0): Caused by: java.awt.AWTError: Can't connect to X11 window server using '192.168.11.20:0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 09:52:26 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C611349E27 for ; Wed, 1 Jul 2020 09:52:26 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xc2w5k64z4DkX for ; Wed, 1 Jul 2020 09:52:24 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 1 Jul 2020 11:52:20 +0200 (CEST) From: Ronald Klop To: Aryeh Friedman Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Message-ID: <310397709.40.1593597140363@localhost> In-Reply-To: References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> Subject: Re: Min. ports needed for headless AWT/Swing MIME-Version: 1.0 X-Mailer: Realworks (514.227.04d0bbae633) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49xc2w5k64z4DkX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.66 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-0.98)[-0.979]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.922]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:52:26 -0000 Van: Aryeh Friedman Datum: maandag, 29 juni 2020 20:59 Aan: Michael Osipov <1983-01-06@gmx.net> CC: freebsd-java@freebsd.org Onderwerp: Re: Min. ports needed for headless AWT/Swing > > On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: > > > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > > > I have a java application that works fine with setenv DISPLAY :0.0 on my > > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the > > > same app on a VM that has the minimum ports needed to install OpenJDK 8 > > and > > > Tomcat I get an exception saying that it can't connect to the X server > > even > > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). > > > Note it is the same user on both machines (NIS/NFS password DB/home dirs) > > > doing the running on both machines but is a different user then the one > > > logged in at the console (I do all my development in a separate account) > > > > Are you look for "-Djava.awt.headless=true"? > > > > Since this is a screen capture/recording program (which I am the developer) > I need to be able to capture the console (running X) that I am currently > on. So the question is what is the minimum set of ports/packages I need > to install on the VM to make it see and X server? It should be noted the > program has no GUI but does use java.awt.Robot#createScreenCapture (using > the full screen resolution as it's bounds) individual frames of the longer > video. > > Here is the specific exception I am attempting to fix: > On desktop (192.168.11.20) > % xhost + > > On VM (192.168.11.4): > % setenv DISPLAY 192.168.11.20:0.0 > % java > -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* > -cp > /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar > test.TestMain > > Result of the jvm invocation on the VM (not it works no problem su(do)'ing > to another account on the desktop if I do setenv DISPLAY :0.0): > > Caused by: java.awt.AWTError: Can't connect to X11 window server using > '192.168.11.20:0.0' as the value of the DISPLAY variable. > at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) > at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) > at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) > at java.security.AccessController.doPrivileged(Native Method) > at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:264) > at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) > at > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) > at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) > > _______________________________________________ > > freebsd-java@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > Hi, Can you start any other X application on the VM using the DISPLAY setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X instead of something with Java. I guess it is something with X. I guess your desktop is not listening for external connections to the X server or your routing between the VM and the desktop does not work. Or start a X server in the VM and use DISPLAY=:0.0 again. This gives some hints to enable remote connections in X. https://lanforge.wordpress.com/2018/03/30/enabling-remote-x-connections/ Another nice option is "ssh -X" from the VM to the desktop. Regards, Ronald. From owner-freebsd-java@freebsd.org Wed Jul 1 11:33:24 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C891A34C58B for ; Wed, 1 Jul 2020 11:33:24 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xfHR65s5z4L4p for ; Wed, 1 Jul 2020 11:33:23 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-il1-x12f.google.com with SMTP id t18so781656ilh.2 for ; Wed, 01 Jul 2020 04:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yEPcw2g9YcA4LixcLoXyQkR/cyfPQe/zPt2zOZ5DN38=; b=Nx6x4zaLOu46peoo7gBrgKk1GvyWio4rVA1Qn+RtiKXkaIASuuv/cGIX942EuBzh8W DQrgmu0TJONaDqV7tD34613IAIPzV157DfR+q+u6inkiELSY8LiCfUL59Z3fJBQ0JGAo fxTXLMK+1Pyoyk1MHOncDDCIVqRwHx0Xxd5cJpr1NyX9hC5YfypaoTWKFzqFA5lPgEXg sD71YpdLHyF3bSFVhrY8ytR7Vau1lEL8DiDDJvUf0pEFPfn0iM3Th8lYj71HQVIepho9 XJ0shQz14pm+aJV22N6nEvdWAscD6Aou07nVbiXTCwGC+DT3szqV+m1bQak+C7C2Fo3f Hd/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yEPcw2g9YcA4LixcLoXyQkR/cyfPQe/zPt2zOZ5DN38=; b=LKW5RtrXnrkcwnZ0m3g3LyxlH0nU1NGxry9rtmHETQT+2FSi0ffZaW+UC1TZ51QJUW MVL4+wnilesSJ01PGT7qF7QpZdHlWv8epvBfZIQWC96HckqRthp1zGBSsGX9Jao1WKUN Z8av8gexSVj4ATkBZqPugMHqdzmaR9nyj8nPMDlW4QNhxb7vUPgJZUniNaLBsmHBLT8k BKnmPD7g8jJYZzF+RDx8gTvDvbUZSbmEgbxYru/ZnpoQ7RTCyERTDaB/Zj3ovSgiAkKe afQxmvE9liLFL+DtOOhF8nNzobvTH8Ikezrl4plVUCUwgZWqA9QKskEtaWg+J1kj/YKo GaXw== X-Gm-Message-State: AOAM532+W1yR4c8kYpzU4zWORTJhHqyBhZDn9bWDHg8RG8oHMm9yW/XU I3cF/gFs6PX2XEH0pofKUJ7IjkHGJMRDUwFcDNA= X-Google-Smtp-Source: ABdhPJwCEq9V4lAEdOK127ernNLgajIOkhTZRIxh/an4LfaAW4FQe38csTSlafWh82kVx/2E3PXoCSKfboYAi1Ti1zI= X-Received: by 2002:a92:d807:: with SMTP id y7mr7227995ilm.187.1593603202508; Wed, 01 Jul 2020 04:33:22 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> In-Reply-To: <310397709.40.1593597140363@localhost> From: Aryeh Friedman Date: Wed, 1 Jul 2020 07:33:11 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Ronald Klop Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> X-Rspamd-Queue-Id: 49xfHR65s5z4L4p X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Nx6x4zaL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::12f as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.65 / 15.00]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::12f:from]; NEURAL_HAM_SHORT(-0.69)[-0.685]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 11:33:24 -0000 On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop wrote: > *Van:* Aryeh Friedman > *Datum:* maandag, 29 juni 2020 20:59 > *Aan:* Michael Osipov <1983-01-06@gmx.net> > *CC:* freebsd-java@freebsd.org > *Onderwerp:* Re: Min. ports needed for headless AWT/Swing > > On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: > > > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > > > I have a java application that works fine with setenv DISPLAY :0.0 on > my > > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the > > > same app on a VM that has the minimum ports needed to install OpenJDK 8 > > and > > > Tomcat I get an exception saying that it can't connect to the X server > > even > > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). > > > Note it is the same user on both machines (NIS/NFS password DB/home > dirs) > > > doing the running on both machines but is a different user then the one > > > logged in at the console (I do all my development in a separate > account) > > > > Are you look for "-Djava.awt.headless=true"? > > > > Since this is a screen capture/recording program (which I am the developer) > I need to be able to capture the console (running X) that I am currently > on. So the question is what is the minimum set of ports/packages I need > to install on the VM to make it see and X server? It should be noted the > program has no GUI but does use java.awt.Robot#createScreenCapture (using > the full screen resolution as it's bounds) individual frames of the longer > video. > > Here is the specific exception I am attempting to fix: > On desktop (192.168.11.20) > % xhost + > > On VM (192.168.11.4): > % setenv DISPLAY 192.168.11.20:0.0 > % java > > -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* > -cp > > /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar > test.TestMain > > Result of the jvm invocation on the VM (not it works no problem su(do)'ing > to another account on the desktop if I do setenv DISPLAY :0.0): > > Caused by: java.awt.AWTError: Can't connect to X11 window server using > '192.168.11.20:0.0' as the value of the DISPLAY variable. > at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) > at > sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) > at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) > at java.security.AccessController.doPrivileged(Native Method) > at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:264) > at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) > at > > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) > at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) > > _______________________________________________ > > freebsd-java@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > ------------------------------ > > > Hi, > > Can you start any other X application on the VM using the DISPLAY setting? > Like /usr/ports/x11/xeyes. Than you know if it is something with X instead > of something with Java. I guess it is something with X. > I guess your desktop is not listening for external connections to the X > server or your routing between the VM and the desktop does not work. > Or start a X server in the VM and use DISPLAY=:0.0 again. > Don't have any X components installed except for the ones required by "make/make install" on openjdk8. The reason for this post in the first place was to figure out the minimum set of ports needed to get a working DISPLAY variable in the first place. -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 11:58:29 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6A9434C575 for ; Wed, 1 Jul 2020 11:58:29 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xfrN4v0mz4Lr5 for ; Wed, 1 Jul 2020 11:58:28 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 1 Jul 2020 13:58:24 +0200 (CEST) From: Ronald Klop To: Aryeh Friedman Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Message-ID: <745314036.25.1593604704120@localhost> In-Reply-To: References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> Subject: Re: Min. ports needed for headless AWT/Swing MIME-Version: 1.0 X-Mailer: Realworks (515.240.2fd5fa5a8e4) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49xfrN4v0mz4Lr5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.83 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-0.98)[-0.979]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.10)[-1.098]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 11:58:29 -0000 Van: Aryeh Friedman Datum: woensdag, 1 juli 2020 13:33 Aan: Ronald Klop CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Onderwerp: Re: Min. ports needed for headless AWT/Swing > > > > On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop wrote: >> >> Van: Aryeh Friedman >> Datum: maandag, 29 juni 2020 20:59 >> Aan: Michael Osipov <1983-01-06@gmx.net> >> CC: freebsd-java@freebsd.org >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>> >>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: >>> >>> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >>> > > I have a java application that works fine with setenv DISPLAY :0.0 on my >>> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the >>> > > same app on a VM that has the minimum ports needed to install OpenJDK 8 >>> > and >>> > > Tomcat I get an exception saying that it can't connect to the X server >>> > even >>> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). >>> > > Note it is the same user on both machines (NIS/NFS password DB/home dirs) >>> > > doing the running on both machines but is a different user then the one >>> > > logged in at the console (I do all my development in a separate account) >>> > >>> > Are you look for "-Djava.awt.headless=true"? >>> > >>> >>> Since this is a screen capture/recording program (which I am the developer) >>> I need to be able to capture the console (running X) that I am currently >>> on. So the question is what is the minimum set of ports/packages I need >>> to install on the VM to make it see and X server? It should be noted the >>> program has no GUI but does use java.awt.Robot#createScreenCapture (using >>> the full screen resolution as it's bounds) individual frames of the longer >>> video. >>> >>> Here is the specific exception I am attempting to fix: >>> On desktop (192.168.11.20) >>> % xhost + >>> >>> On VM (192.168.11.4): >>> % setenv DISPLAY 192.168.11.20:0.0 >>> % java >>> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >>> -cp >>> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >>> test.TestMain >>> >>> Result of the jvm invocation on the VM (not it works no problem su(do)'ing >>> to another account on the desktop if I do setenv DISPLAY :0.0): >>> >>> Caused by: java.awt.AWTError: Can't connect to X11 window server using >>> '192.168.11.20:0.0' as the value of the DISPLAY variable. >>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >>> at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >>> at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >>> at java.lang.Class.forName0(Native Method) >>> at java.lang.Class.forName(Class.java:264) >>> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >>> at >>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >>> >>> _______________________________________________ >>> > freebsd-java@freebsd.org mailing list >>> > https://lists.freebsd.org/mailman/listinfo/freebsd-java >>> > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >>> > >>> >>> >>> -- >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>> _______________________________________________ >>> freebsd-java@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >>> >>> >>> >> >> Hi, >> >> Can you start any other X application on the VM using the DISPLAY setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X instead of something with Java. I guess it is something with X. >> I guess your desktop is not listening for external connections to the X server or your routing between the VM and the desktop does not work. >> Or start a X server in the VM and use DISPLAY=:0.0 again. > > > Don't have any X components installed except for the ones required by "make/make install" on openjdk8. The reason for this post in the first place was to figure out the minimum set of ports needed to get a working DISPLAY variable in the first place. > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org I'm 99% sure you don't need any additional ports to get a working DISPLAY variable. It will probably help to start your X server with "-listen tcp". But I don't have enough information to be sure about that and how to configure that in your setup. Ronald. From owner-freebsd-java@freebsd.org Wed Jul 1 12:03:53 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E20334E334 for ; Wed, 1 Jul 2020 12:03:53 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xfyc2C5bz4N07 for ; Wed, 1 Jul 2020 12:03:52 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-il1-x136.google.com with SMTP id k6so20767703ili.6 for ; Wed, 01 Jul 2020 05:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YBJQxZOxoxDoUUiKyBsoh4zsqmVTWxyrKe596VW7KOo=; b=LeGpYF9D0Hnj78Nqis4bl4bi7vKJVxmGX6suMYbgq/vsWhQT7ofAm0OfDP0Abokq9u Y4uMfbav1a84KyqXOVzhwPzKPwEdfO5ET5Oqe1526hOMnp2gJyZ0y84RAw8vVNsN230W Rod0KYV4L8gv+knmkBMpioyxFC1i+DjQMWTZnR+RJOLJnJ8fkWZM4R4cxPQxfrL7p4QM rcDz9QMXI3AgbITVgLXv44oLFK7suHjRafO0z3U3elOygOQW0mz6yKBKtUZE9qjHE+uN MFNhcb1vJcOBLG8PbtHd2e8CG4MEaPdrgTISAZJPOqowhxAeIa9fdPLBo6S9mJBFBhKp w5QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YBJQxZOxoxDoUUiKyBsoh4zsqmVTWxyrKe596VW7KOo=; b=qrtDCTfhOURdBwqibQzOkj65rQSdSpktGqiiVwWVYvAhE14FWNGEvBpDS+EkEWETrQ jBEYQvt/nGpcIxF0TZEd+DfLDljLkGWD65XybxR4Lkv/fr4PniUBQfvz0mLHItwKtAGm lgY4mQuvqonHzAXw/sDu0OmtM4edgPfQTNDSbhNwRBYeZ91bvKhLwVt1lEAcH3jQxX7f jFfzagRZi6PXRP35kHNwM9jICudMJBr1nMAsfIK78w8d7vSEOGl+Iwn/01NMnXMvHprM 4b2vLFHkHAcZCVrMejLx5fyQaO3pA3XwYQb6a9r3rTBwoi/TmOpAs1nFIBhCHDp/cn82 3IZw== X-Gm-Message-State: AOAM533dxtK1noXKu0mDgNTTZe1TmV5YKFX6ziKpzgslL8YFkZuWWwUl RpaO1KlRy7t0GHc9WjaAW3grASR+XwStCKb2SDU3CGM/uog= X-Google-Smtp-Source: ABdhPJwWj306eZjmvB+3YDRwDpbL3fD9fStvqx5LvKvGBFhXQcOeqv2rddIOn9VvaYVUsTX0saRmftAnrqui6vCIwi8= X-Received: by 2002:a92:9f06:: with SMTP id u6mr7414052ili.29.1593605031128; Wed, 01 Jul 2020 05:03:51 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> In-Reply-To: <745314036.25.1593604704120@localhost> From: Aryeh Friedman Date: Wed, 1 Jul 2020 08:03:39 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Ronald Klop Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> X-Rspamd-Queue-Id: 49xfyc2C5bz4N07 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LeGpYF9D; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; RCVD_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::136:from]; NEURAL_HAM_SHORT(-0.53)[-0.528]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:03:53 -0000 On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop wrote: > > > *Van:* Aryeh Friedman > *Datum:* woensdag, 1 juli 2020 13:33 > *Aan:* Ronald Klop > *CC:* freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > *Onderwerp:* Re: Min. ports needed for headless AWT/Swing > > > > On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop wrote: > >> *Van:* Aryeh Friedman >> *Datum:* maandag, 29 juni 2020 20:59 >> *Aan:* Michael Osipov <1983-01-06@gmx.net> >> *CC:* freebsd-java@freebsd.org >> *Onderwerp:* Re: Min. ports needed for headless AWT/Swing >> >> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> >> wrote: >> >> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >> > > I have a java application that works fine with setenv DISPLAY :0.0 on >> my >> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run >> the >> > > same app on a VM that has the minimum ports needed to install OpenJDK >> 8 >> > and >> > > Tomcat I get an exception saying that it can't connect to the X server >> > even >> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). >> > > Note it is the same user on both machines (NIS/NFS password DB/home >> dirs) >> > > doing the running on both machines but is a different user then the >> one >> > > logged in at the console (I do all my development in a separate >> account) >> > >> > Are you look for "-Djava.awt.headless=true"? >> > >> >> Since this is a screen capture/recording program (which I am the >> developer) >> I need to be able to capture the console (running X) that I am currently >> on. So the question is what is the minimum set of ports/packages I need >> to install on the VM to make it see and X server? It should be noted the >> program has no GUI but does use java.awt.Robot#createScreenCapture (using >> the full screen resolution as it's bounds) individual frames of the longer >> video. >> >> Here is the specific exception I am attempting to fix: >> On desktop (192.168.11.20) >> % xhost + >> >> On VM (192.168.11.4): >> % setenv DISPLAY 192.168.11.20:0.0 >> % java >> >> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >> -cp >> >> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >> test.TestMain >> >> Result of the jvm invocation on the VM (not it works no problem su(do)'ing >> to another account on the desktop if I do setenv DISPLAY :0.0): >> >> Caused by: java.awt.AWTError: Can't connect to X11 window server using >> '192.168.11.20:0.0' as the value of the DISPLAY variable. >> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >> at >> sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >> at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:264) >> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >> at >> >> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >> >> _______________________________________________ >> > freebsd-java@freebsd.org mailing list >> > https://lists.freebsd.org/mailman/listinfo/freebsd-java >> > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> > >> >> >> -- >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> _______________________________________________ >> freebsd-java@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-java >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> ------------------------------ >> >> >> Hi, >> >> Can you start any other X application on the VM using the DISPLAY >> setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X >> instead of something with Java. I guess it is something with X. >> I guess your desktop is not listening for external connections to the X >> server or your routing between the VM and the desktop does not work. >> Or start a X server in the VM and use DISPLAY=:0.0 again. >> > > Don't have any X components installed except for the ones required by > "make/make install" on openjdk8. The reason for this post in the first > place was to figure out the minimum set of ports needed to get a working > DISPLAY variable in the first place. > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > > I'm 99% sure you don't need any additional ports to get a working DISPLAY > variable. > > It will probably help to start your X server with "-listen tcp". But I > don't have enough information to be sure about that and how to configure > that in your setup. > I think that might work if in fact there was an X server on the VM: root@dnixon:~ # X -listen-tcp X: Command not found. root@dnixon:~ # ls /usr/local/bin/X* ls: No match. root@dnixon:~ # ls /usr/local/bin/x* /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog /usr/local/bin/xslt-config /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr /usr/local/bin/xsltproc /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint /usr/local/bin/xsubpp /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf /usr/local/bin/xxd root@dnixon:~ # ls /usr/local/sbin/x* ls: No match. root@dnixon:~ # ls /usr/local/sbin/X* ls: No match. root@dnixon:~ # java -version openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 12:30:50 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B1B734EA30 for ; Wed, 1 Jul 2020 12:30:50 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xgYh71gJz4PNh for ; Wed, 1 Jul 2020 12:30:48 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 1 Jul 2020 14:30:45 +0200 (CEST) From: Ronald Klop To: Aryeh Friedman Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Message-ID: <1960743780.71.1593606645185@localhost> In-Reply-To: References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> Subject: Re: Min. ports needed for headless AWT/Swing MIME-Version: 1.0 X-Mailer: Realworks (515.240.2fd5fa5a8e4) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49xgYh71gJz4PNh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.84 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-0.98)[-0.979]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.10)[-1.098]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:30:50 -0000 Van: Aryeh Friedman Datum: woensdag, 1 juli 2020 14:03 Aan: Ronald Klop CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Onderwerp: Re: Min. ports needed for headless AWT/Swing > > > > On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop wrote: >> >> >> Van: Aryeh Friedman >> Datum: woensdag, 1 juli 2020 13:33 >> Aan: Ronald Klop >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>> >>> >>> >>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop wrote: >>>> >>>> Van: Aryeh Friedman >>>> Datum: maandag, 29 juni 2020 20:59 >>>> Aan: Michael Osipov <1983-01-06@gmx.net> >>>> CC: freebsd-java@freebsd.org >>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>>>> >>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: >>>>> >>>>> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >>>>> > > I have a java application that works fine with setenv DISPLAY :0.0 on my >>>>> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the >>>>> > > same app on a VM that has the minimum ports needed to install OpenJDK 8 >>>>> > and >>>>> > > Tomcat I get an exception saying that it can't connect to the X server >>>>> > even >>>>> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). >>>>> > > Note it is the same user on both machines (NIS/NFS password DB/home dirs) >>>>> > > doing the running on both machines but is a different user then the one >>>>> > > logged in at the console (I do all my development in a separate account) >>>>> > >>>>> > Are you look for "-Djava.awt.headless=true"? >>>>> > >>>>> >>>>> Since this is a screen capture/recording program (which I am the developer) >>>>> I need to be able to capture the console (running X) that I am currently >>>>> on. So the question is what is the minimum set of ports/packages I need >>>>> to install on the VM to make it see and X server? It should be noted the >>>>> program has no GUI but does use java.awt.Robot#createScreenCapture (using >>>>> the full screen resolution as it's bounds) individual frames of the longer >>>>> video. >>>>> >>>>> Here is the specific exception I am attempting to fix: >>>>> On desktop (192.168.11.20) >>>>> % xhost + >>>>> >>>>> On VM (192.168.11.4): >>>>> % setenv DISPLAY 192.168.11.20:0.0 >>>>> % java >>>>> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >>>>> -cp >>>>> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >>>>> test.TestMain >>>>> >>>>> Result of the jvm invocation on the VM (not it works no problem su(do)'ing >>>>> to another account on the desktop if I do setenv DISPLAY :0.0): >>>>> >>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server using >>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. >>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >>>>> at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >>>>> at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>> at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >>>>> at java.lang.Class.forName0(Native Method) >>>>> at java.lang.Class.forName(Class.java:264) >>>>> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >>>>> at >>>>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >>>>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >>>>> >>>>> _______________________________________________ >>>>> > freebsd-java@freebsd.org mailing list >>>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-java >>>>> > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >>>>> > >>>>> >>>>> >>>>> -- >>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>>>> _______________________________________________ >>>>> freebsd-java@freebsd.org mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >>>>> >>>>> >>>>> >>>> >>>> Hi, >>>> >>>> Can you start any other X application on the VM using the DISPLAY setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X instead of something with Java. I guess it is something with X. >>>> I guess your desktop is not listening for external connections to the X server or your routing between the VM and the desktop does not work. >>>> Or start a X server in the VM and use DISPLAY=:0.0 again. >>> >>> >>> Don't have any X components installed except for the ones required by "make/make install" on openjdk8. The reason for this post in the first place was to figure out the minimum set of ports needed to get a working DISPLAY variable in the first place. >>> >>> >>> -- >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> I'm 99% sure you don't need any additional ports to get a working DISPLAY variable. >> >> It will probably help to start your X server with "-listen tcp". But I don't have enough information to be sure about that and how to configure that in your setup. > > > I think that might work if in fact there was an X server on the VM: > > root@dnixon:~ # X -listen-tcp > X: Command not found. > root@dnixon:~ # ls /usr/local/bin/X* > ls: No match. > root@dnixon:~ # ls /usr/local/bin/x* > /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog /usr/local/bin/xslt-config > /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr /usr/local/bin/xsltproc > /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint /usr/local/bin/xsubpp > /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf /usr/local/bin/xxd > root@dnixon:~ # ls /usr/local/sbin/x* > ls: No match. > root@dnixon:~ # ls /usr/local/sbin/X* > ls: No match. > root@dnixon:~ # java -version > openjdk version "1.8.0_252" > OpenJDK Runtime Environment (build 1.8.0_252-b09) > OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0.0". That is the IP address of your desktop. So the X server must be running on your desktop. You want the VM to screencapture the screen of the desktop? Or do you want the VM to screencapture the screen of the VM? Regards, Ronald. From owner-freebsd-java@freebsd.org Wed Jul 1 12:36:30 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51CAB34EE36 for ; Wed, 1 Jul 2020 12:36:30 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xghF4NHsz4Pmp for ; Wed, 1 Jul 2020 12:36:29 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd36.google.com with SMTP id i4so24744953iov.11 for ; Wed, 01 Jul 2020 05:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6WvEs4fojg7BhRs1ygW20j2taV293K+zhKppnbb3soQ=; b=TZNT5uzdmwhliUr1tkbaY5MswOPyjS9bp2cIE3HD/TQSul0VCMyHfIjTb4dzcpa0fH eMw6QUNFuOjAmwmuc1JoXfoyUHf0J/apwpj3SyDhW4yfuFpfVj6w006xMxUvWGNmrD4e an0SB3ImmGAvIvdcTz0eJxNzL4OOXFxvX8869rcZ0EvEsbn3Vjt1mbNjHdBhsRQ4gb1P Fghb90d3ltta23M9l70tjHR1XQC9/pvJjbPIXh9WprNXh5fb6g5u2vjYEkAxyfG9SEPT FXEqIbO83J5Rd+s0Fn/Y6+iwmmT9Ev36vNlu4S+rc4A9ErOyYR7SRdMk2dJBfLHvhIyK V6Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6WvEs4fojg7BhRs1ygW20j2taV293K+zhKppnbb3soQ=; b=uLD5k5zvKr+Gg5VwyVkOpBV15SMfsvkr7AsLVblKHn/pzfLb/QN6ZUXZufFTRsdzD+ fGrpvgQIK9u+972rr4bCxekowEE5B6mIO9i5HW3yMvLbEvJ5YWWHphv2xXTs3DN1lsr8 CXJ4trcM3G6yQVtJvabDz3ru5cwo15bf6Wcd7SKHgiUiQWBQUhjXjfv2woC0N2jlx2Uj slXliFx1EDhSU+h6MkuTFppHiCI6Bewr3jW86f4uxIM3vSDneOdq7576+dayyt1ToDuX RkZ8FD7S0e8NTI16p/rOz/02EfpMfSHh9GzbQx2hU+mRi7TbhsSYjX70XI9DcyyAjL+v /EeA== X-Gm-Message-State: AOAM533kDw90V3Pbc3oX8BCcBGO4cVLdCkV3bfAVHatcuTh1ZjFBXeb/ LzKg8N9/UHOQUyVSntEoTjiFGMGGC3PHCMBDjQ9mnHOIa1w= X-Google-Smtp-Source: ABdhPJy5ZiEaBZlWlYErLq1jkPEt4aPXhx9F3gY2LA4I5t7I8r7DwOmrcjZ/io1zjofST0jOjm3pami2Oa0WFNS4PPM= X-Received: by 2002:a05:6638:2485:: with SMTP id x5mr28785693jat.138.1593606988498; Wed, 01 Jul 2020 05:36:28 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> <1960743780.71.1593606645185@localhost> In-Reply-To: <1960743780.71.1593606645185@localhost> From: Aryeh Friedman Date: Wed, 1 Jul 2020 08:36:17 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Ronald Klop Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> X-Rspamd-Queue-Id: 49xghF4NHsz4Pmp X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=TZNT5uzd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d36 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.969]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; RCVD_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d36:from]; NEURAL_HAM_SHORT(-0.53)[-0.531]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:36:30 -0000 On Wed, Jul 1, 2020 at 8:30 AM Ronald Klop wrote: > > Van: Aryeh Friedman > Datum: woensdag, 1 juli 2020 14:03 > Aan: Ronald Klop > CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > Onderwerp: Re: Min. ports needed for headless AWT/Swing > > > > > > > > On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop wrote: > >> > >> > >> Van: Aryeh Friedman > >> Datum: woensdag, 1 juli 2020 13:33 > >> Aan: Ronald Klop > >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > >> Onderwerp: Re: Min. ports needed for headless AWT/Swing > >>> > >>> > >>> > >>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop > wrote: > >>>> > >>>> Van: Aryeh Friedman > >>>> Datum: maandag, 29 juni 2020 20:59 > >>>> Aan: Michael Osipov <1983-01-06@gmx.net> > >>>> CC: freebsd-java@freebsd.org > >>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing > >>>>> > >>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> > wrote: > >>>>> > >>>>> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > >>>>> > > I have a java application that works fine with setenv DISPLAY > :0.0 on my > >>>>> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to > run the > >>>>> > > same app on a VM that has the minimum ports needed to install > OpenJDK 8 > >>>>> > and > >>>>> > > Tomcat I get an exception saying that it can't connect to the X > server > >>>>> > even > >>>>> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the > desktop). > >>>>> > > Note it is the same user on both machines (NIS/NFS password > DB/home dirs) > >>>>> > > doing the running on both machines but is a different user then > the one > >>>>> > > logged in at the console (I do all my development in a separate > account) > >>>>> > > >>>>> > Are you look for "-Djava.awt.headless=true"? > >>>>> > > >>>>> > >>>>> Since this is a screen capture/recording program (which I am the > developer) > >>>>> I need to be able to capture the console (running X) that I am > currently > >>>>> on. So the question is what is the minimum set of ports/packages I > need > >>>>> to install on the VM to make it see and X server? It should be > noted the > >>>>> program has no GUI but does use java.awt.Robot#createScreenCapture > (using > >>>>> the full screen resolution as it's bounds) individual frames of the > longer > >>>>> video. > >>>>> > >>>>> Here is the specific exception I am attempting to fix: > >>>>> On desktop (192.168.11.20) > >>>>> % xhost + > >>>>> > >>>>> On VM (192.168.11.4): > >>>>> % setenv DISPLAY 192.168.11.20:0.0 > >>>>> % java > >>>>> > -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* > >>>>> -cp > >>>>> > /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar > >>>>> test.TestMain > >>>>> > >>>>> Result of the jvm invocation on the VM (not it works no problem > su(do)'ing > >>>>> to another account on the desktop if I do setenv DISPLAY :0.0): > >>>>> > >>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server > using > >>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. > >>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) > >>>>> at > sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) > >>>>> at > sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) > >>>>> at java.security.AccessController.doPrivileged(Native Method) > >>>>> at > sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) > >>>>> at java.lang.Class.forName0(Native Method) > >>>>> at java.lang.Class.forName(Class.java:264) > >>>>> at > java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) > >>>>> at > >>>>> > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) > >>>>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) > >>>>> > >>>>> _______________________________________________ > >>>>> > freebsd-java@freebsd.org mailing list > >>>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>>> > To unsubscribe, send any mail to " > freebsd-java-unsubscribe@freebsd.org" > >>>>> > > >>>>> > >>>>> > >>>>> -- > >>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >>>>> _______________________________________________ > >>>>> freebsd-java@freebsd.org mailing list > >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>>> To unsubscribe, send any mail to " > freebsd-java-unsubscribe@freebsd.org" > >>>>> > >>>>> > >>>>> > >>>> > >>>> Hi, > >>>> > >>>> Can you start any other X application on the VM using the DISPLAY > setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X > instead of something with Java. I guess it is something with X. > >>>> I guess your desktop is not listening for external connections to the > X server or your routing between the VM and the desktop does not work. > >>>> Or start a X server in the VM and use DISPLAY=:0.0 again. > >>> > >>> > >>> Don't have any X components installed except for the ones required by > "make/make install" on openjdk8. The reason for this post in the first > place was to figure out the minimum set of ports needed to get a working > DISPLAY variable in the first place. > >>> > >>> > >>> -- > >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >> > >> I'm 99% sure you don't need any additional ports to get a working > DISPLAY variable. > >> > >> It will probably help to start your X server with "-listen tcp". But I > don't have enough information to be sure about that and how to configure > that in your setup. > > > > > > I think that might work if in fact there was an X server on the VM: > > > > root@dnixon:~ # X -listen-tcp > > X: Command not found. > > root@dnixon:~ # ls /usr/local/bin/X* > > ls: No match. > > root@dnixon:~ # ls /usr/local/bin/x* > > /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog > /usr/local/bin/xslt-config > > /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr > /usr/local/bin/xsltproc > > /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint > /usr/local/bin/xsubpp > > /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf > /usr/local/bin/xxd > > root@dnixon:~ # ls /usr/local/sbin/x* > > ls: No match. > > root@dnixon:~ # ls /usr/local/sbin/X* > > ls: No match. > > root@dnixon:~ # java -version > > openjdk version "1.8.0_252" > > OpenJDK Runtime Environment (build 1.8.0_252-b09) > > OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) > > > > > > -- > > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0.0". > That is the IP address of your desktop. So the X server must be running on > your desktop. > > You want the VM to screencapture the screen of the desktop? Or do you want > the VM to screencapture the screen of the VM? > On the desktop... finally got it to capture the screeen on the desktop via what I tried above but now have a second problem with is the audio capture is there anyway to make the following Java snippet work with a remote mic (works fine on the desktop with a local mic on dsp2.0)? fmt=new AudioFormat(160000,8,2,true,true); mic=AudioSystem.getTargetDataLine(fmt); mic.open(fmt); mic.start(); -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 12:43:57 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9418634EE76; Wed, 1 Jul 2020 12:43:57 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xgrr6TkJz4Q5j; Wed, 1 Jul 2020 12:43:56 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd42.google.com with SMTP id v6so11119520iob.4; Wed, 01 Jul 2020 05:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=zerTkYEg1AGtpUDJiaZjDg52gXYFdAKDTn4lkBgBylk=; b=cKUo3wpy9pLazVfzMnzURmnH3dqacnGsyzy69onXPys6mxHwoAL6q3g3NQldhvvAxr FLwW0j9WuQS62ldnCDc5OiBF5dpmRahEPJ4MCwQLdGzZXAwgt5ADpkLCms8oskxDziYT Apq/gAO+YshRuCxjQaVnYpgJE7dDQ9IOPeHZoxJlLPD6SSslyEIAA+Exoz96/k8c57yy f1bYJYgqRfL2Z/Kq/gGRdSUx/bCirT+vRUnwt55Pr8p6AXIXRQMTkATwbKzKYPN5DsaZ ST9X1Lq7qC8MAFGko4AW1fIOcVSzeOPKE29DigO//DUHuIsi4RdwroWx7SgZl1iIN92L mgJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zerTkYEg1AGtpUDJiaZjDg52gXYFdAKDTn4lkBgBylk=; b=l7M7o1anE4OiUUZga+tuXlD61MlyznBnwC8WLMIKaZ4Mq1cWFBcai5CGVTSFukWE0X iX2urN5H8kCFYEg6Mb504R2L+yeUNYTR3dpTZjdoJah9Io0WDlbEtBeQuoSvTFJdWVSl qB0HLaGPGSf38C6thfAUpl9SUvNt3RRc2ZbNkTDa1NDZHgd59NJGjENqdal1+LXxP0iu N1Qhj1ewE/Mxc0/Ue8h6C+r1xQilNcTy9ucI2oiP6ll9yfazRC7mLbCT7jFF0o3ZY1ar H9AaTVlvEtIKWlbdi/GrQ/hLlY1qiF1wC4XJ1CJTqZVICt/p2pudxSZLyheMW74zU5Re QbeA== X-Gm-Message-State: AOAM531w/RWHd0RYLzsqYe96FIqxt/rF/4+j+QerGztgz6W8yEKGxRnz vIyyKwf0LtRYYI7qJITon5xsnZmAbEXHx2FBUP6xs8uO X-Google-Smtp-Source: ABdhPJzQMW7azvTUzvQlyA6XLlUysbY96L70/JactZl7eC5/gJzclmaUx7uDvZqZdpXAmoytGnMybfqY+0nWozACYEc= X-Received: by 2002:a05:6602:234d:: with SMTP id r13mr2009341iot.83.1593607435893; Wed, 01 Jul 2020 05:43:55 -0700 (PDT) MIME-Version: 1.0 From: Aryeh Friedman Date: Wed, 1 Jul 2020 08:43:45 -0400 Message-ID: Subject: Allowing remote java app to access local sound system To: FreeBSD Mailing List , freebsd-java@freebsd.org X-Rspamd-Queue-Id: 49xgrr6TkJz4Q5j X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=cKUo3wpy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d42 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-2.75 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.961]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.992]; NEURAL_SPAM_SHORT(0.21)[0.207]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d42:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:43:57 -0000 I have a (java) app that works fine on a remote host and displays it's GUI by setting the DISPLAY environment variable. The app also requires a working microphone (and other audio output devices). Is there any way to make it use the microphone/audio output on my local machine? Note I suspect I would need to do this transparently to Java. I am pretty sure Java has no idea how to do this on its own. -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 12:54:19 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8116034F45D for ; Wed, 1 Jul 2020 12:54:19 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xh4p12XMz4QgW for ; Wed, 1 Jul 2020 12:54:17 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 1 Jul 2020 14:54:14 +0200 (CEST) From: Ronald Klop To: Aryeh Friedman Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Message-ID: <1075431299.4.1593608054346@localhost> In-Reply-To: References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> <1960743780.71.1593606645185@localhost> Subject: Re: Min. ports needed for headless AWT/Swing MIME-Version: 1.0 X-Mailer: Realworks (515.242.8cc03ac0514) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49xh4p12XMz4QgW X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.84 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-0.98)[-0.979]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.10)[-1.101]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:54:19 -0000 Van: Aryeh Friedman Datum: woensdag, 1 juli 2020 14:36 Aan: Ronald Klop CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> Onderwerp: Re: Min. ports needed for headless AWT/Swing > > > > On Wed, Jul 1, 2020 at 8:30 AM Ronald Klop wrote: >> >> Van: Aryeh Friedman >> Datum: woensdag, 1 juli 2020 14:03 >> Aan: Ronald Klop >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> > >> > >> > >> > On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop wrote: >> >> >> >> >> >> Van: Aryeh Friedman >> >> Datum: woensdag, 1 juli 2020 13:33 >> >> Aan: Ronald Klop >> >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> >>> >> >>> >> >>> >> >>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop wrote: >> >>>> >> >>>> Van: Aryeh Friedman >> >>>> Datum: maandag, 29 juni 2020 20:59 >> >>>> Aan: Michael Osipov <1983-01-06@gmx.net> >> >>>> CC: freebsd-java@freebsd.org >> >>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> >>>>> >> >>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> wrote: >> >>>>> >> >>>>> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >> >>>>> > > I have a java application that works fine with setenv DISPLAY :0.0 on my >> >>>>> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to run the >> >>>>> > > same app on a VM that has the minimum ports needed to install OpenJDK 8 >> >>>>> > and >> >>>>> > > Tomcat I get an exception saying that it can't connect to the X server >> >>>>> > even >> >>>>> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the desktop). >> >>>>> > > Note it is the same user on both machines (NIS/NFS password DB/home dirs) >> >>>>> > > doing the running on both machines but is a different user then the one >> >>>>> > > logged in at the console (I do all my development in a separate account) >> >>>>> > >> >>>>> > Are you look for "-Djava.awt.headless=true"? >> >>>>> > >> >>>>> >> >>>>> Since this is a screen capture/recording program (which I am the developer) >> >>>>> I need to be able to capture the console (running X) that I am currently >> >>>>> on. So the question is what is the minimum set of ports/packages I need >> >>>>> to install on the VM to make it see and X server? It should be noted the >> >>>>> program has no GUI but does use java.awt.Robot#createScreenCapture (using >> >>>>> the full screen resolution as it's bounds) individual frames of the longer >> >>>>> video. >> >>>>> >> >>>>> Here is the specific exception I am attempting to fix: >> >>>>> On desktop (192.168.11.20) >> >>>>> % xhost + >> >>>>> >> >>>>> On VM (192.168.11.4): >> >>>>> % setenv DISPLAY 192.168.11.20:0.0 >> >>>>> % java >> >>>>> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >> >>>>> -cp >> >>>>> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >> >>>>> test.TestMain >> >>>>> >> >>>>> Result of the jvm invocation on the VM (not it works no problem su(do)'ing >> >>>>> to another account on the desktop if I do setenv DISPLAY :0.0): >> >>>>> >> >>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server using >> >>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. >> >>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >> >>>>> at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >> >>>>> at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >> >>>>> at java.security.AccessController.doPrivileged(Native Method) >> >>>>> at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >> >>>>> at java.lang.Class.forName0(Native Method) >> >>>>> at java.lang.Class.forName(Class.java:264) >> >>>>> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >> >>>>> at >> >>>>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >> >>>>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >> >>>>> >> >>>>> _______________________________________________ >> >>>>> > freebsd-java@freebsd.org mailing list >> >>>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-java >> >>>>> > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> >>>>> > >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >>>>> _______________________________________________ >> >>>>> freebsd-java@freebsd.org mailing list >> >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >> >>>>> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> >>>>> >> >>>>> >> >>>>> >> >>>> >> >>>> Hi, >> >>>> >> >>>> Can you start any other X application on the VM using the DISPLAY setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X instead of something with Java. I guess it is something with X. >> >>>> I guess your desktop is not listening for external connections to the X server or your routing between the VM and the desktop does not work. >> >>>> Or start a X server in the VM and use DISPLAY=:0.0 again. >> >>> >> >>> >> >>> Don't have any X components installed except for the ones required by "make/make install" on openjdk8. The reason for this post in the first place was to figure out the minimum set of ports needed to get a working DISPLAY variable in the first place. >> >>> >> >>> >> >>> -- >> >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> >> >> I'm 99% sure you don't need any additional ports to get a working DISPLAY variable. >> >> >> >> It will probably help to start your X server with "-listen tcp". But I don't have enough information to be sure about that and how to configure that in your setup. >> > >> > >> > I think that might work if in fact there was an X server on the VM: >> > >> > root@dnixon:~ # X -listen-tcp >> > X: Command not found. >> > root@dnixon:~ # ls /usr/local/bin/X* >> > ls: No match. >> > root@dnixon:~ # ls /usr/local/bin/x* >> > /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog /usr/local/bin/xslt-config >> > /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr /usr/local/bin/xsltproc >> > /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint /usr/local/bin/xsubpp >> > /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf /usr/local/bin/xxd >> > root@dnixon:~ # ls /usr/local/sbin/x* >> > ls: No match. >> > root@dnixon:~ # ls /usr/local/sbin/X* >> > ls: No match. >> > root@dnixon:~ # java -version >> > openjdk version "1.8.0_252" >> > OpenJDK Runtime Environment (build 1.8.0_252-b09) >> > OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) >> > >> > >> > -- >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0.0". That is the IP address of your desktop. So the X server must be running on your desktop. >> >> You want the VM to screencapture the screen of the desktop? Or do you want the VM to screencapture the screen of the VM?> > > On the desktop... finally got it to capture the screeen on the desktop via what I tried above but now have a second problem with is the audio capture is there anyway to make the following Java snippet work with a remote mic (works fine on the desktop with a local mic on dsp2.0)? > > fmt=new AudioFormat(160000,8,2,true,true); > mic=AudioSystem.getTargetDataLine(fmt); > mic.open(fmt); > mic.start(); > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org Good that it is solved. Would you mind sharing what the solution was? From owner-freebsd-java@freebsd.org Wed Jul 1 12:56:20 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C091D34F375; Wed, 1 Jul 2020 12:56:20 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xh782dmMz4Qh4; Wed, 1 Jul 2020 12:56:20 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Wed, 1 Jul 2020 14:56:17 +0200 (CEST) From: Ronald Klop To: Aryeh Friedman Cc: FreeBSD Mailing List , freebsd-java@freebsd.org Message-ID: <2139766963.7.1593608177098@localhost> In-Reply-To: References: Subject: Re: Allowing remote java app to access local sound system MIME-Version: 1.0 X-Mailer: Realworks (515.242.8cc03ac0514) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 49xh782dmMz4Qh4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.80 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.946]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24:c]; NEURAL_HAM_LONG(-0.97)[-0.971]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[klop.ws]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.09)[-1.086]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MID_RHS_NOT_FQDN(0.50)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:56:20 -0000 Van: Aryeh Friedman Datum: woensdag, 1 juli 2020 14:43 Aan: FreeBSD Mailing List , freebsd-java@freebsd.org Onderwerp: Allowing remote java app to access local sound system > > I have a (java) app that works fine on a remote host and displays it's GUI > by setting the DISPLAY environment variable. The app also requires a > working microphone (and other audio output devices). Is there any way to > make it use the microphone/audio output on my local machine? Note I > suspect I would need to do this transparently to Java. I am pretty sure > Java has no idea how to do this on its own. > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > Maybe something like https://www.freshports.org/audio/nas might help. Regards, Ronald. From owner-freebsd-java@freebsd.org Wed Jul 1 12:57:00 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38C2B34F814 for ; Wed, 1 Jul 2020 12:57:00 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xh7v41grz4Qvw for ; Wed, 1 Jul 2020 12:56:59 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-il1-x130.google.com with SMTP id x9so20960895ila.3 for ; Wed, 01 Jul 2020 05:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M1T9QWx5BlNYpzwxpIYxEveFiRhIB2gkRPXz9G+g27E=; b=twa8TqqYplepClfO13zSI1p7z8jfAiPe/Llm5Eeq/ArA9EPc143aG9HZ2bSWCFmfs4 ho217NI3lLGD0IYNUlrXnHhZxHUl/uCIQFx/NxPHTD55Vj/EE+7B76tgiTokdxJZ7hXE 7h1M/53Qhz/1T4WS6G8yv5+KoMDDbOYs4u6tfNC3jAeD4cqfKkNlUtAnLjxnpt6kDRtS w7EwcO3J/PnuQY8rGunmIdjtc4016DuKhaMnr0uUjYLyefR2m1xKjd77JD0adtAADEKx TB2nPaTn5xD4IoWvRvWopYfQXusgJgFebLK19onxtzFCS1zFwI+iyOimVvxi7aop/5xt czHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M1T9QWx5BlNYpzwxpIYxEveFiRhIB2gkRPXz9G+g27E=; b=HBfbrNosLIpVGt/Af8W7AZz021bGp4dKc0p42zESIeTxv3g6Bkg8H2FOHt3S0a5fUW gkCPVD8AUwpExh86t2g+0KAsKZk11/mcP4TRLRh/G6tTdhTA5m6y9KmTQ9wIuBtXlxt9 pt6EY14lPOlwomd0txodRj/bPDYOazWpdtDko5MX8x1TDIgxZ/ZqOki1E5DHklrJmEfE BFgofVQOzy6PXHX5pg07lagiqpwgxJ8/rsx2u159jqTw3bJQZMsOkvxnswYjzwI9E+L8 ovI8RU8AKuZOikNPuRwzBcjbKQgvErchYD02u73E2CAblv0xeZvAJ/26glLaLZC97u21 zOrg== X-Gm-Message-State: AOAM532YKLM73Mm564bwaZj/BwrfEbJA/Nw36GuDo8GI100ey+nZaWkn mhapL5Mvlk6HpOPBZ1cuYWFgRGLmwclefAzeSYFDE4YF X-Google-Smtp-Source: ABdhPJyQHmfIvgUqnln7c5Jvp+HzqBrmjZy4Ba1Su0+qazThVr2yrl/bIS9QIijIPovsS7r3p1ufu9kdMdA88bOT33c= X-Received: by 2002:a92:4913:: with SMTP id w19mr7116306ila.185.1593608218475; Wed, 01 Jul 2020 05:56:58 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> <1960743780.71.1593606645185@localhost> <1075431299.4.1593608054346@localhost> In-Reply-To: <1075431299.4.1593608054346@localhost> From: Aryeh Friedman Date: Wed, 1 Jul 2020 08:56:47 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Ronald Klop Cc: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> X-Rspamd-Queue-Id: 49xh7v41grz4Qvw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=twa8TqqY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-java@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; RCVD_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::130:from]; NEURAL_HAM_SHORT(-0.53)[-0.531]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmx.net] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:57:00 -0000 On Wed, Jul 1, 2020 at 8:54 AM Ronald Klop wrote: > > > *Van:* Aryeh Friedman > *Datum:* woensdag, 1 juli 2020 14:36 > *Aan:* Ronald Klop > *CC:* freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > *Onderwerp:* Re: Min. ports needed for headless AWT/Swing > > > > On Wed, Jul 1, 2020 at 8:30 AM Ronald Klop wrote: > >> >> Van: Aryeh Friedman >> Datum: woensdag, 1 juli 2020 14:03 >> Aan: Ronald Klop >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> > >> > >> > >> > On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop >> wrote: >> >> >> >> >> >> Van: Aryeh Friedman >> >> Datum: woensdag, 1 juli 2020 13:33 >> >> Aan: Ronald Klop >> >> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> >> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> >>> >> >>> >> >>> >> >>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop >> wrote: >> >>>> >> >>>> Van: Aryeh Friedman >> >>>> Datum: maandag, 29 juni 2020 20:59 >> >>>> Aan: Michael Osipov <1983-01-06@gmx.net> >> >>>> CC: freebsd-java@freebsd.org >> >>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >> >>>>> >> >>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> >> wrote: >> >>>>> >> >>>>> > Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >> >>>>> > > I have a java application that works fine with setenv DISPLAY >> :0.0 on my >> >>>>> > > desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to >> run the >> >>>>> > > same app on a VM that has the minimum ports needed to install >> OpenJDK 8 >> >>>>> > and >> >>>>> > > Tomcat I get an exception saying that it can't connect to the X >> server >> >>>>> > even >> >>>>> > > though I did setenv DISPLAY desktop:0.0 (and xhost + on the >> desktop). >> >>>>> > > Note it is the same user on both machines (NIS/NFS password >> DB/home dirs) >> >>>>> > > doing the running on both machines but is a different user then >> the one >> >>>>> > > logged in at the console (I do all my development in a separate >> account) >> >>>>> > >> >>>>> > Are you look for "-Djava.awt.headless=true"? >> >>>>> > >> >>>>> >> >>>>> Since this is a screen capture/recording program (which I am the >> developer) >> >>>>> I need to be able to capture the console (running X) that I am >> currently >> >>>>> on. So the question is what is the minimum set of ports/packages >> I need >> >>>>> to install on the VM to make it see and X server? It should be >> noted the >> >>>>> program has no GUI but does use java.awt.Robot#createScreenCapture >> (using >> >>>>> the full screen resolution as it's bounds) individual frames of the >> longer >> >>>>> video. >> >>>>> >> >>>>> Here is the specific exception I am attempting to fix: >> >>>>> On desktop (192.168.11.20) >> >>>>> % xhost + >> >>>>> >> >>>>> On VM (192.168.11.4): >> >>>>> % setenv DISPLAY 192.168.11.20:0.0 >> >>>>> % java >> >>>>> >> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >> >>>>> -cp >> >>>>> >> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >> >>>>> test.TestMain >> >>>>> >> >>>>> Result of the jvm invocation on the VM (not it works no problem >> su(do)'ing >> >>>>> to another account on the desktop if I do setenv DISPLAY :0.0): >> >>>>> >> >>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server >> using >> >>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. >> >>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >> >>>>> at >> sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >> >>>>> at >> sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >> >>>>> at java.security.AccessController.doPrivileged(Native Method) >> >>>>> at >> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >> >>>>> at java.lang.Class.forName0(Native Method) >> >>>>> at java.lang.Class.forName(Class.java:264) >> >>>>> at >> java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >> >>>>> at >> >>>>> >> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >> >>>>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >> >>>>> >> >>>>> _______________________________________________ >> >>>>> > freebsd-java@freebsd.org mailing list >> >>>>> > https://lists.freebsd.org/mailman/listinfo/freebsd-java >> >>>>> > To unsubscribe, send any mail to " >> freebsd-java-unsubscribe@freebsd.org" >> >>>>> > >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >>>>> _______________________________________________ >> >>>>> freebsd-java@freebsd.org mailing list >> >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >> >>>>> To unsubscribe, send any mail to " >> freebsd-java-unsubscribe@freebsd.org" >> >>>>> >> >>>>> >> >>>>> >> >>>> >> >>>> Hi, >> >>>> >> >>>> Can you start any other X application on the VM using the DISPLAY >> setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X >> instead of something with Java. I guess it is something with X. >> >>>> I guess your desktop is not listening for external connections to >> the X server or your routing between the VM and the desktop does not work. >> >>>> Or start a X server in the VM and use DISPLAY=:0.0 again. >> >>> >> >>> >> >>> Don't have any X components installed except for the ones required by >> "make/make install" on openjdk8. The reason for this post in the first >> place was to figure out the minimum set of ports needed to get a working >> DISPLAY variable in the first place. >> >>> >> >>> >> >>> -- >> >>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> >> >> I'm 99% sure you don't need any additional ports to get a working >> DISPLAY variable. >> >> >> >> It will probably help to start your X server with "-listen tcp". But I >> don't have enough information to be sure about that and how to configure >> that in your setup. >> > >> > >> > I think that might work if in fact there was an X server on the VM: >> > >> > root@dnixon:~ # X -listen-tcp >> > X: Command not found. >> > root@dnixon:~ # ls /usr/local/bin/X* >> > ls: No match. >> > root@dnixon:~ # ls /usr/local/bin/x* >> > /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog >> /usr/local/bin/xslt-config >> > /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr >> /usr/local/bin/xsltproc >> > /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint >> /usr/local/bin/xsubpp >> > /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf >> /usr/local/bin/xxd >> > root@dnixon:~ # ls /usr/local/sbin/x* >> > ls: No match. >> > root@dnixon:~ # ls /usr/local/sbin/X* >> > ls: No match. >> > root@dnixon:~ # java -version >> > openjdk version "1.8.0_252" >> > OpenJDK Runtime Environment (build 1.8.0_252-b09) >> > OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) >> > >> > >> > -- >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0.0". >> That is the IP address of your desktop. So the X server must be running on >> your desktop. >> >> You want the VM to screencapture the screen of the desktop? Or do you >> want the VM to screencapture the screen of the VM? > > > On the desktop... finally got it to capture the screeen on the desktop via > what I tried above but now have a second problem with is the audio capture > is there anyway to make the following Java snippet work with a remote mic > (works fine on the desktop with a local mic on dsp2.0)? > > fmt=new AudioFormat(160000,8,2,true,true); > mic=AudioSystem.getTargetDataLine(fmt); > mic.open(fmt); > mic.start(); > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > > Good that it is solved. Would you mind sharing what the solution was? > Adding -- -listen tcp to my call to startx on the desktop (I was confused about which machine was the server and which was the client since the relationship is reverse of the normal order.... i.e. the server is the local machine and the client is the remote one not the other way around for X) -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Wed Jul 1 14:03:43 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5EAA35322E for ; Wed, 1 Jul 2020 14:03:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xjcv5Jf7z4XCg for ; Wed, 1 Jul 2020 14:03:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3A3BB2C669 for ; Wed, 1 Jul 2020 14:03:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from PD0786.local (130.31-255-62.static.virginmediabusiness.co.uk [62.255.31.130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 99F596DF2 for ; Wed, 1 Jul 2020 14:03:39 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/99F596DF2; dkim=none; dkim-atps=neutral Subject: Re: Min. ports needed for headless AWT/Swing To: freebsd-java@freebsd.org References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> <1960743780.71.1593606645185@localhost> <1075431299.4.1593608054346@localhost> From: matthew@FreeBSD.org Message-ID: Date: Wed, 1 Jul 2020 15:03:37 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 14:03:43 -0000 On 01/07/2020 13:56, Aryeh Friedman wrote: > On Wed, Jul 1, 2020 at 8:54 AM Ronald Klop wrote: > >> >> >> *Van:* Aryeh Friedman >> *Datum:* woensdag, 1 juli 2020 14:36 >> *Aan:* Ronald Klop >> *CC:* freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >> *Onderwerp:* Re: Min. ports needed for headless AWT/Swing >> >> >> >> On Wed, Jul 1, 2020 at 8:30 AM Ronald Klop wrote: >> >>> >>> Van: Aryeh Friedman >>> Datum: woensdag, 1 juli 2020 14:03 >>> Aan: Ronald Klop >>> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>>> >>>> >>>> >>>> On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop >>> wrote: >>>>> >>>>> >>>>> Van: Aryeh Friedman >>>>> Datum: woensdag, 1 juli 2020 13:33 >>>>> Aan: Ronald Klop >>>>> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> >>>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop >>> wrote: >>>>>>> >>>>>>> Van: Aryeh Friedman >>>>>>> Datum: maandag, 29 juni 2020 20:59 >>>>>>> Aan: Michael Osipov <1983-01-06@gmx.net> >>>>>>> CC: freebsd-java@freebsd.org >>>>>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing >>>>>>>> >>>>>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov <1983-01-06@gmx.net> >>> wrote: >>>>>>>> >>>>>>>>> Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: >>>>>>>>>> I have a java application that works fine with setenv DISPLAY >>> :0.0 on my >>>>>>>>>> desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to >>> run the >>>>>>>>>> same app on a VM that has the minimum ports needed to install >>> OpenJDK 8 >>>>>>>>> and >>>>>>>>>> Tomcat I get an exception saying that it can't connect to the X >>> server >>>>>>>>> even >>>>>>>>>> though I did setenv DISPLAY desktop:0.0 (and xhost + on the >>> desktop). >>>>>>>>>> Note it is the same user on both machines (NIS/NFS password >>> DB/home dirs) >>>>>>>>>> doing the running on both machines but is a different user then >>> the one >>>>>>>>>> logged in at the console (I do all my development in a separate >>> account) >>>>>>>>> >>>>>>>>> Are you look for "-Djava.awt.headless=true"? >>>>>>>>> >>>>>>>> >>>>>>>> Since this is a screen capture/recording program (which I am the >>> developer) >>>>>>>> I need to be able to capture the console (running X) that I am >>> currently >>>>>>>> on. So the question is what is the minimum set of ports/packages >>> I need >>>>>>>> to install on the VM to make it see and X server? It should be >>> noted the >>>>>>>> program has no GUI but does use java.awt.Robot#createScreenCapture >>> (using >>>>>>>> the full screen resolution as it's bounds) individual frames of the >>> longer >>>>>>>> video. >>>>>>>> >>>>>>>> Here is the specific exception I am attempting to fix: >>>>>>>> On desktop (192.168.11.20) >>>>>>>> % xhost + >>>>>>>> >>>>>>>> On VM (192.168.11.4): >>>>>>>> % setenv DISPLAY 192.168.11.20:0.0 >>>>>>>> % java >>>>>>>> >>> -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* >>>>>>>> -cp >>>>>>>> >>> /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar >>>>>>>> test.TestMain >>>>>>>> >>>>>>>> Result of the jvm invocation on the VM (not it works no problem >>> su(do)'ing >>>>>>>> to another account on the desktop if I do setenv DISPLAY :0.0): >>>>>>>> >>>>>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server >>> using >>>>>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. >>>>>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) >>>>>>>> at >>> sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) >>>>>>>> at >>> sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) >>>>>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>>>>> at >>> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) >>>>>>>> at java.lang.Class.forName0(Native Method) >>>>>>>> at java.lang.Class.forName(Class.java:264) >>>>>>>> at >>> java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) >>>>>>>> at >>>>>>>> >>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) >>>>>>>> at test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>>> freebsd-java@freebsd.org mailing list >>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >>>>>>>>> To unsubscribe, send any mail to " >>> freebsd-java-unsubscribe@freebsd.org" >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>>>>>>> _______________________________________________ >>>>>>>> freebsd-java@freebsd.org mailing list >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java >>>>>>>> To unsubscribe, send any mail to " >>> freebsd-java-unsubscribe@freebsd.org" >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Can you start any other X application on the VM using the DISPLAY >>> setting? Like /usr/ports/x11/xeyes. Than you know if it is something with X >>> instead of something with Java. I guess it is something with X. >>>>>>> I guess your desktop is not listening for external connections to >>> the X server or your routing between the VM and the desktop does not work. >>>>>>> Or start a X server in the VM and use DISPLAY=:0.0 again. >>>>>> >>>>>> >>>>>> Don't have any X components installed except for the ones required by >>> "make/make install" on openjdk8. The reason for this post in the first >>> place was to figure out the minimum set of ports needed to get a working >>> DISPLAY variable in the first place. >>>>>> >>>>>> >>>>>> -- >>>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>>>> >>>>> I'm 99% sure you don't need any additional ports to get a working >>> DISPLAY variable. >>>>> >>>>> It will probably help to start your X server with "-listen tcp". But I >>> don't have enough information to be sure about that and how to configure >>> that in your setup. >>>> >>>> >>>> I think that might work if in fact there was an X server on the VM: >>>> >>>> root@dnixon:~ # X -listen-tcp >>>> X: Command not found. >>>> root@dnixon:~ # ls /usr/local/bin/X* >>>> ls: No match. >>>> root@dnixon:~ # ls /usr/local/bin/x* >>>> /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog >>> /usr/local/bin/xslt-config >>>> /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr >>> /usr/local/bin/xsltproc >>>> /usr/local/bin/xft-config /usr/local/bin/xkbcomp /usr/local/bin/xmllint >>> /usr/local/bin/xsubpp >>>> /usr/local/bin/xgettext /usr/local/bin/xml2-config /usr/local/bin/xmlwf >>> /usr/local/bin/xxd >>>> root@dnixon:~ # ls /usr/local/sbin/x* >>>> ls: No match. >>>> root@dnixon:~ # ls /usr/local/sbin/X* >>>> ls: No match. >>>> root@dnixon:~ # java -version >>>> openjdk version "1.8.0_252" >>>> OpenJDK Runtime Environment (build 1.8.0_252-b09) >>>> OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) >>>> >>>> >>>> -- >>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >>> >>> In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0.0". >>> That is the IP address of your desktop. So the X server must be running on >>> your desktop. >>> >>> You want the VM to screencapture the screen of the desktop? Or do you >>> want the VM to screencapture the screen of the VM? >> >> >> On the desktop... finally got it to capture the screeen on the desktop via >> what I tried above but now have a second problem with is the audio capture >> is there anyway to make the following Java snippet work with a remote mic >> (works fine on the desktop with a local mic on dsp2.0)? >> >> fmt=new AudioFormat(160000,8,2,true,true); >> mic=AudioSystem.getTargetDataLine(fmt); >> mic.open(fmt); >> mic.start(); >> -- >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> >> Good that it is solved. Would you mind sharing what the solution was? >> > > Adding -- -listen tcp to my call to startx on the desktop (I was confused > about which machine was the server and which was the client since the > relationship is reverse of the normal order.... i.e. the server is the > local machine and the client is the remote one not the other way around for > X) > > Be aware that running remote X applications against a local X server will transmit all of the X related traffic across the network in the clear -- which is roughly as bad as running old-style rsh(1). That may or may not be a problem for your use case, but in general look into tunnelling your X traffic across an SSH session -- see the description of the `-X` and `-Y` flags in ssh(1). SSH basically sets up a port forwarding from the loopback on the (remote) X client to the (local) X server on your desktop, and will set DISPLAY and XAUTHORITY to appropriate values for you automatically. Plus you don't need to enable a tcp listener for X, which in itself just offers up a massively enlarged attack surface. Cheers, Matthew From owner-freebsd-java@freebsd.org Wed Jul 1 14:27:12 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C618353E89 for ; Wed, 1 Jul 2020 14:27:12 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xk801yc0z4Z1t; Wed, 1 Jul 2020 14:27:12 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd34.google.com with SMTP id v6so11512699iob.4; Wed, 01 Jul 2020 07:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8b1DDOH7wphUbjU34CnYLepOU6EhVo5p0devNVjB9q4=; b=BVlvQwZjLd3/ETvcZobh4PhLeBuQyFOMsgq3AbT6+Ibd/AZVucNOS4+8CmVSpdnIK9 tjKHWwAEv4hG6asU4C+0vO7z90o/fHPf/U4pC3r/ZJhArOILzRIxOzs6RwF8OCYfKAFK 8IPcsu8MhCSETPUJSTMgGY6ReYLiJIhGdGoXia00gk2gch0eCjy8vXtt8F8o8EOflgHq 2ZWjN6GyOaZ8NBAGabAAcpca44tJqF1udGusrR6q6tTUfmA2szz1VIMNSYIfQkRmfOKq LtA75bCEQa7jzBQB4KDUZpOqBQyRv00RUcWV7lFfgTddEY4Ul7MCBpHURItub3Cu5Cu5 8j8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8b1DDOH7wphUbjU34CnYLepOU6EhVo5p0devNVjB9q4=; b=UIucGdwDrA+0AhE5Y8Iz75C2oQFjPA84r04GJvoiqPhnhn+95PtGYmDdtAsTjRAiZr tJwpOqjxbYzZkiUTnFc+EFNgqqbtkDZ7l921I1Nb4cW0Gszm4Jk5wVnDOPKl11/W12+Y 0EdmAmwgcFaqGqqI6Mi2kX8N0PhVTiUXOkKUrJB6bRDJYN3L0q5U4mw3rZMoROMFfyol kZbPiCDY6GUJTGUDVLSrGCS+5ki1zNok8SebuvVjDPsLwWyI1uqYyReaOEgeLrsJGFhd +JlGvd+cjHPK/ohlMFJrssX26xQNvog+GEFm1O384/e0t5YpRQiibAl2/y6Mdj/3E3mT ydQA== X-Gm-Message-State: AOAM533aGTExBxRaS4q4gw8ijRThWIQwAhdSnZFjfz8euSVrLr5MuBCN dvuY2caUhlaaI3dNxWqNHJYfaeVELZNOV/WZSy+0+8ri X-Google-Smtp-Source: ABdhPJwHfDi76OnCDjD/eLIGCyT0/N9YVENP005tZ+d+YhUtL33DbfW/8J7Z5kLKJ6k/ZIIhaxd/pU6i5DJx4VHDGCU= X-Received: by 2002:a6b:e617:: with SMTP id g23mr2545417ioh.103.1593613630784; Wed, 01 Jul 2020 07:27:10 -0700 (PDT) MIME-Version: 1.0 References: <417840b4-1acc-ac20-2127-0754bce1fd68@gmx.net> <310397709.40.1593597140363@localhost> <745314036.25.1593604704120@localhost> <1960743780.71.1593606645185@localhost> <1075431299.4.1593608054346@localhost> In-Reply-To: From: Aryeh Friedman Date: Wed, 1 Jul 2020 10:26:59 -0400 Message-ID: Subject: Re: Min. ports needed for headless AWT/Swing To: Matthew Seaman Cc: freebsd-java@freebsd.org X-Rspamd-Queue-Id: 49xk801yc0z4Z1t X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 14:27:12 -0000 On Wed, Jul 1, 2020 at 10:03 AM wrote: > On 01/07/2020 13:56, Aryeh Friedman wrote: > > On Wed, Jul 1, 2020 at 8:54 AM Ronald Klop wrote: > > > >> > >> > >> *Van:* Aryeh Friedman > >> *Datum:* woensdag, 1 juli 2020 14:36 > >> *Aan:* Ronald Klop > >> *CC:* freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > >> *Onderwerp:* Re: Min. ports needed for headless AWT/Swing > >> > >> > >> > >> On Wed, Jul 1, 2020 at 8:30 AM Ronald Klop > wrote: > >> > >>> > >>> Van: Aryeh Friedman > >>> Datum: woensdag, 1 juli 2020 14:03 > >>> Aan: Ronald Klop > >>> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > >>> Onderwerp: Re: Min. ports needed for headless AWT/Swing > >>>> > >>>> > >>>> > >>>> On Wed, Jul 1, 2020 at 7:58 AM Ronald Klop > >>> wrote: > >>>>> > >>>>> > >>>>> Van: Aryeh Friedman > >>>>> Datum: woensdag, 1 juli 2020 13:33 > >>>>> Aan: Ronald Klop > >>>>> CC: freebsd-java@freebsd.org, Michael Osipov <1983-01-06@gmx.net> > >>>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing > >>>>>> > >>>>>> > >>>>>> > >>>>>> On Wed, Jul 1, 2020 at 5:52 AM Ronald Klop > >>> wrote: > >>>>>>> > >>>>>>> Van: Aryeh Friedman > >>>>>>> Datum: maandag, 29 juni 2020 20:59 > >>>>>>> Aan: Michael Osipov <1983-01-06@gmx.net> > >>>>>>> CC: freebsd-java@freebsd.org > >>>>>>> Onderwerp: Re: Min. ports needed for headless AWT/Swing > >>>>>>>> > >>>>>>>> On Mon, Jun 29, 2020 at 2:28 PM Michael Osipov < > 1983-01-06@gmx.net> > >>> wrote: > >>>>>>>> > >>>>>>>>> Am 2020-06-29 um 17:43 schrieb Aryeh Friedman: > >>>>>>>>>> I have a java application that works fine with setenv DISPLAY > >>> :0.0 on my > >>>>>>>>>> desktop FreeBSD 12.1 (amd64) [with Xfce4] but when I attempt to > >>> run the > >>>>>>>>>> same app on a VM that has the minimum ports needed to install > >>> OpenJDK 8 > >>>>>>>>> and > >>>>>>>>>> Tomcat I get an exception saying that it can't connect to the X > >>> server > >>>>>>>>> even > >>>>>>>>>> though I did setenv DISPLAY desktop:0.0 (and xhost + on the > >>> desktop). > >>>>>>>>>> Note it is the same user on both machines (NIS/NFS password > >>> DB/home dirs) > >>>>>>>>>> doing the running on both machines but is a different user then > >>> the one > >>>>>>>>>> logged in at the console (I do all my development in a separate > >>> account) > >>>>>>>>> > >>>>>>>>> Are you look for "-Djava.awt.headless=true"? > >>>>>>>>> > >>>>>>>> > >>>>>>>> Since this is a screen capture/recording program (which I am the > >>> developer) > >>>>>>>> I need to be able to capture the console (running X) that I am > >>> currently > >>>>>>>> on. So the question is what is the minimum set of ports/packages > >>> I need > >>>>>>>> to install on the VM to make it see and X server? It should be > >>> noted the > >>>>>>>> program has no GUI but does use java.awt.Robot#createScreenCapture > >>> (using > >>>>>>>> the full screen resolution as it's bounds) individual frames of > the > >>> longer > >>>>>>>> video. > >>>>>>>> > >>>>>>>> Here is the specific exception I am attempting to fix: > >>>>>>>> On desktop (192.168.11.20) > >>>>>>>> % xhost + > >>>>>>>> > >>>>>>>> On VM (192.168.11.4): > >>>>>>>> % setenv DISPLAY 192.168.11.20:0.0 > >>>>>>>> % java > >>>>>>>> > >>> > -javaagent:/usr/local/share/java/classes/jacocoagent.jar=destfile=/usr/home/aryeh/fnwe-scap-1a1.C036/jacoco.exec,jmx=true,excludes=thistest/*:test/* > >>>>>>>> -cp > >>>>>>>> > >>> > /usr/home/aryeh/fnwe-scap-1a1.C036/scrap/www/WEB-INF/lib/fnwe-scap-1a1.jar:/usr/local/share/java/classes/thisTest.jar:/usr/local/share/java/classes/pcCommon.jar:/usr/local/share/java/classes/pcUtil.jar > >>>>>>>> test.TestMain > >>>>>>>> > >>>>>>>> Result of the jvm invocation on the VM (not it works no problem > >>> su(do)'ing > >>>>>>>> to another account on the desktop if I do setenv DISPLAY :0.0): > >>>>>>>> > >>>>>>>> Caused by: java.awt.AWTError: Can't connect to X11 window server > >>> using > >>>>>>>> '192.168.11.20:0.0' as the value of the DISPLAY variable. > >>>>>>>> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) > >>>>>>>> at > >>> > sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) > >>>>>>>> at > >>> sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) > >>>>>>>> at java.security.AccessController.doPrivileged(Native Method) > >>>>>>>> at > >>> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74) > >>>>>>>> at java.lang.Class.forName0(Native Method) > >>>>>>>> at java.lang.Class.forName(Class.java:264) > >>>>>>>> at > >>> java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) > >>>>>>>> at > >>>>>>>> > >>> > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) > >>>>>>>> at > test.scap.TestVideoFrame.testCaptureFrame(TestVideoFrame.java:76) > >>>>>>>> > >>>>>>>> _______________________________________________ > >>>>>>>>> freebsd-java@freebsd.org mailing list > >>>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>>>>>>> To unsubscribe, send any mail to " > >>> freebsd-java-unsubscribe@freebsd.org" > >>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> -- > >>>>>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >>>>>>>> _______________________________________________ > >>>>>>>> freebsd-java@freebsd.org mailing list > >>>>>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-java > >>>>>>>> To unsubscribe, send any mail to " > >>> freebsd-java-unsubscribe@freebsd.org" > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>> > >>>>>>> Hi, > >>>>>>> > >>>>>>> Can you start any other X application on the VM using the DISPLAY > >>> setting? Like /usr/ports/x11/xeyes. Than you know if it is something > with X > >>> instead of something with Java. I guess it is something with X. > >>>>>>> I guess your desktop is not listening for external connections to > >>> the X server or your routing between the VM and the desktop does not > work. > >>>>>>> Or start a X server in the VM and use DISPLAY=:0.0 again. > >>>>>> > >>>>>> > >>>>>> Don't have any X components installed except for the ones required > by > >>> "make/make install" on openjdk8. The reason for this post in the > first > >>> place was to figure out the minimum set of ports needed to get a > working > >>> DISPLAY variable in the first place. > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >>>>> > >>>>> I'm 99% sure you don't need any additional ports to get a working > >>> DISPLAY variable. > >>>>> > >>>>> It will probably help to start your X server with "-listen tcp". But > I > >>> don't have enough information to be sure about that and how to > configure > >>> that in your setup. > >>>> > >>>> > >>>> I think that might work if in fact there was an X server on the VM: > >>>> > >>>> root@dnixon:~ # X -listen-tcp > >>>> X: Command not found. > >>>> root@dnixon:~ # ls /usr/local/bin/X* > >>>> ls: No match. > >>>> root@dnixon:~ # ls /usr/local/bin/x* > >>>> /usr/local/bin/x265 /usr/local/bin/xicclu /usr/local/bin/xmlcatalog > >>> /usr/local/bin/xslt-config > >>>> /usr/local/bin/xaegis /usr/local/bin/xjc /usr/local/bin/xmlcatmgr > >>> /usr/local/bin/xsltproc > >>>> /usr/local/bin/xft-config /usr/local/bin/xkbcomp > /usr/local/bin/xmllint > >>> /usr/local/bin/xsubpp > >>>> /usr/local/bin/xgettext /usr/local/bin/xml2-config > /usr/local/bin/xmlwf > >>> /usr/local/bin/xxd > >>>> root@dnixon:~ # ls /usr/local/sbin/x* > >>>> ls: No match. > >>>> root@dnixon:~ # ls /usr/local/sbin/X* > >>>> ls: No match. > >>>> root@dnixon:~ # java -version > >>>> openjdk version "1.8.0_252" > >>>> OpenJDK Runtime Environment (build 1.8.0_252-b09) > >>>> OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) > >>>> > >>>> > >>>> -- > >>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >>> > >>> In an earlier message you talked about "setenv DISPLAY 192.168.11.20:0 > .0". > >>> That is the IP address of your desktop. So the X server must be > running on > >>> your desktop. > >>> > >>> You want the VM to screencapture the screen of the desktop? Or do you > >>> want the VM to screencapture the screen of the VM? > >> > >> > >> On the desktop... finally got it to capture the screeen on the desktop > via > >> what I tried above but now have a second problem with is the audio > capture > >> is there anyway to make the following Java snippet work with a remote > mic > >> (works fine on the desktop with a local mic on dsp2.0)? > >> > >> fmt=new AudioFormat(160000,8,2,true,true); > >> mic=AudioSystem.getTargetDataLine(fmt); > >> mic.open(fmt); > >> mic.start(); > >> -- > >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > >> > >> > >> Good that it is solved. Would you mind sharing what the solution was? > >> > > > > Adding -- -listen tcp to my call to startx on the desktop (I was confused > > about which machine was the server and which was the client since the > > relationship is reverse of the normal order.... i.e. the server is the > > local machine and the client is the remote one not the other way around > for > > X) > > > > > > Be aware that running remote X applications against a local X server > will transmit all of the X related traffic across the network in the > clear -- which is roughly as bad as running old-style rsh(1). > > That may or may not be a problem for your use case, but in general look > into tunnelling your X traffic across an SSH session -- see the > description of the `-X` and `-Y` flags in ssh(1). SSH basically sets > up a port forwarding from the loopback on the (remote) X client to the > (local) X server on your desktop, and will set DISPLAY and XAUTHORITY to > appropriate values for you automatically. Plus you don't need to enable > a tcp listener for X, which in itself just offers up a massively > enlarged attack surface. > 1. ssh -X and -Y were not working (tried them first). 2. It is only used on a wired LAN (no WiFi at all) on a double NAT'ed (both private IP spaces on different 10.X.X.X and 192.168.X.X connection both via physically separate routers [cable modem and a desktop router]) between two machines on the same switch (the only machines on the switch) in my home office that only me and my SO use (they are also a Java programmer and wrote the encryption front end library we use for our stuff so I trust them completely) 3. There are no applications on the VM that make arbitrary network connections without direct user approval (i.e. no mail server/client and/or web browser) > > Cheers, > > Matthew > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org From owner-freebsd-java@freebsd.org Thu Jul 2 04:41:02 2020 Return-Path: Delivered-To: freebsd-java@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23F2434816E for ; Thu, 2 Jul 2020 04:41:02 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from resdmta-po-01v.sys.comcast.net (resdmta-po-01v.sys.comcast.net [IPv6:2001:558:fe16:19:96:114:154:209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49y5592JKJz4Htk for ; Thu, 2 Jul 2020 04:41:00 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from resqmta-po-04v.sys.comcast.net ([96.114.154.163]) by resqmta-po-12v.sys.comcast.net with ESMTP id qp2KjnuDtFsuzqr1qjQztO; Thu, 02 Jul 2020 04:40:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1593664854; bh=VElRqydYkMfmglGTwT4gXTnxn1c63k4hj6Vv4Xv8lQA=; h=Received:Received:Received:Received:Subject:To:From:Message-ID: Date:MIME-Version:Content-Type; b=LmfwvPpnjJIpyB4OvBpu7iQRmPsEyUgtaZRbtBv3m3UL7TNv/enlli+rvciNUkTWS rUy8VO1UXEmnoDBfaW+gS3jUyBckT70qXaDX0Vlj6hiBArgVIGhS7jW98BaNbo8DSz cL4O1k5wKuI9l2A6Rsh+NxittUdzV0/coUtlTgtsfUkvL0CrcF4HmKrc/ZKqwuPTo/ 7y4miYaQ+dGBnuvic30JRzbP40sHPdJxAG0cYjT3r8GZHTmR0nbiWAT5cpmpQmR2/I SD5A61VDXr1fINDQdyzOhacvyV+ZNRC12PXUw+aof1k56us9RUR6WimBO/FQIziyck yUc10Ki3tcW9Q== Received: from resomta-po-06v.sys.comcast.net ([96.114.154.230]) by resqmta-po-04v.sys.comcast.net with ESMTP id qqtSjT43qHUJXqqtijqt7F; Thu, 02 Jul 2020 04:32:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1593664350; bh=VElRqydYkMfmglGTwT4gXTnxn1c63k4hj6Vv4Xv8lQA=; h=Received:Received:Received:Subject:To:From:Message-ID:Date: MIME-Version:Content-Type; b=JvzeZVUgxjpvKXjn8p52DZes4wYkiu/noYmB8rt+V8vKpiNpRn1PvEBcvyybpZCw9 N73VSKKc1ty+DJqqOkI9CfIsd7dy29obekS/lpJLtYadB+81o5Rugmh9mG3E1FLnLD 4cFY7sZa6YY+kWgFVrSVIk1jBEAahZ9UPXpXj/fpRcF/d72sawMMMUGi7MLW6m1BMr 2xHbU9JEfCeZaJIhcWhHzLzl2Mbl6rO5yHzhFWRfaqJf91NYeuw9ikvqkl0/YzDE08 8Qc50xCw5fV8PyiF/iCAQNkY4QBvobqR4dOQn/fF72SIJWCHTgQV8uxHDgJ6zrXpgy NYDz9opmTjxNQ== Received: from misty.eyesbeyond.com ([24.16.127.181]) by resomta-po-06v.sys.comcast.net with ESMTPA id qqtfjuSeQ3wWoqqtgjmnOE; Thu, 02 Jul 2020 04:32:29 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduiedrtdefgdekfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgesrgdtreertdefjeenucfhrhhomhepifhrvghgucfnvgifihhsuceoghhlvgifihhssegvhigvshgsvgihohhnugdrtghomheqnecuggftrfgrthhtvghrnhepgffgvdehgfevhfefheevieetgeeitdfffeeigeeivefgffegffdvheejvdevieegnecuffhomhgrihhnpehpvghtihhtvggtlhhouhgurdhorhhgpdhfrhgvvggsshgurdhorhhgpdhfrhgvshhhphhorhhtshdrohhrghenucfkphepvdegrdduiedruddvjedrudekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehmihhsthihrdgvhigvshgsvgihohhnugdrtghomhdpihhnvghtpedvgedrudeirdduvdejrddukedupdhmrghilhhfrhhomhepghhlvgifihhssegvhigvshgsvgihohhnugdrtghomhdprhgtphhtthhopehrohhnrghlugdqlhhishhtsheskhhlohhprdifshdprhgtphhtthhopegrrhihvghhrdhfrhhivggumhgrnhesghhmrghilhdrtghomhdprhgtphhtthhopehfrhgvvggsshguqdhquhgvshhtihhonhhssehfrhgvvggsshgurdhorhhgpdhrtghpthhtohepfhhrvggvsg hsugdqjhgrvhgrsehfrhgvvggsshgurdhorhhg X-Xfinity-VMeta: sc=-100.00;st=legit Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.15.2/8.15.2) with ESMTP id 0624WQET046408; Wed, 1 Jul 2020 21:32:27 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: Host localhost.eyesbeyond.com [127.0.0.1] claimed to be misty.eyesbeyond.com Subject: Re: Allowing remote java app to access local sound system To: Ronald Klop , Aryeh Friedman Cc: FreeBSD Mailing List , freebsd-java@freebsd.org References: <2139766963.7.1593608177098@localhost> From: Greg Lewis Autocrypt: addr=glewis@eyesbeyond.com; prefer-encrypt=mutual; keydata= mQGiBDyFNecRBACKn+4b36n2/e55yTfpLXS9a57gQNgx0WXBfbK9LMLf2D8otD+0z1DW2ecl AOwJVtPftjvYP0HKFVC8Pes9Wvp6Z0sIEPpdkL2NPlUuxXUyh1b92u7nBpt7Uwsom88fnn+B OPrvvPL8Arg3JBen+Jd8o9yRoABCYku8vQF6CEUDcwCgmHJd9hZ/kRb1rLdSLssB4VMQ3zED /0/SVm+6XV+2ObXn9FKQpCC6sMSq+PCoR9NzAVRInjTtkpyR0fjJZr69IN2E2MWPonv38Xg1 tWJnR3fKUOnNqwiVHBQKKrKa9lGWsZQpTrR+ihtJ9hC626dCq9JDb1Ls7TXn9ha+d0WNuqiw ugto/myHm/GVlCANhGzUuDNUMo27A/46YEAMuhSQWOxgSZ/Z5g0ybgpswVePrxvD4sX2/AVf KClOYpPiNJe+S7YTJmfIPkpP2P7v+87BaN/uWgaFmxlhpUOIuat44w52EwwGB+K24cGgq52X ncZsYTYHSrLitkRtt35tVdnn1v3gmDi83M8W/YunflpeJAgJC0QzxKuar7QiR3JlZyBMZXdp cyA8Z2xld2lzQGV5ZXNiZXlvbmQuY29tPohXBBMRAgAXBQI8hTXoBQsHCgMEAxUDAgMWAgEC F4AACgkQ3uqZIxu22eCXswCeN0vOYtjnUXXznfUZtq/A/a6rf3EAoJE+kpmyp/e142F9s1Jo ndlUZjNFuQINBDyFNqMQCACa5C6Q8Vp5+TMTsNMiBIMhzm9GZQcOzTVsanfpHt/kYSZfA20J n4x/4fnhBLO42HVBono2r+Jh3fksDTf8jsCBQXBJfVwRz+d82PGpLbsIBpvqci31LJv1YAAp QoMzBkKMcE2/j0IA/JVVvVpNQInJRy/WAZIw0devZuRalricg3j6uoPeGJ8cJfWP/ZcySZhj w0JVNjnbOo7iwJuH6iEAx9i1bbJXYjPPieCmmnR9RuaUZXoNW9MLUyLrVQIOSE75NkWUTepd 4aU/kZHRJul1CY+IjQmmKepmzjeBx3bG2JQEzscAyhAOnIWKsO7IMpSAxYmu0m0DBZrhx/gu 6H9/AAURB/92qkduXjy275EQA+uOT01ZoZWqLW+/Svgslejx1v1obHDADMpcOHCoejr0TqXj 9F36GxqwgkTu8Y1sYr656tOD9beOi33QyqtqmVce5LnhOM4zLNZJIbtLrKmYN/licrfFATg1 9Ni8LYbGmGi2QT5CYHOZ5+38yjeilViW/c44GqJCgJgHfjytdzPERQ9qbdsUHDXCnleMDSSp hFxRvE0TkAr1z6DpHZz+NP3oScNkOkxEI1mIAocUsSO0fLroGJUcq+C2KNYPSTG2VZXwoAo3 o6FSlJKwK/neOwIie00BEBUQ04o5XRFBUN8mDKR4r7d542tR0iMBYUBZxU4TDlNCiEYEGBEC AAYFAjyFNqMACgkQ3uqZIxu22eAdvgCffuZlTysTdIYICVMkItXUnFENdXIAmwUFWyHGKyfU bJx1PdQLBwlUAcnl Message-ID: Date: Wed, 1 Jul 2020 21:32:26 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <2139766963.7.1593608177098@localhost> Content-Language: en-AU X-Rspamd-Queue-Id: 49y5592JKJz4Htk X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=comcastmailservice.net header.s=20180828_2048 header.b=LmfwvPpn; dkim=pass header.d=comcastmailservice.net header.s=20180828_2048 header.b=JvzeZVUg; dmarc=none; spf=none (mx1.freebsd.org: domain of glewis@eyesbeyond.com has no SPF policy when checking 2001:558:fe16:19:96:114:154:209) smtp.mailfrom=glewis@eyesbeyond.com X-Spamd-Result: default: False [2.54 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; DKIM_TRACE(0.00)[comcastmailservice.net:+]; HFILTER_HELO_5(3.00)[resdmta-po-01v.sys.comcast.net]; FREEMAIL_TO(0.00)[klop.ws,gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[24.16.127.181:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.942]; R_DKIM_ALLOW(-0.20)[comcastmailservice.net:s=20180828_2048]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.03)[0.025]; NEURAL_HAM_LONG(-0.74)[-0.741]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[eyesbeyond.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; GREYLIST(0.00)[pass,body]; SUSPICIOUS_RECIPS(1.50)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 04:41:02 -0000 On 2020-07-01 05:56, Ronald Klop wrote: > > Van: Aryeh Friedman > Datum: woensdag, 1 juli 2020 14:43 > Aan: FreeBSD Mailing List , > freebsd-java@freebsd.org > Onderwerp: Allowing remote java app to access local sound system >> >> I have a (java) app that works fine on a remote host and displays >> it's GUI >> by setting the DISPLAY environment variable.   The app also requires a >> working microphone (and other audio output devices). Is there any way to >> make it use the microphone/audio output on my local machine?   Note I >> suspect I would need to do this transparently to Java.  I am pretty sure >> Java has no idea how to do this on its own. >> >> --  >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> _______________________________________________ >> freebsd-java@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-java >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> >> >> > > Maybe something like https://www.freshports.org/audio/nas might help. > > Regards, > Ronald. Java uses the ALSA sound system, so I'm not sure how NAS would help unless you can configure ALSA to talk to it.  You could maybe look at the alsa-sndio port and then configure it to connect to an sndiod running locally on your machine.  I've never attempted this and I'll note that alsa-sndio warns it only supports output not input, so that likely won't help if you need the microphone to actually work. -- Greg *|/||/|*