Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2023 19:24:11 +0000
From:      Christian Moerz <freebsd@ny-central.org>
To:        "Dr. Amr Osman" <dr3mro@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: devd lid close event
Message-ID:  <PAXPR08MB6766B7D13322DE8A0F1545B99486A@PAXPR08MB6766.eurprd08.prod.outlook.com>
In-Reply-To: <CAEYFr1A0_qe5BJR_FVnkEEL1bdYZHbSeidqy6L4mZbVtzROKuw@mail.gmail.com>
References:  <CAEYFr1A0_qe5BJR_FVnkEEL1bdYZHbSeidqy6L4mZbVtzROKuw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Not sure - doesn't this run slock under root? It's not going 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>
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=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00 !system=ACPI
subsystem=Lid type=\_SB_.LID_ notify=0x00 !system=ACPI
subsystem=Suspend type=\ notify=0x03 !system=IFNET subsystem=wlan0
type=LINK_DOWN
```

what am I doing wrong?

Thank You
Dr. Amr Osman


[-- Attachment #2 --]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto">Not sure - doesn't this run slock under root? It's not going to have any DISPLAY variable set, I assume?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Chris</div>
<div><br>
</div>
<div dir="auto" id="ms-outlook-mobile-signature"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> owner-freebsd-hackers@freebsd.org &lt;owner-freebsd-hackers@freebsd.org&gt; on behalf of Dr. Amr Osman &lt;dr3mro@gmail.com&gt;<br>
<b>Sent:</b> Monday, December 4, 2023 7:24:30 PM<br>
<b>To:</b> freebsd-hackers@freebsd.org &lt;freebsd-hackers@freebsd.org&gt;<br>
<b>Subject:</b> devd lid close event</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hello,<br>
I have freeBSD 14 on Thinkpad x270,<br>
I just did do a fresh install and installed dwm and slock<br>
the issue is I want to make laptop lock screen whenever I close the lid<br>
<br>
here is my /usr/local/etc/devd/lid.conf<br>
```<br>
notify 10 {<br>
&nbsp;&nbsp;&nbsp; match &quot;system&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ACPI&quot;;<br>
&nbsp;&nbsp;&nbsp; match &quot;subsystem&quot;&nbsp;&nbsp;&nbsp; &quot;Lid&quot;;<br>
&nbsp;&nbsp;&nbsp; match &quot;notify&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;0x00&quot;;<br>
&nbsp;&nbsp;&nbsp; action &quot;/usr/local/bin/slock&quot;;<br>
};<br>
<br>
```<br>
here is my /var/run/devd.pipe when I close the lid<br>
<br>
```<br>
!system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00 !system=ACPI<br>
subsystem=Lid type=\_SB_.LID_ notify=0x00 !system=ACPI<br>
subsystem=Suspend type=\ notify=0x03 !system=IFNET subsystem=wlan0<br>
type=LINK_DOWN<br>
```<br>
<br>
what am I doing wrong?<br>
<br>
Thank You<br>
Dr. Amr Osman<br>
<br>
</div>
</span></font></div>
</body>
</html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PAXPR08MB6766B7D13322DE8A0F1545B99486A>