From owner-freebsd-x11@freebsd.org Thu Apr 30 04:14:04 2020 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 141CD2CED39 for ; Thu, 30 Apr 2020 04:14:04 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49CMT76lzLz4Fqn; Thu, 30 Apr 2020 04:14:03 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id DFC57169E8; Thu, 30 Apr 2020 04:14:03 +0000 (UTC) From: Jan Beich To: Grzegorz Junka Cc: greg@unrelenting.technology, freebsd-x11@freebsd.org Subject: Re: Wayland on FreeBSD References: <9a914a03-d431-7d99-abb8-6f949e562f14@gjunka.com> <0ec67eef-ac5d-2ec9-e1be-35304bb49af9@gjunka.com> <368n-f7yo-wny@FreeBSD.org> Date: Thu, 30 Apr 2020 06:13:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Thu, 30 Apr 2020 04:14:04 -0000 Grzegorz Junka writes: > On 29/04/2020 01:31, Jan Beich wrote: > >> Grzegorz Junka writes: >> >>> After the above env variables have been removed glxgears no longer starts: >>> >>> % glxgears >>> Error: couldn't open display (null) >> Make sure you haven't accidentally unset DISPLAY after it was set by >> Sway and make sure DISPLAY was inherited by terminal emulator, shell and >> whatever invokes those (e.g., tmux/screen, wofi/dmenu-wayland). > > > OK, maybe it has something to do how I am starting sway and the > applications. Please let me know what's the correct and accepted way > and I will try with that. > > Currently I simply boot into the command line, login as root, load the > graphics kernel modules, Better set kld_list in /etc/rc.conf then disable root login except for single user mode. > then login as user, then "sway&" eventually "sway -d &> out.txt". It can be started automatically e.g., $ cat ~/.profile if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" ]; then # Redirect noise from Sway, Xwayland, Firefox, etc. sway >~/.sway/log 2>&1 & fi > Then I login over ssh from another computer and start a particular > application. Why not familarize yourself with Sway on a local machine before attempting to forward applicatons over network? Another machine introduces another source of potential misconfiguration. Fiddling with DISPLAY/WAYLAND_DISPLAY variables is *not* required: - To start Wayland apps remotely a la "ssh -X" use waypipe - To start X11 apps remotely (on Wayland) use "ssh -X" - To use Sway remotely start wayvnc then connect via a VNC client > As I mentioned, gtk3-demo can be opened this way, the mouse and > keyboard works fine and I can use the application. Firefox briefly > opens a window then dumps core, any other application I tried either > can't find DISPLAY (kwrite) and exits or seems to be working but > doesn't display anything (xclock, uxrvt). - To fix Firefox convert /tmp to tmpfs or unset MOZ_ENABLE_WAYLAND - To fix kwrite/xclock/urxvt and Firefox/X11 debug Xwayland > Please let me know what's the supported way of starting sway and I > will check mpv and alacritty. Locally: on console, on Xorg server, on another Wayland compositor. For example, bug 244793 shows how to use VAAPI in Firefox without leaving Xorg server using Sway or Cage as a compat shim.