EMACSLOADPATH not set when using Guix System + Guix Home +

  • Open
  • quality assurance status badge
Details
2 participants
  • Andrew Tropin
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 20 Jul 2022 12:45
EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate
(address . bug-guix@gnu.org)
8f5cae4c-a84f-f5e2-d4fa-c60fdbf330cd@telenet.be
Hi,
(the SLIM + Mate might be irrelevant, untested)
I am using Guix System and Guix Home. In Guix Home, I've added the
"emacs" and "emacs-magit" packages (and some others):
Toggle quote (21 lines)
> (home-environment
>   (packages
>     (specifications->packages
>       (list "git" "irssi" "evolution" "openssh" "gnupg" "htop"
>             "bash" "coreutils" "bash-completion"
>             "emacs" "emacs-magit" "emacs-paredit"
>             "icedove" "gnunet" "seahorse" #;"icedove-wayland")))
>   (services
>     (list (service
>             home-bash-service-type
>             (home-bash-configuration
>               (aliases
>                 '(("grep" . "grep --color=auto")
>                   ("ll" . "ls -l")
>                   ("ls" . "ls -p --color=auto")))
>               (bashrc
>                 (list (local-file ".bashrc" "bashrc")))
>               (bash-profile
>                 (list (local-file
>                         ".bash_profile"
>                         "bash_profile"))))))))
For completeness, here is the .bash_profile and .bashrc (unmodified from
base installation, except for removing a redundant alias):
Toggle quote (2 lines)
> # Honor per-interactive-shell startup file
> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
and
Toggle quote (28 lines)
> # Bash initialization for interactive non-login shells and
> # for remote shells (info "(bash) Bash Startup Files").
>
> # Export 'SHELL' to child processes.  Programs such as 'screen'
> # honor it and otherwise use /bin/sh.
> export SHELL
>
> if [[ $- != *i* ]]
> then
>     # We are being invoked from a non-interactive shell.  If this
>     # is an SSH session (as in "ssh host command"), source
>     # /etc/profile so we get PATH and other essential variables.
>     [[ -n "$SSH_CLIENT" ]] && source /etc/profile
>
>     # Don't do anything else.
>     return
> fi
>
> # Source the system-wide file.
> source /etc/bashrc
>
> # Adjust the prompt depending on whether we're in 'guix environment'.
> if [ -n "$GUIX_ENVIRONMENT" ]
> then
>     PS1='\u@\h \w [env]\$ '
> else
>     PS1='\u@\h \w\$ '
> fi
After a "guix home reconfigure" and after a few reboots, I tried out
emacs-magit, but there was no match for the "M-x magit-status".  It
turned out that $EMACSLOADPATH was unset. However, it is set in
~/.guix-home/profile/etc/profile:
Toggle quote (23 lines)
> # Source this file to define all the relevant environment variables in
> Bash
> # for this profile.  You may want to define the 'GUIX_PROFILE' environment
> # variable to point to the "visible" name of the profile, like this:
> #
> #  GUIX_PROFILE=/path/to/profile ; \
> #  source /path/to/profile/etc/profile
> #
> # When GUIX_PROFILE is undefined, the various environment variables refer
> # to this specific profile generation.
>
> export
> PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/bin:${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry>
> export
> GIT_EXEC_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/libexec/git-core"
> export
> BASH_LOADABLES_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/lib/bash${BASH_LOADABLES_PATH:+:}$BA>
> export
> INFOPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/info${INFOPATH:+:}$INFOPATH"
> export
> EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/emacs/site-lisp${EMACSLOADPATH:+:}$E>
> export
> XDG_DATA_DIRS="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
(nevermind the >, that's just me not making the terminal wide enough
before copying)
Weirdly, EMACSLOADPATH is not set (tested in a terminal), but PATH,
GIT_EXEC_PATH, BASH_LOADABLES_PATH, INFOPATH and XDG_DATA_DIRS are set. 
Also, inside a login shell (bash --login) (started inside the graphical
environment), EMACSLOADPATH is not set.
Also, if I do "source ~/.guix-home/setup-environment", then
$EMACSLOADPATH" is set.
TBI ...
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 20 Jul 2022 12:59
EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate
aa7a880b-9aa1-fd8d-995a-f40eb18579aa@telenet.be
retitle 56661 EMACSLOADPATH not set when using Guix System + Guix Home +
SDDM + Mate
Correction, I am using SDDM, not SLIM.
Attachment: OpenPGP_signature
A
A
Andrew Tropin wrote on 20 Jul 2022 14:08
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate
87v8rsoukp.fsf@trop.in
On 2022-07-20 12:45, Maxime Devos wrote:
Toggle quote (34 lines)
> Hi,
>
> (the SLIM + Mate might be irrelevant, untested)
>
> I am using Guix System and Guix Home. In Guix Home, I've added the
> "emacs" and "emacs-magit" packages (and some others):
>
>> (home-environment
>>   (packages
>>     (specifications->packages
>>       (list "git" "irssi" "evolution" "openssh" "gnupg" "htop"
>>             "bash" "coreutils" "bash-completion"
>>             "emacs" "emacs-magit" "emacs-paredit"
>>             "icedove" "gnunet" "seahorse" #;"icedove-wayland")))
>>   (services
>>     (list (service
>>             home-bash-service-type
>>             (home-bash-configuration
>>               (aliases
>>                 '(("grep" . "grep --color=auto")
>>                   ("ll" . "ls -l")
>>                   ("ls" . "ls -p --color=auto")))
>>               (bashrc
>>                 (list (local-file ".bashrc" "bashrc")))
>>               (bash-profile
>>                 (list (local-file
>>                         ".bash_profile"
>>                         "bash_profile"))))))))
>
> For completeness, here is the .bash_profile and .bashrc (unmodified from
> base installation, except for removing a redundant alias):
>
>> # Honor per-interactive-shell startup file
>> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
Hi Maxime,
According to the documentation to get all the environment variables set
correctly you either need to manage your login shell with Guix Home or
do additional configuration of your shell:
From what I see you manage bash with Guix Home, so according to the
source code your bash_profile should look differently from what you've
posted and must contain `source ~/.profile` in it:
This line makes your login shell source .profile, which sources
setup-environment, which sources ~/.guix-home/profile/etc/profile, which
sets EMACSLOADPATH.
Additionally, I've built the home environment you provided and it
contains the code I mentioned above.
Make sure that ~/.bash_profile and ~/.guix-home/files/.bash_profile
point to the same file in the store.
Toggle quote (95 lines)
>
> and
>
>> # Bash initialization for interactive non-login shells and
>> # for remote shells (info "(bash) Bash Startup Files").
>>
>> # Export 'SHELL' to child processes.  Programs such as 'screen'
>> # honor it and otherwise use /bin/sh.
>> export SHELL
>>
>> if [[ $- != *i* ]]
>> then
>>     # We are being invoked from a non-interactive shell.  If this
>>     # is an SSH session (as in "ssh host command"), source
>>     # /etc/profile so we get PATH and other essential variables.
>>     [[ -n "$SSH_CLIENT" ]] && source /etc/profile
>>
>>     # Don't do anything else.
>>     return
>> fi
>>
>> # Source the system-wide file.
>> source /etc/bashrc
>>
>> # Adjust the prompt depending on whether we're in 'guix environment'.
>> if [ -n "$GUIX_ENVIRONMENT" ]
>> then
>>     PS1='\u@\h \w [env]\$ '
>> else
>>     PS1='\u@\h \w\$ '
>> fi
>
> After a "guix home reconfigure" and after a few reboots, I tried out
> emacs-magit, but there was no match for the "M-x magit-status".  It
> turned out that $EMACSLOADPATH was unset. However, it is set in
> ~/.guix-home/profile/etc/profile:
>
>> # Source this file to define all the relevant environment variables in
>> Bash
>> # for this profile.  You may want to define the 'GUIX_PROFILE' environment
>> # variable to point to the "visible" name of the profile, like this:
>> #
>> #  GUIX_PROFILE=/path/to/profile ; \
>> #  source /path/to/profile/etc/profile
>> #
>> # When GUIX_PROFILE is undefined, the various environment variables refer
>> # to this specific profile generation.
>>
>> export
>> PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/bin:${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry>
>> export
>> GIT_EXEC_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/libexec/git-core"
>> export
>> BASH_LOADABLES_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/lib/bash${BASH_LOADABLES_PATH:+:}$BA>
>> export
>> INFOPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/info${INFOPATH:+:}$INFOPATH"
>> export
>> EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/emacs/site-lisp${EMACSLOADPATH:+:}$E>
>> export
>> XDG_DATA_DIRS="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>
> (nevermind the >, that's just me not making the terminal wide enough
> before copying)
>
> Weirdly, EMACSLOADPATH is not set (tested in a terminal), but PATH,
> GIT_EXEC_PATH, BASH_LOADABLES_PATH, INFOPATH and XDG_DATA_DIRS are set. 
> Also, inside a login shell (bash --login) (started inside the graphical
> environment), EMACSLOADPATH is not set.
>
> Also, if I do "source ~/.guix-home/setup-environment", then
> $EMACSLOADPATH" is set.
>
> TBI ...
>
> Greetings,
> Maxime.
>
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
>
> xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
> xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
> ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
> CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
> /gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
> LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
> kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
> CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
> ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
> Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
> k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
> AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
> fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA==
> =OVqp
> -----END PGP PUBLIC KEY BLOCK-----
--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLX8DYACgkQIgjSCVjB
3rCI2w//cbjKoV5mPaR+mpBRXLYOHqKsR+baa+B8Wyl6RNhmnitSW4fUgKa3KHJ/
1uGSQOtqdddrJCaK4XPs7n7sOfCKts1r0dA5eLCVOFHzAzgvILfnOZ6amdg9LZRi
NgKYIZ3emTI7TE35rNcb6Rykyo6vspBmTDmZ6r0Pz7sewqYVoR3JMuOZRdm3weiy
wmosutnAaBVuTKkS9lzRGn/xPL+yxUd4jHw9l6cBmpLkTRu9vlVSpKj0p1qoI0Y1
V1zwDUzkBYIeOdXPscE32UyPC/DI0AQRcpq2vzOrjfFuGmfISa805ajKf4cfK/VL
3vKbSd4hvGhKp8hEVsKPd+FDVh+m9KwzNc8YznTxEh0kC32+FkDumLlo41kMely9
rPoXcy/Ipy4Bq4wRAIzuXLhIo++t5X83Gb8dn3UIViuuuTEWz87AtOw+UV5+JMB4
YKrDPVqADIDXRqY/Z1CuKRK+LA1AyBPXcQAFqmtzRP4U5GIeCDww20QWDIn9EqGu
raMkNZmQVcV9RN/T2l3CWC+Xb3iKpzr9pMPjGtedxGH7rlLqM5VdUiMVEEfERTB6
hpnyk+eS6VZJGHqhuj1ttsUXwP0QR8DMRCbCcarH+qDiAjUwiPFpxqw1R+24fvyw
2NRg+6TOGokQWs1P2UCRIHgLrTRGcVKVQyQA98CHu+wcV5WuSNI=
=mTEd
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 20 Jul 2022 14:30
5e3f98c8-eeb1-909b-8407-ef55f01a6881@telenet.be
On 20-07-2022 14:08, Andrew Tropin wrote:
Toggle quote (6 lines)
> Hi Maxime,
>
> According to the documentation to get all the environment variables set
> correctly you either need to manage your login shell with Guix Home or
> do additional configuration of your shell:
> https://guix.gnu.org/manual/devel/en/html_node/Configuring-the-Shell.html
I am not using a login shell, though I suppose there might be one under
the hood somewhere (IIRC, and if it hasn't changed, some login managers
are wrapped in Guix System to insert a bash --login in-between). Even if
I am using a (non-login) shell, there's still an issue: if I start an
application via the graphical things, they don't get all the environment
variables (I tested this by opening a terminal that starts bash and
doing "echo $EMACSLOADPATH", but that a shell is used for the test seems
irrelevant here to me).
Toggle quote (1 lines)
> From what I see you manage bash with Guix Home,
I am not. I just keep the default ~/.bash_profile etc that a fresh Guix
System install gave me and the only reason bash_profile things appear in
the home configuration is because "guix home import" generated that. I'm
not managing anything, just keeping the defaults.
Toggle quote (3 lines)
> so according to the
> source code your bash_profile should look differently from what you've
> posted and must contain `source ~/.profile` in it:
~/.bash_profile does contain that line:
# Set up the system, user profile, and related variables.
# /etc/profile will be sourced by bash automatically
# Set up the home environment profile.
if [ -f ~/.profile ]; then source ~/.profile; fi
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
However, .bash_profile (the one from the local-file) does not:
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
Toggle quote (3 lines)
>
> This line makes your login shell
I am not using a login shell but a graphical environment -- the only
reason I actually use a shell at all is because I find it more
convenient to open a terminal and type "emacs" than to look in the
graphical desktop thingy for the Emacs icon. Also, I'm not finding Emacs
here even though in the previous installation of Guix System (GDM + Mate
IIRC, without Guix Home but with "guix install ...".  Icedove isn't
appearing there either, though the browser is.
I recall that it login shells were not necessary on Guix System +
~/.guix-profile (without Guix Home), at least for the desktop
environment combination I used back then, though it was required on my
Debian system to do "bash --login".  I can do "bash --login" on my Guix
System + Guix Home setup to start a login shell, but that would be a
regression.
Toggle quote (9 lines)
> source .profile, which sources
> setup-environment, which sources ~/.guix-home/profile/etc/profile, which
> sets EMACSLOADPATH.
>
> Additionally, I've built the home environment you provided and it
> contains the code I mentioned above.
>
> Make sure that ~/.bash_profile and ~/.guix-home/files/.bash_profile
> point to the same file in the store.
antipode@antipode ~$ ls -l .bash_profile
lrwxrwxrwx 1 antipode users 56 19 jul 22:14 .bash_profile ->
/gnu/store/1cq87qf8zccxlnkjwifcyhawmxvy7wfw-bash_profile
antipode@antipode ~$ ls -l ~/.guix-home/files/.bash_profile
lrwxrwxrwx 1 root root 56  1 jan  1970
/home/antipode/.guix-home/files/.bash_profile ->
/gnu/store/1cq87qf8zccxlnkjwifcyhawmxvy7wfw-bash_profile
They do.  Also, shouldn't ~/.bash_profile point to
~/.guix-home/files/.bash_profile instead of directly to the store, to be
more atomic (unrelated to #56661 though), like done for symlinks in /etc
in Guix System?
Greetings,
Maxime.
Attachment: OpenPGP_signature
A
A
Andrew Tropin wrote on 20 Jul 2022 19:47
87r12fbrrq.fsf@trop.in
On 2022-07-20 14:30, Maxime Devos wrote:

Toggle quote (23 lines)
> On 20-07-2022 14:08, Andrew Tropin wrote:
>> Hi Maxime,
>>
>> According to the documentation to get all the environment variables set
>> correctly you either need to manage your login shell with Guix Home or
>> do additional configuration of your shell:
>> https://guix.gnu.org/manual/devel/en/html_node/Configuring-the-Shell.html
>
> I am not using a login shell, though I suppose there might be one under
> the hood somewhere (IIRC, and if it hasn't changed, some login managers
> are wrapped in Guix System to insert a bash --login in-between). Even if
> I am using a (non-login) shell, there's still an issue: if I start an
> application via the graphical things, they don't get all the environment
> variables (I tested this by opening a terminal that starts bash and
> doing "echo $EMACSLOADPATH", but that a shell is used for the test seems
> irrelevant here to me).
>
>> From what I see you manage bash with Guix Home,
> I am not. I just keep the default ~/.bash_profile etc that a fresh Guix
> System install gave me and the only reason bash_profile things appear in
> the home configuration is because "guix home import" generated that. I'm
> not managing anything, just keeping the defaults.

You are ;) Declaring home-bash-service-type in home environment means
that Guix Home will generate and install bash configurations, which
means you are managing bash configurations with Guix Home.

Toggle quote (16 lines)
>> so according to the
>> source code your bash_profile should look differently from what you've
>> posted and must contain `source ~/.profile` in it:
>
> ~/.bash_profile does contain that line:
>
> # Set up the system, user profile, and related variables.
> # /etc/profile will be sourced by bash automatically
> # Set up the home environment profile.
> if [ -f ~/.profile ]; then source ~/.profile; fi
>
> # Honor per-interactive-shell startup file
> if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
> # Honor per-interactive-shell startup file
> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

You can remove your original bash_profile, because it's just duplicates
last two lines, Guix Home adds the same content as skeletons provided
during system installation and a little more.

Toggle quote (27 lines)
>
> However, .bash_profile (the one from the local-file) does not:
>
> # Honor per-interactive-shell startup file
> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
>
>
>> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shells.scm#n440
>>
>> This line makes your login shell
>
> I am not using a login shell but a graphical environment -- the only
> reason I actually use a shell at all is because I find it more
> convenient to open a terminal and type "emacs" than to look in the
> graphical desktop thingy for the Emacs icon. Also, I'm not finding Emacs
> here even though in the previous installation of Guix System (GDM + Mate
> IIRC, without Guix Home but with "guix install ...".  Icedove isn't
> appearing there either, though the browser is.
>
> I recall that it login shells were not necessary on Guix System +
> ~/.guix-profile (without Guix Home), at least for the desktop
> environment combination I used back then, though it was required on my
> Debian system to do "bash --login".  I can do "bash --login" on my Guix
> System + Guix Home setup to start a login shell, but that would be a
> regression.
>

I'm not sure how your login/display manager works, but for X11 session
sourcing ~/.profile from ~/.xsession should do the trick.

Put the following content to your ~/.xsession:
Toggle snippet (3 lines)
. ~/.profile

Or add the following service to your home environment:
Toggle snippet (7 lines)
(simple-service
'xsession-init-file
home-files-service-type
`((".xsession" ,(plain-file "xsession" ". ~/.profile"))))


Toggle quote (24 lines)
>> source .profile, which sources
>> setup-environment, which sources ~/.guix-home/profile/etc/profile, which
>> sets EMACSLOADPATH.
>>
>> Additionally, I've built the home environment you provided and it
>> contains the code I mentioned above.
>>
>> Make sure that ~/.bash_profile and ~/.guix-home/files/.bash_profile
>> point to the same file in the store.
>
> antipode@antipode ~$ ls -l .bash_profile
> lrwxrwxrwx 1 antipode users 56 19 jul 22:14 .bash_profile ->
> /gnu/store/1cq87qf8zccxlnkjwifcyhawmxvy7wfw-bash_profile
>
> antipode@antipode ~$ ls -l ~/.guix-home/files/.bash_profile
> lrwxrwxrwx 1 root root 56  1 jan  1970
> /home/antipode/.guix-home/files/.bash_profile ->
> /gnu/store/1cq87qf8zccxlnkjwifcyhawmxvy7wfw-bash_profile
>
> They do.  Also, shouldn't ~/.bash_profile point to
> ~/.guix-home/files/.bash_profile instead of directly to the store, to be
> more atomic (unrelated to #56661 though), like done for symlinks in /etc
> in Guix System?

No.

Activation is not atomic process anyway.

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLYP6kACgkQIgjSCVjB
3rBMLA/+MSPqmjRtatqADCj7R5byN2Dt0/Lz4dJsg0VFALl/WLTSyUil89GVFfTz
bUa5ob6fpwnNQGBw2XVRekdee9ke5fQEhAMrgtY3841U7ghQmZvBTQU/ORQGMdq8
rTqZ2XUOOvLnrw0KXwAcZCtEWL3CdhY4N9FZ2IWnBoOtisM8K/VGZemvvzzqTgjI
U14SFUQO1M4zO4bDAN5mb3HnOc1a+Soz1N4ETk2LbrI/vgQJLAFY5790SgqwtZdu
vQDiVkzIkY8fIekuK7xI4foUC51/lc79V7dThYsYIL5CCNZUWfJrsdavL1gVFe5u
1ujayjsfBEvLtzIrWx5ZINSRO6cUGvo2WoV0eiOb/UIKd8KxFTfJQGCafE9zVS10
J92ZjHt5RpKLjghfsnijEJDsFdUEnLdTeqH53ewKpEx4fnJk9Voo1aMrMT36/D/5
eY8FC4gE+JrFkpLBSh0r/ec0k8+Mu00T0D6wjzIvh3yVnRLKnu4eF5Da+rJr4Qv2
oQF9GCiLzVkTEgVnxZBWxsfVv4vCJiCwJhk2IIdJyMQO6xdkTNEZI9oob0BDK5HW
slds2SmPaApcFY1XSCwgQTqaxNtAgavFDPc3Xj/5Rjg3sEt72NlY8G/ZteF20y/3
X2EPQGVuRiVeunJ0r3oLP4tuj75dszx0bpIpypcLRYj5OkqpvDQ=
=POMn
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 22 Jul 2022 11:28
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate
c9ba054b-1549-d95d-ef9c-9e5c59c398f2@telenet.be
On 20-07-2022 19:47, Andrew Tropin wrote:
Toggle quote (15 lines)
> I'm not sure how your login/display manager works, but for X11 session
> sourcing ~/.profile from ~/.xsession should do the trick.
>
> Put the following content to your ~/.xsession:
> --8<---------------cut here---------------start------------->8---
> . ~/.profile
> --8<---------------cut here---------------end--------------->8---
>
> Or add the following service to your home environment:
> --8<---------------cut here---------------start------------->8---
> (simple-service
> 'xsession-init-file
> home-files-service-type
> `((".xsession" ,(plain-file "xsession" ". ~/.profile"))))
> --8<---------------cut here---------------end--------------->8---
Tweaking .xsession was not necessary in my previous Guix System without
Home setup, so this seems like a work-around to me, not a solution.
However, possibly this is a bug in the setup of the login manager I used
(previously I used another one), so I will try a different login manager
as possibly Guix Home is not related here.
Toggle quote (7 lines)
> They do.  Also, shouldn't ~/.bash_profile point to
> ~/.guix-home/files/.bash_profile instead of directly to the store, to be
> more atomic (unrelated to #56661 though), like done for symlinks in /etc
> in Guix System?
> No.
>
> Activation is not atomic process anyway.
I know it is not atomic. That's the issue I noted, an issue that seems
to have a partial solution I also noted.
With current file system APIs, it cannot be made fully atomic, but as
done for Guix System things, it can at least be made _partially_ atomic
-- i.e., when no files are added or removed relative to the previous
generation, the symlink switching is atomic.
(A form of 'Perfect enemy of the good' -- if perfect (= 100% atomic)
cannot be found, then that's no reason to throw away good (= mostly
atomic).)
(Also an instance of is-ought: it is not atomic, but that doesn't mean
it should be non-atomic.)
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 22 Jul 2022 11:32
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate
015217f5-6d66-d8ae-84c0-bb5aae3b201b@telenet.be
On 20-07-2022 19:47, Andrew Tropin wrote:
Toggle quote (2 lines)
> I'm not sure how your login/display manager works, but for X11 session
> sourcing ~/.profile from ~/.xsession should do the trick.
Me neither, and I don't particularly care.
If this is something that needs to be done, shouldn't _Guix System_
create that file by default, for the same reason that Guix System
creates a ~/.profile and ~/.bash_profile by default?  I don't see why I
would have to do that myself.
Greetings,
Maxime
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 22 Jul 2022 12:17
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate
ad5848b0-47b9-5dbf-02d3-609558dcf017@telenet.be
On 22-07-2022 11:28, Maxime Devos wrote:
Toggle quote (3 lines)
> However, possibly this is a bug in the setup of the login manager I
> used (previously I used another one), so I will try a different login
> manager as possibly Guix Home is not related here.
For GDM, the issue does not occur (and I don't have to create ~/.xsession).
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 22 Jul 2022 12:24
Re: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate
(address . 56661@debbugs.gnu.org)
18f97757-4efb-5f03-1484-6141a2e0321b@telenet.be
retitle 56661 SDDM does not do the equivalent of 'login shell --login',
unlike other login managers
thanks
A digged a little, and found  that:
For GDM, things work, for SDDM, they don't.
There is a 'xinitrc' procedure in gnu/services/xorg.scm that generates a
configuration file that has a fallback .xsession that does a --login.
This is used by gdm-wayland-session-wrapper, <gdm-configuration> and
slim-shepherd-service.  However, nothing similar appears to be done for
SDDM.  So it appears that the SDDM service needs to be tweaked to use
xinitrc or such.
Greetings,
Maxime
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 22 Jul 2022 12:44
(address . 56661@debbugs.gnu.org)
c5f0cb71-2fb3-5e35-02f7-581a738a8232@telenet.be
On 22-07-2022 12:24, Maxime Devos wrote:
Toggle quote (14 lines)
> retitle 56661 SDDM does not do the equivalent of 'login shell
> --login', unlike other login managers
> thanks
>
> A digged a little, and found  that:
>
> For GDM, things work, for SDDM, they don't.
>
> There is a 'xinitrc' procedure in gnu/services/xorg.scm that generates
> a configuration file that has a fallback .xsession that does a
> --login. This is used by gdm-wayland-session-wrapper,
> <gdm-configuration> and slim-shepherd-service.  However, nothing
> similar appears to be done for SDDM.  So it appears that the SDDM
> service needs to be tweaked to use xinitrc or such.
It appears that SDDM supports xinitrc files, but it looks for them (see
data/scripts/Xsession) in $HOME/.xsessionrc and
/etc/X11/xinit/xinitrc.d, which do not exist in Guix. There is no option
for overriding the xinitrc.  However, it is possible to override the
Xsession script used, so we can give SDDM a modified Xsession script
that uses Guix' xinitrc. I'll give that a try.
Greetings,
Maxime
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 22 Jul 2022 13:00
SDDM does not do the equivalent of 'login shell --login', unlike other login managers
(address . 56661@debbugs.gnu.org)
ba06de43-f99a-ee07-0d22-b9c7f04dea7f@telenet.be
On 22-07-2022 12:44, Maxime Devos wrote:
Toggle quote (24 lines)
>
> On 22-07-2022 12:24, Maxime Devos wrote:
>> retitle 56661 SDDM does not do the equivalent of 'login shell
>> --login', unlike other login managers
>> thanks
>>
>> A digged a little, and found  that:
>>
>> For GDM, things work, for SDDM, they don't.
>>
>> There is a 'xinitrc' procedure in gnu/services/xorg.scm that
>> generates a configuration file that has a fallback .xsession that
>> does a --login. This is used by gdm-wayland-session-wrapper,
>> <gdm-configuration> and slim-shepherd-service.  However, nothing
>> similar appears to be done for SDDM.  So it appears that the SDDM
>> service needs to be tweaked to use xinitrc or such.
>
> It appears that SDDM supports xinitrc files, but it looks for them
> (see data/scripts/Xsession) in $HOME/.xsessionrc and
> /etc/X11/xinit/xinitrc.d, which do not exist in Guix. There is no
> option for overriding the xinitrc.  However, it is possible to
> override the Xsession script used, so we can give SDDM a modified
> Xsession script that uses Guix' xinitrc. I'll give that a try.
>
Actually, I'll be doing other things first, but for anyone interested,
this sounds like a likely solution to me.
Greetings,
Maxime.
Attachment: OpenPGP_signature
A
A
Andrew Tropin wrote on 22 Jul 2022 15:03
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate
87czdxl2o7.fsf@trop.in
On 2022-07-22 11:32, Maxime Devos wrote:

Toggle quote (11 lines)
> On 20-07-2022 19:47, Andrew Tropin wrote:
>
>> I'm not sure how your login/display manager works, but for X11 session
>> sourcing ~/.profile from ~/.xsession should do the trick.
> Me neither, and I don't particularly care.
>
> If this is something that needs to be done, shouldn't _Guix System_
> create that file by default, for the same reason that Guix System
> creates a ~/.profile and ~/.bash_profile by default?  I don't see why I
> would have to do that myself.

It's a tricky question, because it's a case on the edge of Home/System.
From one point of view it should be handled by some home service, which
will create a proper ~/.xsession or extend it and generic mechanism,
from some display managers will automatically source it, but on the
other hand maybe adjusting system services for other DMs, which doesn't
work "out of the box" yet is a way to go. I don't have much experience
with X11, and don't see a whole picture, so it's hard to tell which
option is better.

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLaoDkACgkQIgjSCVjB
3rAqhhAAgr1qTntp2+OQ4WG5Yang8DaGF19optkeC6P+oMZ4abl2OoGSltbuDlfP
Bc4yGXyXZ+NYeL8HJYNnW+u/6IWIgJdZVELmffHOhUPCn5ZmAkSkJNXlqtHowZf5
SW4DDuOkr16QZ52Dw5CYf0c16daFLld+5r7zViG4g2DdOVQO7ZvjTLBmVTQmZkM5
Ewyo3uBjWIXqEoMY1/noNaH2bSSWvdK71nkZlGgQ3r6lDKIGIRMfwKqGFXoUwiGr
pXhHjqW81CF1EXYZKggQstg13/nFMX4ZxmRrZTBOE/2Ce3IiX9ZTqY++vrd6/fcb
9KG+bSXZz39jdKoNLerv30a95WB2BWlfCMqG6k59wVjWwvQIsa+A6PiKlKUgqJgE
4fzGYCgRnmQyanO0Tcc7dSStpexRsusufZzq4ij9L7D1ZJOfok51RQTPREM9iNg2
7uSCShJiDe7ViEo+njAdmYt4ZYMlhj+awedoI5hqfk162Nb7tUZZ53TlQoNklUtB
HXD8POPsljQWsC07s9Dc9AI8z1RHWrgU0h0Jd+CbR7hagPmljhBaToWLnOS6RYJC
kzpA+oYVcrVDP+6i9G9IvgCQRlu7onAwNvh88pHATSKogapLExHm61fgLe1tKFjl
/ALcWQjiNKuXON/Vlln7c5O4EtmwFOyIk0Xze+JXtazo8Sf848E=
=Tk1Z
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 22 Jul 2022 15:13
SDDM does not do the equivalent of 'login shell --login', unlike other login managers
9f6bd194-2a9d-a595-b217-3926885a87a2@telenet.be
On 22-07-2022 15:03, Andrew Tropin wrote:
Toggle quote (3 lines)
> It's a tricky question, because it's a case on the edge of Home/System.
> From one point of view it should be handled by some home service, which
> will create a proper ~/.xsession or extend it and generic mechanism,
Such a mechanism already exists for GDM and SLiM, see later (though it
doesn't create ~/.xessionrc, it's more stateless, and it is independent
of Guix Home). I don't see why Guix Home should handle things, it
doesn't seem to have anything to handle (unless you go for the
alternative, more stateful, solution you are proposing?).
Toggle quote (5 lines)
> from some display managers will automatically source it, but on the
> other hand maybe adjusting system services for other DMs, which doesn't
> work "out of the box" yet is a way to go. I don't have much experience
> with X11, and don't see a whole picture, so it's hard to tell which
> option is better.
I think I've found a solution that works for Guix System, independent of
Guix Home (doesn't depend on Guix Home and doesn't interfere with Guix
Home and doesn't require Guix System and Guix Home to interact), as
written in another response (thread is getting a bit long!):
Toggle quote (22 lines)
> On 22-07-2022 12:24, Maxime Devos wrote:
>> retitle 56661 SDDM does not do the equivalent of 'login shell
>> --login', unlike other login managers
>> thanks
>>
>> A digged a little, and found  that:
>>
>> For GDM, things work, for SDDM, they don't.
>>
>> There is a 'xinitrc' procedure in gnu/services/xorg.scm that
>> generates a configuration file that has a fallback .xsession that
>> does a --login. This is used by gdm-wayland-session-wrapper,
>> <gdm-configuration> and slim-shepherd-service.  However, nothing
>> similar appears to be done for SDDM.  So it appears that the SDDM
>> service needs to be tweaked to use xinitrc or such.
>
> It appears that SDDM supports xinitrc files, but it looks for them
> (see data/scripts/Xsession) in $HOME/.xsessionrc and
> /etc/X11/xinit/xinitrc.d, which do not exist in Guix. There is no
> option for overriding the xinitrc.  However, it is possible to
> override the Xsession script used, so we can give SDDM a modified
> Xsession script that uses Guix' xinitrc.
TBC: the 'xinitrc' that Guix generates does not override the ~/.xinitrc
written by the user (if any) -- IIUC, the generated wrapper looks for
~/.xinitrc and if it exists, it runs that, but if it doesn't exist, it
has a fallback. Also, TBC, it doesn't create ~/.xsessionrc (unlike what
you seem to be proposing), the relevant code just tells the login
manager to look at /gnu/store/...-the-generated-xinitrc.
It seems to work for GDM and presumably also for SLiM, which has similar
code. As such, I would expect it to work without problems for SDDM as
well (please write SDDM in the subject line, the original SLiM is
incorrect, I actually used SDDM).
Greetings,
Maxime
Attachment: file
Attachment: OpenPGP_signature
A
A
Andrew Tropin wrote on 22 Jul 2022 15:15
Re: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate
87a691l257.fsf@trop.in
On 2022-07-22 12:44, Maxime Devos wrote:

Toggle quote (16 lines)
> On 22-07-2022 12:24, Maxime Devos wrote:
>> retitle 56661 SDDM does not do the equivalent of 'login shell
>> --login', unlike other login managers
>> thanks
>>
>> A digged a little, and found  that:
>>
>> For GDM, things work, for SDDM, they don't.
>>
>> There is a 'xinitrc' procedure in gnu/services/xorg.scm that generates
>> a configuration file that has a fallback .xsession that does a
>> --login. This is used by gdm-wayland-session-wrapper,
>> <gdm-configuration> and slim-shepherd-service.  However, nothing
>> similar appears to be done for SDDM.  So it appears that the SDDM
>> service needs to be tweaked to use xinitrc or such.

The idea looks good to me.

Toggle quote (8 lines)
>
> It appears that SDDM supports xinitrc files, but it looks for them
> (see data/scripts/Xsession) in $HOME/.xsessionrc and
> /etc/X11/xinit/xinitrc.d, which do not exist in Guix. There is no
> option for overriding the xinitrc.  However, it is possible to
> override the Xsession script used, so we can give SDDM a modified
> Xsession script that uses Guix' xinitrc. I'll give that a try.

Just a note: .xsessionrc is debian-specific IIRC

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLaouQACgkQIgjSCVjB
3rDiUg//RVWDC3Tt+ymDVG3ZpC/JXHSFY4AajdAj2XDZm+mdq4cKEq3w2UY3u5Do
XoYVnch/GETRITKXPJiTNE34w6YuCVST6+6X9RYat5gGaJ7rY2jOnfDCQpFM/OTH
obPKwTiS6gkDmKJglP2Nv+3dqiq4ZjIZGcvIGCG2Q0k/qRqIhc0HP+VEogSzukqD
bRma1mqtFegkjnVZOKGOlr4/A/Hm1n3WCqPdk2CPunMl0bmdeawRAR1WyBpAqQoF
0djS3K0Z/Foh04BoYd7qn24B/Hgso+uHzVym/YYIWUsnDKNJ9ZS7Pfq/Lgaup3G2
/Ks7YPsA6Jxr1y+i6dGrVSt2fJr12n19MK/HeCbcDHTuzur3j8ZwPnHV4lHO/+Am
MRoYCKlnJ1CTVglzNPOPtZm4qNJuOT5o1UVkDe105a9XBnmTUsinNpAX5uHXLrSX
3xjHGGXCtldiAI+Q72dWhk0zIjDlU42RMChKLqk81d13aS5+bJlFvtuiJK+NOxuV
QpNgLiBd+LooAxhhV8+82T6RfTVimEFTyuDuDDnrVQbpK6ad3+Err7BV3mFuDCd0
cYek88IBIOePEPJbHyx3+H3b594GswWazRtBwkIIgC9JL9p3W43UyBvRmHrHek7F
0ZN5xV/Ncd922VX/73+f1iQayd0uEJx9YOOdwoy5OQorrC+Q5RA=
=ZUkb
-----END PGP SIGNATURE-----

M
M
M
Maxime Devos wrote on 30 Jul 2022 13:17
(address . 56661@debbugs.gnu.org)
6efc6a13-bd6a-6b18-2f5a-cb4a4dde8d54@telenet.be
On 30-07-2022 13:16, Maxime Devos wrote:
Toggle quote (4 lines)
> This (reviewed!) patch would be helpful for debugging
> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56836> and many other
> "guix pull: You found a bug" reports.
>
Nevermind sent to the wrong number.
Attachment: OpenPGP_signature
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 56661@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 56661
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch