From unknown Tue Jun 17 01:44:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69182: home-xmodmap-service-type requires restart to work Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 18 Feb 2024 17:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69182 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 69182@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17082790906908 (code B ref -1); Sun, 18 Feb 2024 17:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2024 17:58:10 +0000 Received: from localhost ([127.0.0.1]:36514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rblQX-0001nA-CO for submit@debbugs.gnu.org; Sun, 18 Feb 2024 12:58:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:53956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rblQU-0001mW-Jz for submit@debbugs.gnu.org; Sun, 18 Feb 2024 12:58:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbQkP-0004Y4-UI for bug-guix@gnu.org; Sat, 17 Feb 2024 14:53:17 -0500 Received: from fout2-smtp.messagingengine.com ([103.168.172.145]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbQkN-0000E2-S1 for bug-guix@gnu.org; Sat, 17 Feb 2024 14:53:17 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 1D6AF13800AB for ; Sat, 17 Feb 2024 14:53:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 17 Feb 2024 14:53:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1708199593; x=1708285993; bh=pBYR4m4AMC HxGVH9XiiZClihsk3ZFuqOxQy+H64LcsI=; b=KmwZpDhPtwiwiaNsNKi7Nv3W5Y yoOhLpAzphAqCXsR6BRUQ2ybgRjLlYYPqqtiuCZqEoeHHMG8c/I/cB84OiqA4kRC TZDl9TzEmySYaGv26qJQlhbtr8ciAaneQoe9sSN51cQH7MXGMh88Mno2uUQqB5JQ qqHgxGrnutvS2o4gQHURkr1c52E3m9vVIzDRl58wKKCJAehfx9SzFNOE4tOBcj11 wuw8/2DyXNsQ/X2ftM0e8ZflQVR2ZdBAXIGzIGTJ8PaF2l0bM0v3xt9dWIfoevu/ t9FcJNhblSJZtmDIJbuTSJ/VZqL5LAu+KlzDJVB9fy2hhyfrXeLh2O1hcyrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708199593; x=1708285993; bh=pBYR4m4AMCHxGVH9XiiZClihsk3Z FuqOxQy+H64LcsI=; b=OzpgWrhXyAqmbV575JHjguU+I7YMTjjjNRk+nR6XCn/i EYHVigf1IrdVC7GBselhtyki5ajDdiriESu8CtPmiXdEkBO5KYi2F69muYbAEn7T d6T0bHNxLUGTdHMZox7uzKs2STrnUBdOPFdH+nsrZLK8eV6aKHWJRFtdE/wqecjM yGgq/hb9ZX8DE3FypzNBtZErG5esrRoArM2/nXclQhG1t06dpsZ0g3Vc44R6Jg2q bJ8euNzqY1NcDNOjtQFif6a7WUvK8XtlHS7QW/9CiTbkYT9s2XeJShU9gcJ9Izlj SfgNs7uLOii2YTrtgi64dHNGhHwBRpeyVCcu/r5HvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeggddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgfgsehtqhertd dtreejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdht vheqnecuggftrfgrthhtvghrnhepkeeigeegfffhlefhgfeiffevjeejhedvjeffieeife eiteelveduueeljeehheejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 17 Feb 2024 14:53:12 -0500 (EST) User-agent: mu4e 1.10.8; emacs 29.1 From: Ian Eure Date: Sat, 17 Feb 2024 11:38:54 -0800 Message-ID: <87r0hakgv0.fsf@retrospec.tv> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=103.168.172.145; envelope-from=ian@retrospec.tv; helo=fout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) I recently set up home-xmodmap-service-type so I could change the=20 PrtSc key on my ThinkPad into a Hyper modifier. This is my=20 configuration: (service home-xmodmap-service-type (home-xmodmap-configuration (key-map '("clear mod3" ("remove mod4" . "Hyper_L") ("keycode 107" . "Hyper_R") ("add mod3" . "Hyper_L Hyper_R"))))) However, after logging into an EXWM session, the PrtSc key is a=20 Super modifier, not Hyper. The service appears to be starting=20 successfully: l0p!ieure~$ herd status xmodmap Status of xmodmap: It is running since 11:20:59 AM (35 seconds ago). Running value is #t. It is enabled. Provides (xmodmap). Requires (). Will be respawned. The output of `xmodmap -pm' reports: xmodmap: up to 4 keys per modifier, (keycodes in=20 parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock control Control_L (0x25), Control_L (0x42), Control_R=20 (0x69) mod1 Alt_L (0x40), Alt_R (0x6c), Alt_L (0xcc),=20 Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 ISO_Level5_Shift (0xcb) mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce),=20 Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c) Some of my configuration is applied, while other parts are not: - "clear mod3" isn=E2=80=99t working; mod3 is ISO_Level5_Shift, which is=20 the default. - "remove mod4 =3D Hyper_L" isn=E2=80=99t working. Hyper_L is still on mod= 4=20 (which is the super modifier), which is the default. - "add mod3 =3D Hyper_L Hyper_R" isn=E2=80=99t working. - The "keycode 107 =3D Hyper_R" config *is* working, which is what=20 makes PrtSc a super modifier. If I restart the service, the modifiers work as expected: l0p!ieure~$ herd restart xmodmap Service xmodmap has been started. l0p!ieure~$ guix shell xmodmap -- xmodmap -pm xmodmap: up to 4 keys per modifier, (keycodes in=20 parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock control Control_L (0x25), Control_L (0x42), Control_R=20 (0x69) mod1 Alt_L (0x40), Alt_R (0x6c), Alt_L (0xcc),=20 Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 Hyper_R (0x6b), Hyper_L (0xcf) mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce) mod5 ISO_Level3_Shift (0x5c) I haven=E2=80=99t set up anything else that manipulates keymaps, so I=E2=80= =99m=20 not sure why this isn=E2=80=99t working after login. I had a suspicion that another service might be running after=20 xmodmap and changing the keymap. The only home service that looks=20 like it might do that is x11-display. However, copying=20 `home-xmodmap-service-type' and `my-xmodmap-shepherd-service' into=20 my home.scm and editing it to add (requirement '(x11-display)) to=20 the shepherd-service doesn=E2=80=99t fix the issue. This appears to be a timing problem. If I remove the service from=20 my home configuration, but manually run `guix shell xmodmap --=20 xmodmap /gnu/store/g3hgzx8za4qrrdgn5hjqd80gxkb6sifx-config' after=20 I log in (the file being the xmodmap configuration created by=20 `serialize-xmodmap-configuration'), the keymap is set up how I=20 declare it. So *what* home-xmodmap-service-type does is correct;=20 but *when* it does it is not. From unknown Tue Jun 17 01:44:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69182: home-xmodmap-service-type requires restart to work References: <87r0hakgv0.fsf@retrospec.tv> In-Reply-To: <87r0hakgv0.fsf@retrospec.tv> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 19 Feb 2024 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69182 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 69182@debbugs.gnu.org Received: via spool by 69182-submit@debbugs.gnu.org id=B69182.170837026828312 (code B ref 69182); Mon, 19 Feb 2024 19:18:01 +0000 Received: (at 69182) by debbugs.gnu.org; 19 Feb 2024 19:17:48 +0000 Received: from localhost ([127.0.0.1]:43426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc99A-0007MZ-B1 for submit@debbugs.gnu.org; Mon, 19 Feb 2024 14:17:48 -0500 Received: from 5.mo561.mail-out.ovh.net ([87.98.178.36]:38901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc995-0007MO-O5 for 69182@debbugs.gnu.org; Mon, 19 Feb 2024 14:17:46 -0500 Received: from director9.ghost.mail-out.ovh.net (unknown [10.108.2.205]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4Tdsjr5Gw7z1KLC for <69182@debbugs.gnu.org>; Mon, 19 Feb 2024 19:17:20 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-dnswc (unknown [10.108.54.198]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 1538A1FF6B for <69182@debbugs.gnu.org>; Mon, 19 Feb 2024 19:16:03 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-6684bf9d7b-dnswc with ESMTPSA id +FRJAPSo02UmWAIAllgtww (envelope-from ) for <69182@debbugs.gnu.org>; Mon, 19 Feb 2024 19:16:03 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-102R0046b30d6cb-c788-4be7-9efe-3e0db098b579, 680FF367F20DCC2A61CE5FD2F6C67E6496CC1BF2) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 From: Nicolas Graves Date: Mon, 19 Feb 2024 20:16:03 +0100 Message-ID: <87msrwjmdo.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 12174355696087130859 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepueekleeiteevfeekfedtfefftdeftdehjedujeejfffgffeuudejfffgleeivdfgnecuffhomhgrihhnpehsrhdrhhhtnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeeiledukedvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) Maybe that's because x11-display take a few milliseconds to start, and that xmodmap actually starts before x11-display is actually done loading. I've encountered this type of issue with emacs-server, where I used this solution on RDE, but it's emacs/service specific : https://lists.sr.ht/~abcdw/rde-devel/patches/48753 I can't help you more, I don't use x11 anymore, but if that's the issue, maybe go through the x11 documentation, find if you can start it with a pid file, and if that's the case, you can try using a background shepherd process waiting for the pid-file instead of a foreground one. -- Best regards, Nicolas Graves