On Mon, Apr 06, 2020 at 01:05:02PM +0200, Jakub Kądziołka wrote:
> On Mon, Apr 06, 2020 at 03:22:29AM +0200, pelzflorian (Florian Pelz) wrote:
> > On Mon, Apr 06, 2020 at 03:05:24AM +0200, pelzflorian (Florian Pelz) wrote:
> > > You could probably use an .xinitrc file like Arch or you could patch
> > > xorg-server to use your xkbcomp map by default.
> >
> > That is, instead of patching xorg-server, you would patch
> > xkeyboard-config’s xkb/symbols. I have not tried. Maybe better use
> > .xinitrc?
>
> That's not a terrible idea, though I'd rather have it apply even before
> I'm logged in. (I previously mentioned GDM, though I now realize that I
> actually use SLiM.) Is there an equivalent file I could use to run a
> command when the login manager is starting?
>
> Regards,
> Jakub Kądziołka
I thought it was sufficient to add the files both to your home
directory and to root’s because SLIM is run as root.
But: Actually it seems the gnu/services/xorg.scm is defined in a way
that does not run ~/.xinitrc. Sorry for not being helpful. I tried
but was *not* able to modify gnu/services/xorg.scm to run xkbcomp on a
custom ~/.Xkeymap file, although manual execution after the session
started works fine. Changing the xinitrc does not appear to work.
The attached changes are insufficient.
Regards,
Florian
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d0196a299e..5ddf41dafd 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -403,8 +403,13 @@ desktop session from the system or user profile will be
used."
;; The '--login' option is supported at least by Bash and zsh.
(execl shell shell "--login" "-c"
- (string-join (cons command args)))))
-
+ (string-join (cons*
+ #$(file-append xkbcomp "/bin/xkbcomp")
+ (string-append (getenv "HOME") "/.Xkeymap")
+ (getenv "DISPLAY")
+ ";"
+ command args)))))
+
(define system-profile
"/run/current-system/profile")