From nobody Tue Mar 15 10:24:51 2022 X-Original-To: freebsd-x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B80AE1A21E32 for ; Tue, 15 Mar 2022 10:25:00 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KHqKR561Xz4sSM; Tue, 15 Mar 2022 10:24:59 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id y8so18471518edl.9; Tue, 15 Mar 2022 03:24:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to; bh=lTlI8fv1vp0Xi6CZaZ5pbfC4Vop8BYrfFSz1PhcHgA8=; b=CFFsqI1ZI87YOPh7mkKMvBvxB2ncZzVCyc7+YM0bYFdWFGUALLBL3wdFvAz7PAzLqR frH6r/to2SfULoT5iiLvvWKkOw0VshMbFMvhoUokV5ysvKIEy4L8v6kf2LMthA1y2M5z V8F04w/OU5QApzDLVhmiNqk++Y0gADkL+6U8qlQ9cgTIChaHWCapVY17aj5ZVPVXrvin 3hLO6bNGNxzMMem9wHfD3RvLtbwj0PUDa34BQp8lECjXD6k9b4cvIh/183G0xJ9U9ioF H9w3CCruPZbeCIU1dLeN9z36gJ2MLPD/95ltIURhUoiBCmnkTruWHzZucPPMMzW2zAz6 fUzg== X-Gm-Message-State: AOAM5339lgeYs9WUn80KCQLsK+Atib2QvTUxxcRqdzk2JxRVr6t1s3nj OV5/OAdngOUxeUrkcvwsJAr85280g2s= X-Google-Smtp-Source: ABdhPJwr3n1SH/Ym0VLZ0NUQGwJR0/4MvBugPXsjjEBY07JAnmpV80juHNVKFlSeqSoNDb/4fhymVw== X-Received: by 2002:a05:6402:2548:b0:416:4155:e12 with SMTP id l8-20020a056402254800b0041641550e12mr24480709edb.175.1647339891929; Tue, 15 Mar 2022 03:24:51 -0700 (PDT) Received: from ?IPV6:2a02:8109:9880:1d70:5e5f:67ff:fef4:ffd8? ([2a02:8109:9880:1d70:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id g1-20020a056402424100b00416c6cbfa4csm7505892edb.54.2022.03.15.03.24.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Mar 2022 03:24:51 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------y8s6BRI0iQUsEX0Imt07YxZv" Message-ID: <665f28bc-42b5-f862-3211-01b90b070fd4@FreeBSD.org> Date: Tue, 15 Mar 2022 11:24:51 +0100 List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: Dynamic multimonitor setup question Content-Language: en-US To: Alexey Dokuchaev , Milan Obuch Cc: freebsd-x11@freebsd.org References: <20220228093951.30914524@zeta.dino.sk> <20220314101646.0042335c@zeta.dino.sk> From: Mateusz Piotrowski <0mp@FreeBSD.org> In-Reply-To: X-Rspamd-Queue-Id: 4KHqKR561Xz4sSM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.95 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.53:from]; NEURAL_HAM_MEDIUM(-0.95)[-0.949]; MLMMJ_DEST(0.00)[freebsd-x11]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.53:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------y8s6BRI0iQUsEX0Imt07YxZv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 15/03/2022 03:03, Alexey Dokuchaev wrote: > On Mon, Mar 14, 2022 at 10:16:46AM +0100, Milan Obuch wrote: >> I did some searching, googling and similar... a found two ports already >> in FreeBSD's port collection, x11/arandr and x11/srandrd. The former is >> just a graphical interface to xrandr, easy to understand and intuitive >> (similar to the way Windows and MacOS X does multimonitor setup). The >> latter should do what I am after, but it did not work for me :( >> >> Per 'man srandrd', if started with 'srandrd -v -n some_script', it >> should output some debug data (-v), stay in foreground (-n) and invoke >> some_script when monitor is being plugged or unplugged. It does not >> work for me. Something happens just when I invoke 'xrandr' in another >> terminal - I see some debug output, but the script is not invoked. >> >> Is anybody here using x11/srandrd? I can debug the script invocation, >> but if the event is not detected without external intervention, it is >> not really usable for me. And I have no experience with debugging the >> issue in graphics stack... I'm using srandrd to recenter my wallpapers when I configure an external monitor (I always do it manually with either arandr or xrandr). I just start srandrd like this: srandrd -e -n ~/bin/srandrd-handler ~/bin/srandrd-handler is a shell script with an executable bit set and it contains only the following: #! /bin/sh - feh --no-fehbg --bg-center --image-bg 'black' "${HOME}/wallpaper.png" Good luck! Mateusz --------------y8s6BRI0iQUsEX0Imt07YxZv Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 15/03/2022 03:03, Alexey Dokuchaev wrote:
On Mon, Mar 14, 2022 at 10:16:46AM +0100, Milan Obuch wrote:
I did some searching, googling and similar... a found two ports already
in FreeBSD's port collection, x11/arandr and x11/srandrd. The former is
just a graphical interface to xrandr, easy to understand and intuitive
(similar to the way Windows and MacOS X does multimonitor setup). The
latter should do what I am after, but it did not work for me :(

Per 'man srandrd', if started with 'srandrd -v -n some_script', it
should output some debug data (-v), stay in foreground (-n) and invoke
some_script when monitor is being plugged or unplugged. It does not
work for me. Something happens just when I invoke 'xrandr' in another
terminal - I see some debug output, but the script is not invoked.

Is anybody here using x11/srandrd? I can debug the script invocation,
but if the event is not detected without external intervention, it is
not really usable for me. And I have no experience with debugging the
issue in graphics stack...

I'm using srandrd to recenter my wallpapers when I configure an external monitor (I always do it manually with either arandr or xrandr).

I just start srandrd like this:

srandrd -e -n ~/bin/srandrd-handler

~/bin/srandrd-handler is a shell script with an executable bit set and it contains only the following:

#! /bin/sh -
feh --no-fehbg --bg-center --image-bg 'black' "${HOME}/wallpaper.png"

Good luck!

Mateusz

--------------y8s6BRI0iQUsEX0Imt07YxZv--