From nobody Mon Dec 04 19:24:11 2023 X-Original-To: freebsd-hackers@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 4SkYWM1XgXz52jpF for ; Mon, 4 Dec 2023 19:24:15 +0000 (UTC) (envelope-from freebsd@ny-central.org) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2060.outbound.protection.outlook.com [40.107.6.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkYWL6190z3Yf3 for ; Mon, 4 Dec 2023 19:24:14 +0000 (UTC) (envelope-from freebsd@ny-central.org) Authentication-Results: mx1.freebsd.org; none ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4i3lATnt9dO/KJJCDkCHwZn8DnRl1q3xTA3V8h5YqPybEgLQXHVhwcLvw6LpYLeu1CH9sA21LtjJhc3soJm3AL9tm68dgefqws2SLI6eJwRvR2nuytAYeUOJWxUEfFM/Yxp1YHjn4MKiQ0K8esPT/ZPkqHPdJRgG9nHxdjV0iNQ6Aqjc3TjkcnhKWXXxFhRERTZblHZc/XY5jhrSv1+Ci58IpsQFgDqCkjs8C+61zvjx6OWHVcBcbZF7ctpBIiUmMFSk4AqZxKlpdAI+zFLy3JkaFH1EBsIQQr0nhu6AOjvEW1G5a8cwsKUU+mh+7041hRXRDFSLvx2BBGYZus1NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RNyhtZe0y+6LQaGHbm9/XrqZ6A8HzhsYXXGnIQ/T1Ng=; b=lrO6VagG2EOieZjyd/W4ZBAEKEx5HZpro1saS2A9mgOw4Wt3ZB1kxEJK40V0rDeEgsruOcz8EhedXjBatVvTEEfRfSdJCI69EjwKsBSsq7dwH4y29jWvX7MuZOFZeZxSHeNCTn5W6AtQgYxLg3qlXWw8EC/Ne8HHz8t0H5wuOtY4OXsIGPH006IinyQ+/0SxnhY5+rPz/y9EeN5YJIrygGasi6ULG3nkBxBBYxVX6VtcYY1NjoWdhTzxWrLfQgoMNr7AsxYg41dcZiXLxF+0mt3AROvzltyUAMwhM9GR1idEOq+XYX6iYEq6rx7XLxjX/Wu9mwT369vvFjZ1kWB71w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ny-central.org; dmarc=pass action=none header.from=ny-central.org; dkim=pass header.d=ny-central.org; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ny-central.org; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RNyhtZe0y+6LQaGHbm9/XrqZ6A8HzhsYXXGnIQ/T1Ng=; b=Ih90Wcbt92hCtRKASEB5pvvFndt8k2LX9Z8nc/MVWEB2ER6Eq+bg0bf85zw03s5TwQ6UpY5ciTxtIEZ0xjVZaTrONv8ZSOwFigctXqc+TYKXBhNOobkyQ3hroeobAymHfDhZMGv+HJ0lkY805e93koFakFBRXzQ9meVeLnHY4b4= Received: from PAXPR08MB6766.eurprd08.prod.outlook.com (2603:10a6:102:136::18) by AS4PR08MB7832.eurprd08.prod.outlook.com (2603:10a6:20b:51c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33; Mon, 4 Dec 2023 19:24:11 +0000 Received: from PAXPR08MB6766.eurprd08.prod.outlook.com ([fe80::9b1b:b43b:6d6b:b136]) by PAXPR08MB6766.eurprd08.prod.outlook.com ([fe80::9b1b:b43b:6d6b:b136%4]) with mapi id 15.20.7046.033; Mon, 4 Dec 2023 19:24:11 +0000 From: Christian Moerz To: "Dr. Amr Osman" , "freebsd-hackers@freebsd.org" Subject: Re: devd lid close event Thread-Topic: devd lid close event Thread-Index: AQHaJs56CFGk81zBfUKexxBvyZKo8rCZgN2A Date: Mon, 4 Dec 2023 19:24:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXPR08MB6766:EE_|AS4PR08MB7832:EE_ x-ms-office365-filtering-correlation-id: ea5d917b-1654-4ce5-2e1f-08dbf4fe982a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2l+V4et1IylYlT/NyibNaiAZqPI9zFnItLAuzrWx+QST2J8KPMuFL75sxUINatcEX39xLOMTtlGZq4AOUsUYwPbrBYN251Y6z0yPSxeOVxcLicBKAfJBwUavQwFVnnMDwV/2LibV2Y7FJsRKSXSzyIQPHaep+zgCWfXXtSoWqY3Or/riZHCdTBkvxSUpXw/BdJjpSRn44PJVsyRxdwHOZ607md0wpbkZw7UsZrLqDcoNtL8GYkWRg9vEoNvfqvO79nxaLFufkQZzYIFWNsKbGxjvkNNqEMoISlaxHwiCdm4YQ5sczIQsY5cbWwkZcq3WvSFuusZX9ZAAh73SAyjHcuSvXAVVLklEI3rWRaKo0G528ldZN4lTaY1b73r61GJl0Na8kXsFrd042mMjRG7FV69b6hBPe6L3oaY8cu2Xl4SrQ4l6bEZ8s3C2uOfaLfMqviUo5d3cerTlkzXEn9U0/71kmPEpgfF7ZERarsI01oP/tAQ8mC1D4mZ3rMeFxVrpUJRccSPjOgKvpJcuTXsB7KVqnEWOxnNN9ln/w3jo3Hb53dXc04KIPhL3aM6/47So3SXLr60UFz12XJsvi8Avvjr70C2+FBDH6R52AZgYgCwRdfDP/WSJmmSx6Uxi9Chh x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6766.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39830400003)(346002)(366004)(136003)(396003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(478600001)(26005)(83380400001)(7696005)(71200400001)(6506007)(9686003)(53546011)(316002)(110136005)(66476007)(66446008)(64756008)(76116006)(66946007)(66556008)(3480700007)(122000001)(38100700002)(55016003)(5660300002)(52536014)(86362001)(8936002)(8676002)(2906002)(41300700001)(33656002)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?E0IxJnIWHLZZm7G8cl+LivCElTP0artOiXnZU1tPjaHXe7YCOzwGp6nVIGHP?= =?us-ascii?Q?SZMzyzxONbTiZmkVC03n25OlxdM336csMhDLP/yud9f47YeCZbArK6jCUdcq?= =?us-ascii?Q?VadYb84kMI9SFyLzkrem/uPHIhsCLUDrdcc39R1fZldccO8ss9U7NFjPk0g0?= =?us-ascii?Q?gNy5h+ddcCfl1xg9Ff5yH4KH1Y7/v52ZkaJONCKMmECKJu39iL8qu6te2Qed?= =?us-ascii?Q?SOXvAAtezC5dzzyZncmwsSGtQvkJXkbc/NzGguyWK/fvBa8K9OeRQKFbxfH5?= =?us-ascii?Q?zTWk6amT+Zq8nJi10NneazzgqNgyJbYHZCBNx0KyDsepbLs5lOJrIFEtx8FF?= =?us-ascii?Q?d+2NMC5t12/7h5l/OsJ0zl3GlPgDgC0ROVvKehhAy/+j8E/AQj9X+c8Ycp/C?= =?us-ascii?Q?TiaVkZC9eQZrtW8VxdUKc25czepdSC7ATvMCUXef3sfKzTpNXjhN5e224m1a?= =?us-ascii?Q?EK8i6s42NcUXW/XYz09G2NdcH6wlHgpgc6dsJAJ33ku7e4ax8x3FQclJgXMP?= =?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IBxltLi/JH0N22gLEZ9v3qEB1OrH5m?= =?us-ascii?Q?yl/w0yTDyqollfEMiDNk9Loa7BJWXasq+Abp6Veqv1M5WjufQfUyojntY7VQ?= =?us-ascii?Q?TatkbqAHWdSlm/NiAxLPPigXUvcQ/BAMtCLvKvpthJoKqHffcQl3Ck6EyuTO?= =?us-ascii?Q?2z4kjrbw7mWzh64qaRP81Lg+FxQ6k5Z9qEBCoDHcesoJxhNRdz6bUV9rPCz8?= =?us-ascii?Q?qg=3D=3D?= Content-Type: multipart/alternative; boundary="_000_PAXPR08MB6766B7D13322DE8A0F1545B99486APAXPR08MB6766eurp_" List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 X-OriginatorOrg: ny-central.org X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6766.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea5d917b-1654-4ce5-2e1f-08dbf4fe982a X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2023 19:24:11.4608 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 96573e63-211a-4cdb-be46-e3a366908d60 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4XKfin4ufK5WAnDJLqyUpnoyiwtDhiDpg4SzZxbonWDwEA4W1bP9alF/Nv8Rp8sQ1cRDuqvzKj3nqWnvWatw/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7832 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US] X-Rspamd-Queue-Id: 4SkYWL6190z3Yf3 --_000_PAXPR08MB6766B7D13322DE8A0F1545B99486APAXPR08MB6766eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Not sure - doesn't this run slock under root? It's not going to have any DI= SPLAY variable set, I assume? Chris ________________________________ From: owner-freebsd-hackers@freebsd.org = on behalf of Dr. Amr Osman Sent: Monday, December 4, 2023 7:24:30 PM To: freebsd-hackers@freebsd.org Subject: devd lid close event Hello, I have freeBSD 14 on Thinkpad x270, I just did do a fresh install and installed dwm and slock the issue is I want to make laptop lock screen whenever I close the lid here is my /usr/local/etc/devd/lid.conf ``` notify 10 { match "system" "ACPI"; match "subsystem" "Lid"; match "notify" "0x00"; action "/usr/local/bin/slock"; }; ``` here is my /var/run/devd.pipe when I close the lid ``` !system=3DACPI subsystem=3DLid type=3D\_SB_.LID_ notify=3D0x00 !system=3DAC= PI subsystem=3DLid type=3D\_SB_.LID_ notify=3D0x00 !system=3DACPI subsystem=3DSuspend type=3D\ notify=3D0x03 !system=3DIFNET subsystem=3Dwlan= 0 type=3DLINK_DOWN ``` what am I doing wrong? Thank You Dr. Amr Osman --_000_PAXPR08MB6766B7D13322DE8A0F1545B99486APAXPR08MB6766eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Not sure - doesn't this run slock under root? It's not go= ing to have any DISPLAY variable set, I assume?

Chris


From: owner-freebsd-hackers= @freebsd.org <owner-freebsd-hackers@freebsd.org> on behalf of Dr. Amr= Osman <dr3mro@gmail.com>
Sent: Monday, December 4, 2023 7:24:30 PM
To: freebsd-hackers@freebsd.org <freebsd-hackers@freebsd.org><= br> Subject: devd lid close event
 
Hello,
I have freeBSD 14 on Thinkpad x270,
I just did do a fresh install and installed dwm and slock
the issue is I want to make laptop lock screen whenever I close the lid

here is my /usr/local/etc/devd/lid.conf
```
notify 10 {
    match "system"     &n= bsp;  "ACPI";
    match "subsystem"    "Lid&= quot;;
    match "notify"     &n= bsp;  "0x00";
    action "/usr/local/bin/slock";
};

```
here is my /var/run/devd.pipe when I close the lid

```
!system=3DACPI subsystem=3DLid type=3D\_SB_.LID_ notify=3D0x00 !system=3DAC= PI
subsystem=3DLid type=3D\_SB_.LID_ notify=3D0x00 !system=3DACPI
subsystem=3DSuspend type=3D\ notify=3D0x03 !system=3DIFNET subsystem=3Dwlan= 0
type=3DLINK_DOWN
```

what am I doing wrong?

Thank You
Dr. Amr Osman

--_000_PAXPR08MB6766B7D13322DE8A0F1545B99486APAXPR08MB6766eurp_--