From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iJFbF2LTFWTFQAEASxT56A (envelope-from ) for ; Sat, 18 Mar 2023 16:06:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id LExXF2LTFWSAPwAA9RJhRA (envelope-from ) for ; Sat, 18 Mar 2023 16:06:10 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C72F43110B for ; Sat, 18 Mar 2023 16:06:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdY7o-0002m0-KW; Sat, 18 Mar 2023 11:05:40 -0400 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 1pd9NW-00059o-G4 for help-guix@gnu.org; Fri, 17 Mar 2023 08:40:16 -0400 Received: from marioforzanini.com ([2a05:f480:1c00:436:5400:4ff:fe01:c56f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd9NT-0000MD-Hx for help-guix@gnu.org; Fri, 17 Mar 2023 08:40:14 -0400 Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marioforzanini.com; s=mail; t=1679056808; bh=QppMZnHIAtwYNVSP+pOrTxWyF+Z2sPiEVBDJOrNCcsQ=; h=Date:Subject:To:References:From:Cc:In-Reply-To:From; b=Bs8j1uiulF0ZiUPYH47H0+H43qjqXuXUunPbqazQz+GQkqtzw8ZHYC6Yv+zDsS08k hO6dAlBzx79x8lnqcFMjyBsTLfVDmXRrt4Z5/NxLQLt60/wbENLVNYMLDigpkPVe5M S/us7OOwiNKLENsFAs5y/B0Dd6SWS2m28JloSOd3BaG+SQpV5iSQNKo/GKP5URlG+b vasbwsmvpOw/0aR6adShI/+722fywCDGFUa2tpebGOAjMSQKUym7qHqXgigAJ2Nobb LtPhz08XiPU1j1s53/iZxJnqefQyjDfSHeOzKqkd5FLkxPiYbzhipBIfEyYOUrLa7o 6XSciLpvb8mLg== Date: Fri, 17 Mar 2023 13:40:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: Execute startxbmap at login to map Ctrl Caps to Escape To: Rodrigo Morales References: <9132a50b-4cd3-4690-d783-d311f481fafa@marioforzanini.com> Content-Language: en-US, it From: Mario Forzanini Cc: help-guix@gnu.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2a05:f480:1c00:436:5400:4ff:fe01:c56f; envelope-from=mf@marioforzanini.com; helo=marioforzanini.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 18 Mar 2023 11:05:39 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=marioforzanini.com header.s=mail header.b=Bs8j1uiu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=marioforzanini.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679151970; a=rsa-sha256; cv=none; b=a1ZkJrWyOXmWqMKkf0Y1vvgQ2sQleta3Opjx5luPVsQD82OyAGytZWHU/FVkM8inpeMGga B1d8KCkDXBzc2SmIC7YsohBTJe8/6GJ88DOupuVDooeZqn5ytgJo3kT50P6mkdZGk2tSam L5Ueunw13CInLATAPWHprX1E40iZ9UAbtsercH8jJFT/05lQJUs7PRV4FuQv6ORN9ioZcD RXnHLzSfatnnP13D4E7VaVDW5f6Wjlnw6J+DvXlgYCowkq8HU+Rz6VEhM9PxaJpgfjrKyt IbPhpJrBI1HGQihEEuE7U7NjHfShhfDqQ4W0bbc+igQ+XcM+yOY5Of78rQv90g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679151970; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=cs6hJGQ8YUE3h0dEkCRr46VZJgiWtShulyTDXn6NWjs=; b=fq3ZvGhH3nSrP/0KCHI6NVNy9vJUU2EaJ2xTxkX14U89PIuiXyDalxRUZlrehCNcBoNxue FIt9aNLAGRBQennObfUdbiCCsNbO7DFLaUb+e5fd4SxtWkPb4RdFNKjgTJj0Mwl1OP75+z Xsc2vXf5RyxLCFEM/wEhF81UET/lcALbNVAS5Inp2aEPsp/9R5PJGzG+Y9DuDWDCyhDP4C tkGe9z0JMiTkYVxYKtqbc6EsWqWFgAOJlROJkx2SpaNorS2I/pj7F4cQf7Dor4tTgNsLhy VzdeuwP+4FPdAbFa5JgB71tNGPY5gMKYuwpyM6Tcy8a/S26Kp4GuioRUOpT07Q== X-Migadu-Spam-Score: -3.25 X-Spam-Score: -3.25 X-Migadu-Queue-Id: C72F43110B X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=marioforzanini.com header.s=mail header.b=Bs8j1uiu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=marioforzanini.com X-TUID: otAvNNe0gTYp On 3/17/23 4:18 AM, Rodrigo Morales wrote: > Thanks for the quick answer. After reading your answer and the relevant > part of the documentation, I understand that this configuration needs to > be set at the system level (i.e. /etc/config.scm). Wouldn't it be > possible to set a layout for an user-account? Well the default layout for the Xserver is set when the server starts, so there is no way to know which user is running the system until login. After login you might be able to set the keyboard layout autostarting a script that runs setxkbmap or xcape, or any other program you might need, this depends on the desktop environment/window manager you are using; in the case of EXWM you might add something to init.el as you were suggesting in your first email. In my setup GDM starts dwm directly from ~/.xsession which is analogous to an ~/.xinitrc, you may try experimenting with this file if the system configuration fails you. > The code block below shows my configuration which was generated using > the graphical installation (besides adding new users, I haven't made any > modification). As you can see below, I have two users: rdrg20 and > rdrg21, I would like rdrg20 to have the "us" keyboard layout and I would > like rdrg21 to have the "fr" (French) keyboard layout. > > ,---- > | (use-modules (gnu)) > | (use-service-modules cups desktop networking ssh xorg) > | > | (operating-system > |   (locale "en_US.utf8") > |   (timezone "America/Lima") > |   (keyboard-layout (keyboard-layout "us")) > |   (host-name "sony") > | > |   ;; The list of user accounts ('root' is implicit). > |   (users (cons* (user-account > |                   (name "rdrg") > |                   (comment "This is a comment for user rdrg") > |                   (group "users") > |                   (home-directory "/home/rdrg") > |                   (supplementary-groups '("wheel" "netdev" "audio" > "video"))) > | (user-account > |                   (name "rdrg20") > |                   (comment "This is a comment for user rdrg20") > |                   (group "users") > |                   (home-directory "/home/rdrg20") > |                   (supplementary-groups '("wheel" "netdev" "audio" > "video"))) > | (user-account > |                   (name "rdrg21") > |                   (comment "This is a comment for user rdrg21") > |                   (group "users") > |                   (home-directory "/home/rdrg21") > |                   (supplementary-groups '("wheel" "netdev" "audio" > "video"))) > | (user-account > |                   (name "rdrg22") > |                   (comment "This is a comment for user rdrg22") > |                   (group "users") > |                   (home-directory "/home/rdrg22") > |                   (supplementary-groups '("wheel" "netdev" "audio" > "video"))) > |                 %base-user-accounts)) > | > |   ;; Packages installed system-wide.  Users can also install packages > |   ;; under their own account: use 'guix search KEYWORD' to search > |   ;; for packages and 'guix install PACKAGE' to install a package. > |   (packages (append (list (specification->package "emacs") > |                           (specification->package "emacs-exwm") > |                           (specification->package > |                            "emacs-desktop-environment") > |                           (specification->package "nss-certs")) > |                     %base-packages)) > | > |   ;; Below is the list of system services.  To search for available > |   ;; services, run 'guix system search KEYWORD' in a terminal. > |   (services > |    (append (list > | > |                  ;; To configure OpenSSH, pass an 'openssh-configuration' > |                  ;; record as a second argument to 'service' below. > |                  (service openssh-service-type) > |                  (set-xorg-configuration > |                   (xorg-configuration (keyboard-layout keyboard-layout)))) > | > |            ;; This is the default list of services we > |            ;; are appending to. > |            %desktop-services)) > |   (bootloader (bootloader-configuration > |                 (bootloader grub-efi-bootloader) > |                 (targets (list "/boot/efi")) > |                 (keyboard-layout keyboard-layout))) > |   (swap-devices (list (swap-space > |                         (target (uuid > | >  "21a4d7a3-b35b-45e1-9d91-e4fa97a593c0"))))) > | > |   ;; The list of file systems that get "mounted".  The unique > |   ;; file system identifiers there ("UUIDs") can be obtained > |   ;; by running 'blkid' in a terminal. > |   (file-systems (cons* (file-system > |                          (mount-point "/boot/efi") > |                          (device (uuid "E04D-B82E" > |                                        'fat32)) > |                          (type "vfat")) > |                        (file-system > |                          (mount-point "/") > |                          (device (uuid > |                                   "67aa77a1-4cb4-4cf5-bca6-ea51c4e5632e" > |                                   'ext4)) > |                          (type "ext4")) %base-file-systems))) > `---- In your system configuration you can also specify multiple keyboard layouts and a key combination to switch between them with an option like 'grp:alt_shift_toggle', see the relevant docs: https://guix.gnu.org/en/manual/en/html_node/Keyboard-Layout.html There may also be some other way I'm not aware of to set the keyboard layout per user, if someone else on the mailing list knows how to do this, feel free to correct me or suggest other possible ways. -- Mario