From owner-freebsd-x11@freebsd.org Mon Jul 23 15:08:42 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 F09F0104D646 for ; Mon, 23 Jul 2018 15:08:41 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) (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 7054D8087D for ; Mon, 23 Jul 2018 15:08:41 +0000 (UTC) (envelope-from dpolyg@gmail.com) Received: by mail-pl0-x241.google.com with SMTP id 6-v6so357486plb.0 for ; Mon, 23 Jul 2018 08:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=exZsqdYpWiUUaf1FMHwfNaG0EDHL5ojHhIMGKcd71ls=; b=HIh0qVEYmqpJk6EE4UA7VcHgGwOhiCx++FeIpoUW98j/QYCwVThp0we+uuRbr5XS50 8uBd+IA/r3wSTCzafc2YUwdc3cbtLsrIZbW1EOxFM8bZy8LkLlw10eGfG9MgGpnpQH38 fzyxZMYPNbfQ2cI7pHjVopjE5zNLtnm3riEAEfN+T1T8PTxgqT8dS6oEGjU7sO0gb1dU W45rGOoSsuOqwTlHz3EvDPsGpYeWlU4RJKCQIco0A0jTxg0G5+bfRrBYn6U+/ynG9UMd lx5xF4qrt50SzNOGscHSWf3hxgH7ubRq9RvNOBuQfSi/hpflrFEFd3B9g96uTte4DHwJ QNuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=exZsqdYpWiUUaf1FMHwfNaG0EDHL5ojHhIMGKcd71ls=; b=n2Nvv/JEO/O8F+Zme76W5g3DFjVtwqgqzW9syJxnEQyr3jvSWBzCdjQgMVYOmrJjGn HQJD7NjWBtSnDI5gUHt+lmUhQBGKZjCyaYowdWlFcgckIm0KZ2EA9ClX8z1phaH/kmDz CPOO1rk5l87fFZNdjgL+t2rofvN5+Dyi0dfBqYziDlIKe/BhM9pcAdF77WvnRKgkB30L F6r4ys1/9nLGRNHNcHNCVCrd9U5EW6WteC4EfAT1EfOZSeRvb0nwyAiX5YYWXg+BefK3 /YUgloGyv3QK2rJSLxxvp5SA8f5COJhPNKW8x3h2Vdad7b8dsyvrUvBGKK/KD0DxSro0 FeVg== X-Gm-Message-State: AOUpUlFE9hAxM3YwZ8lbEz3B6oLUR9v4XFXQpGoa7vYNkGrcYH79nKuP +xkTESeXvGAxnWihsw0E04DA0h8Fo1E= X-Google-Smtp-Source: AAOMgpe87NIgASgUmJgNizCfWZEZWSYLYvDpmU8wugPEV/ysCB9H1W5pBIW2tZxekTXRJ7R5IqmdWA== X-Received: by 2002:a17:902:3081:: with SMTP id v1-v6mr13536967plb.266.1532358520453; Mon, 23 Jul 2018 08:08:40 -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 l85-v6sm17016611pfk.34.2018.07.23.08.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 08:08:39 -0700 (PDT) Subject: Re: How to run (if possible at all) Wayland compositor on FreeBSD without Xorg To: Greg V References: <4f8d6f08-8f29-fb8f-0cc2-42406929301f@gmail.com> <1532356854.75524.0@hraggstad.unrelenting.technology> Cc: freebsd-x11@freebsd.org From: Denis Polygalov Message-ID: Date: Tue, 24 Jul 2018 00:08:36 +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: Mon, 23 Jul 2018 15:08:42 -0000 Hi Greg, thanks a lot! Can you say something about Wayland compositor which is even more simpler than Weston? I am talking about this code for example: https://github.com/qt/qtwayland/tree/5.11/examples/wayland/minimal-cpp does it mean that all the stuff from the https://github.com/qt/qtwayland/tree/5.11/examples/ can be launched only from inside of Xorg because qtwayland does not contain functionality provided by weston-launch? 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/*. > >