From owner-freebsd-x11@freebsd.org Tue Jul 24 13:57:20 2018 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55456104C934 for ; Tue, 24 Jul 2018 13:57:20 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA4B5703DA for ; Tue, 24 Jul 2018 13:57:19 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: by mail-pg1-x541.google.com with SMTP id y5-v6so2981399pgv.1 for ; Tue, 24 Jul 2018 06:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=n0YmsYnDOiHpwBOHrRgrE9EWMVDbs6hr+akP89f8CBc=; b=GVah2AcCs7KDwmzFcR+mw0CJMQ06/1nLu8wUrhXf9EnJUoQKuO+dJnl/jsDzSlg08d JnIwGjwlHv73r7IsUQYAuX/y60OQVCkuPeYXr9BR0IDfNRzrkr6cUl6gjcnhzKE50lro yQ5rHDQZzMgZ6zpsTlhbzdajV1NeXZeREUVuAvbvWEAmqRzCKYFZymetPWyJ0Seatlut g1+COdgenzXLtP+xD5niwrcmybY5u/VdUZmPl8GB5vANY8dS/E0RTZKI9sDZM/CjVQMn Ix1WjfbB/BqQEcMTU8bGMPincTeAnhPcoSOiVGYOPODWyZSwedtLzKv1vNy4tRUP4lfm ZPxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=n0YmsYnDOiHpwBOHrRgrE9EWMVDbs6hr+akP89f8CBc=; b=YVBSlzQTfrY4NfCiLSpLszTRFhHWM9NqatQXRi66fD3R0p1Fvh8K8pgodmmr4Mz4qs mFlL1cv50O2tmlMipYA7S30/jfVfEkgKeBLIdls9C+WkmTUxCBf0PZvteuug3EwbfXg5 c2fHB8YZn9f4N8jlN299bBdgDLqDuUaV8k7pw921D1Pke+Fm4ovFgO2eEsJlSKn3o1sy ksIzJBtF2ogFgNLVZs8rm6DePnOF7sM/+DBmhTD1wuMiNgwgE3SjXUyhOrQSjTPmjYae 4G3CRTW478zZq4NrwJBj+G8BAtySi3lNJzGhAXQPK4vMWVw5ul2UDwCbmpS7ZzE9Jcw9 SdFg== X-Gm-Message-State: AOUpUlF2CYqoyo4w6G5jgddSD/0aqRZ9yMoM9ixmuA2ahdPWdjWD5E+W YcJspNMsEl+nfgReIYvRmQuy8v73KAE= X-Google-Smtp-Source: AAOMgpcnPMdaiMunBF+fK7lOkabqJ8DaX+DzZiR8wdGm/60yHKYt2Aj6rF93lnBmZH/13xe03eQB6Q== X-Received: by 2002:a63:a1a:: with SMTP id 26-v6mr16515648pgk.221.1532440638749; Tue, 24 Jul 2018 06:57:18 -0700 (PDT) Received: from [192.168.1.100] (ngn7-ppp407.tokyo.sannet.ne.jp. [157.192.89.153]) by smtp.googlemail.com with ESMTPSA id 16-v6sm25293014pfo.164.2018.07.24.06.57.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 06:57:18 -0700 (PDT) Subject: Re: How to run (if possible at all) Wayland compositor on FreeBSD without Xorg To: Greg V Cc: FreeBSD X11 mailing list References: <4f8d6f08-8f29-fb8f-0cc2-42406929301f@gmail.com> <1532356854.75524.0@hraggstad.unrelenting.technology> From: Denis Polygalov Message-ID: <5f31ce4a-13a4-f83e-7102-eb6a6daff9c5@gmail.com> Date: Tue, 24 Jul 2018 22:57:13 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532356854.75524.0@hraggstad.unrelenting.technology> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 13:57:20 -0000 Hi Greg, I can confirm that Weston works the way you described, without Xorg. BTW how your Weston port: https://github.com/myfreeweb/freebsd-ports-dank/tree/master/x11-wm/weston related to this: https://reviews.freebsd.org/D10599 ? The description of your freebsd-ports-dank repository says it is the "bleeding edge", but https://reviews.freebsd.org/D10599 seems to be much newer... ^^; Regards, Denis. On 23/07/2018 11:40 PM, Greg V wrote: > > > On Mon, Jul 23, 2018 at 4:39 PM, Denis Polygalov wrote: >> Hi all, >> >> I have: >> 11.2-RELEASE + >> drm-stable-kmod + >> graphics/mesa-libs compiled from ports with Wayland support enabled + >> graphics/wayland installed from packages + >> graphics/qt5-wayland compiled from ports >> Weston compiled from source manually. >> >> I am able to run Weston or minimal Wayland compositor from >> qt5-wayland examples, but only if I do this from inside >> of Xorg session (xterm). >> Attempt to run from console lead to: "Could not connect to any X >> display" error message. >> As far as I understand this calling syntax: >> $ ./some_exe -platform wayland >> is intended to be used only for Wayland *clients* not compositors. >> >> Is it possible to run any Wayland *compositor* without Xorg running? >> How this configured? Which software is responsible for this? >> Sorry if this is wrong place to ask... > > Hi, > > the Big Deal here is that starting a wayland compositor requires > something to provide access to GPU and input devices. > > The big compositors (GNOME Shell, KDE KWin) rely on logind, which we > don't have. > > For Weston, there is a setuid binary called 'weston-launch' that works. > > Sway and other wlroots based compositors also have something similar, I > forget already. > > So: > > - Install libinput from my ports > (https://github.com/myfreeweb/freebsd-ports-dank/tree/master/x11/libinput) > - Install Weston from my fork (https://github.com/myfreeweb/weston) > - Add yourself to the 'weston-launch' group > - Make sure the 'weston-launch' binary is suid and owned by root > - Make sure you have an 'XDG_RUNTIME_DIR' in the environment > - Put your favorite keyboard settings into the environment e.g. 'export > XKB_DEFAULT_LAYOUT=us XKB_DEFAULT_VARIANT=colemak > XKB_DEFAULT_MODEL=pc101 XKB_DEFAULT_RULES=evdev > XKB_DEFAULT_OPTIONS="ctrl:nocaps,ctrl:lctrl_meta,compose:ralt,grp:alt_space_toggle"' > > - Run 'weston-launch'! > > The libinput in my ports has this patch > https://github.com/myfreeweb/freebsd-ports-dank/blob/master/x11/libinput/files/patch-src_evdev.c.reopen > which should fix /dev permissions issues. If that doesn't work, or you > decide not to use it, give yourself read+write permissions on /dev/tty*, > /dev/input/*, /dev/dri/*, /dev/drm/*. > >