Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Jun 2019 04:26:27 +0300
From:      Greg V <greg@unrelenting.technology>
To:        freebsd-x11@freebsd.org, raichoo <raichoo@acmelabs.space>, Johannes Lundberg <johalun0@gmail.com>
Subject:   Re: Developing a wayland compositor on FreeBSD
Message-ID:  <8A9A9ADC-7CDA-4AF9-A042-7721ED7C04DC@unrelenting.technology>
In-Reply-To: <20190607204429.GA1387@lain.lan>
References:  <20190607165049.GA1313@lain.lan> <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org> <c6395b04-bade-8441-776d-e4995e5a5b00@gmail.com> <20190607204429.GA1387@lain.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On June 7, 2019 11:44:29 PM GMT+03:00, raichoo <raichoo@acmelabs=2Espace> w=
rote:
>On Fri, Jun 07, 2019 at 01:28:15PM -0700, Johannes Lundberg wrote:
>> Hi
>>=20
>> I'm using the following setup=2E Maybe some of it helps=2E
>>=20
>
>Thanks a lot :)=2E I also found out why libinput did not register any
>mouse
>events=2E I simply did not have `moused` running=2E Reading the OS code
>helps when
>in doubt ^^=2E Getting close to a usable wayland setup here :D

Hi,

you need moused because by default, the kern=2Eevdev=2Ercpt_mask is set to=
 only output events from the virtual/multiplexed keyboard/mouse devices=2E =
If you set it to 12, that will let events from the actual devices through=
=2E (You also need options EVDEV_SUPPORT in kernel =E2=80=93 that's default=
 in 12-STABLE & 13-CURRENT, but not in any -RELEASE yet=2E)

Re: setuid, dev/input permissions, ways of getting input devices=2E

The more proper way to do it is to use a session management daemon =E2=80=
=93 namely, ConsoleKit2, as we don't have systemd-logind :)

This requires a patched ck2 =E2=80=93 I posted that on phab as a port patc=
h and as a GitHub upstream PR=2E But upstream is inactive, so I guess I'll =
need to fork it as ConsoleKit3, or ConsoleKit69 or whatever=2E

This also requires your compositor to support CK2 API=2E wlroots upstream =
doesn't want to merge my patch because they hate libdbus and most DBus clie=
nt libraries that are not systemd's sd-bus=2E So for wlroots you'll need my=
 patch for CK2 support, search the GitHub PRs for 'consolekit2'=2E I also h=
ave this support in my abandoned Weston fork=2E By the way, KDE Plasma KWin=
 has supported CK2 out of the box for a long time, I even managed to launch=
 it (with some patches) but it didn't get input devices (needs more fixing)=
=2E

This *also* for now requires a patched libudev-devd, so that it would pick=
 up device metadata from sysctls (which were added by me to the kernel) ins=
tead of opening /dev/input/*, which should not be allowed as a normal user=
=2E (On Linux, this metadata is provided by, well, the actual udev daemon=
=2E) But the libudev-devd patch has landed and hopefully soon ports will be=
 updated, if it's not already done=2E

With all that, it is possible to run a compositor as a normal user without=
 setuid root and without /dev/input permissions!

Re: compositor development=2E I'm building a "DE" on top of Wayfire, which=
 is an awesome compositor with wobbly windows and desktop cubes, like in th=
e good old days=2E Wayfire also has a plug-in system, like Weston's=2E You =
could try implementing tiling stuff as plugins=2E You can join our chat on =
freenode #wayfire=2E



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A9A9ADC-7CDA-4AF9-A042-7721ED7C04DC>