Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2018 22:57:13 +0900
From:      Denis Polygalov <dpolyg@gmail.com>
To:        Greg V <greg@unrelenting.technology>
Cc:        FreeBSD X11 mailing list <freebsd-x11@freebsd.org>
Subject:   Re: How to run (if possible at all) Wayland compositor on FreeBSD without Xorg
Message-ID:  <5f31ce4a-13a4-f83e-7102-eb6a6daff9c5@gmail.com>
In-Reply-To: <1532356854.75524.0@hraggstad.unrelenting.technology>
References:  <4f8d6f08-8f29-fb8f-0cc2-42406929301f@gmail.com> <1532356854.75524.0@hraggstad.unrelenting.technology>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <dpolyg@gmail.com> 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/*.
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5f31ce4a-13a4-f83e-7102-eb6a6daff9c5>