EXWM knows nothing about Guix profiles

OpenSubmitted by Leo Prikler.
Details
2 participants
  • janneke
  • Leo Prikler
Owner
unassigned
Severity
normal
L
L
Leo Prikler wrote on 4 May 13:37 +0200
(address . bug-guix@gnu.org)
42353788fa03581cdb87da7d1fdea1c8cf0a0682.camel@student.tugraz.at
Hi Guix,
I just recently helped someone debug an issue they encountered whenusing EXWM. It turned out their EMACSLOADPATH was set to"/run/current-system/profile/share/emacs/site-lisp:/gnu/store/1zszglsxl4zxy9alcwxjwj26d30qmyv9-emacs-27.2/share/emacs/27.2/lisp" – quite notably, "$HOME/share/emacs/site-lisp" was missing.
I think the launcher that we install in the install-xsession does notdo sufficient work to set up the environment variables of the sessionappropriately. In particular, I think it should source /etc/profileprior to running Emacs.
WDYT?
J
J
janneke wrote 6 days ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 48223@debbugs.gnu.org)
875yzuwe2i.fsf@gnu.org
Leo Prikler <leo.prikler@student.tugraz.at> writes:
Hello Leo,
Toggle quote (7 lines)> I just recently helped someone debug an issue they encountered when> using EXWM. It turned out their EMACSLOADPATH was set to> "/run/current-system/profile/share/emacs/site-> lisp:/gnu/store/1zszglsxl4zxy9alcwxjwj26d30qmyv9-emacs-> 27.2/share/emacs/27.2/lisp" – quite notably, "$HOME/share/emacs/site-> lisp" was missing.
Wow, I just hit this problem too. Your message helped me finding theproblem right away. My system which includes EXWM was still atemacs-27.1, while I upgraded my profile to emacs-27.2.
Toggle quote (7 lines)> I think the launcher that we install in the install-xsession does not> do sufficient work to set up the environment variables of the session> appropriately. In particular, I think it should source /etc/profile> prior to running Emacs.>> WDYT?
I think this is a very good idea.
Greetings,Janneke
-- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.orgFreelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
J
J
Jan Nieuwenhuizen wrote 5 days ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 48223@debbugs.gnu.org)
875yzt7geo.fsf@gnu.org
Toggle quote (2 lines)> Leo Prikler <leo.prikler@student.tugraz.at> writes:
Hello again,
Toggle quote (9 lines)>> I think the launcher that we install in the install-xsession does not>> do sufficient work to set up the environment variables of the session>> appropriately. In particular, I think it should source /etc/profile>> prior to running Emacs.>>>> WDYT?>> I think this is a very good idea.
To follow-up on this: at first glance sourcing /etc/profile seemed tofix my problem. However, I am calling some scripts from Emacs that needmy ~/.bash_profile to be sourced too.
So this got me wondering, something has definately changed here.Before, this used to work OOTB. Any ideas what may have changed?
BTW, I only tested with slim
Toggle snippet (13 lines)(service slim-service-type (slim-configuration (auto-login? #t) (allow-empty-passwords? #t) (default-user "janneke") ;;(auto-login-session (file-append emacs-exwm "/bin/exwm")) (auto-login-session "/home/janneke/bin/exwm") (xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout) (server-arguments '("-listen" "tcp"))))))))
and now use the attached exwm, which works OK for me.
Greetings,Janneke
Attachment: exwm
-- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.orgFreelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
L
L
Leo Prikler wrote 5 days ago
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)(address . 48223@debbugs.gnu.org)
4112dadd777b8e2eb86d7b871b35971a4666619e.camel@student.tugraz.at
Hi,
Am Samstag, den 08.05.2021, 10:56 +0200 schrieb Jan Nieuwenhuizen:
Toggle quote (20 lines)> > Leo Prikler <leo.prikler@student.tugraz.at> writes:> > Hello again,> > > > I think the launcher that we install in the install-xsession does> > > not> > > do sufficient work to set up the environment variables of the> > > session> > > appropriately. In particular, I think it should source> > > /etc/profile> > > prior to running Emacs.> > > > > > WDYT?> > > > I think this is a very good idea.> > To follow-up on this: at first glance sourcing /etc/profile seemed to> fix my problem. However, I am calling some scripts from Emacs that> need> my ~/.bash_profile to be sourced too.
I don't think sourcing ~/.bash_profile will be portable. As a zshuser, I'm putting stuff in .zprofile instead, so all my hacks will beobsoleted if we start mandating bash_profile. The "portable"alternative, that is $HOME/.profile does not exist in our currentskeletons.
Putting this aside, I think it'd also be possible to duplicate whateversettings you might have put into ~/.bash_profile in ~/.exwm.
Toggle quote (2 lines)> So this got me wondering, something has definately changed here.> Before, this used to work OOTB. Any ideas what may have changed?
One thing, that changed is Emacs itself. In particular, we reverted toELPA sub-directories for structure, but keeping a hopefully backwards-compatible hack in subdirs.elHowever, I doubt, that this is the only thing making a differencebetween now and then. Since EMACSLOADPATH is wrong, it would seem,that there is no profile evaluation whatsoever going on, and I'd arguethis has already been the case before, I just don't know when itchanged or whether things just happened to work "OOTB" despite this.
I also think, that any session should be run under the user's shellwith --login. As far as I can tell, that happens for GNOME under GDM –executing getenv for a variable that I only set in my .zprofile I seethe correct value – why does it not happen for EXWM under slim?
Greetings,Leo
?