How to run (if possible at all) Wayland compositor on FreeBSD without Xorg

Denis Polygalov dpolyg at gmail.com
Mon Jul 23 15:08:42 UTC 2018


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 <dpolyg at 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/*.
> 
> 


More information about the freebsd-x11 mailing list