From owner-freebsd-x11@freebsd.org Sat Jun 8 01:26:41 2019 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 4CA6615BCD82 for ; Sat, 8 Jun 2019 01:26:41 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out.migadu.com (out.migadu.com [91.121.223.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.migadu.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEA276BFD3 for ; Sat, 8 Jun 2019 01:26:38 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: (Migadu outbound); Sat, 08 Jun 2019 01:26:31 +0000 Received: from [192.168.2.155] ([62.122.208.146]) by out.migadu.com (Haraka/2.8.16) with ESMTPSA id 55CDF4BD-8AE6-4E2D-AEAE-20587E4A4B70.1 envelope-from (authenticated bits=0) (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Sat, 08 Jun 2019 01:26:30 +0000 Date: Sat, 08 Jun 2019 04:26:27 +0300 User-Agent: K-9 Mail for Android In-Reply-To: <20190607204429.GA1387@lain.lan> References: <20190607165049.GA1313@lain.lan> <2080bca3-703b-9846-2d96-1dc70c6f13fa@nomadlogic.org> <20190607204429.GA1387@lain.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Developing a wayland compositor on FreeBSD To: freebsd-x11@freebsd.org, raichoo , Johannes Lundberg From: Greg V Message-ID: <8A9A9ADC-7CDA-4AF9-A042-7721ED7C04DC@unrelenting.technology> DKIM-Signature: v=1; a=rsa-sha256; bh=1c3XGkW/mcu1rCKgS7F+U+u8FE6k/ZSPNsntw4yUhPY=; c=relaxed/simple; d=unrelenting.technology; h=from:subject:date:to; s=default; b=QuV0hOd6RRcJybBotc/hv02I9gSzilcIvlDm4x280RHQoofHwhSofubMeF9oSXSCfO+08qA0TWM7md/H0YrYYevZiR1LTQLBY9oPOU4vHy6zBe79qPqPLJI42zrmciyORnFDyz2qFIc4u0lqgGtFnML0ch1JBRXCDn546boR1eE= X-Rspamd-Queue-Id: BEA276BFD3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=unrelenting.technology header.s=default header.b=QuV0hOd6; dmarc=pass (policy=none) header.from=unrelenting.technology; spf=pass (mx1.freebsd.org: domain of greg@unrelenting.technology designates 91.121.223.63 as permitted sender) smtp.mailfrom=greg@unrelenting.technology X-Spamd-Result: default: False [-6.51 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[unrelenting.technology:s=default]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:91.121.223.63]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[unrelenting.technology:+]; DMARC_POLICY_ALLOW(-0.50)[unrelenting.technology,none]; RCVD_IN_DNSWL_NONE(0.00)[63.223.121.91.list.dnswl.org : 127.0.10.0]; MX_GOOD(-0.01)[aspmx1.migadu.com,aspmx2.migadu.com]; NEURAL_HAM_SHORT(-0.86)[-0.862,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.64)[ip: (-9.90), ipnet: 91.121.0.0/16(-4.47), asn: 16276(1.16), country: FR(-0.01)]; ASN(0.00)[asn:16276, ipnet:91.121.0.0/16, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2019 01:26:41 -0000 On June 7, 2019 11:44:29 PM GMT+03:00, raichoo 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