all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* bug#48223: EXWM knows nothing about Guix profiles
@ 2021-05-04 11:37 Leo Prikler
  2021-05-07 19:15 ` janneke
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Prikler @ 2021-05-04 11:37 UTC (permalink / raw)
  To: 48223

Hi Guix,

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.

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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48223: EXWM knows nothing about Guix profiles
  2021-05-04 11:37 bug#48223: EXWM knows nothing about Guix profiles Leo Prikler
@ 2021-05-07 19:15 ` janneke
  2021-05-08  8:56   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: janneke @ 2021-05-07 19:15 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 48223

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Hello Leo,

> 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 the
problem right away.  My system which includes EXWM was still at
emacs-27.1, while I upgraded my profile to emacs-27.2.

> 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.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48223: EXWM knows nothing about Guix profiles
  2021-05-07 19:15 ` janneke
@ 2021-05-08  8:56   ` Jan Nieuwenhuizen
  2021-05-08  9:26     ` Leo Prikler
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2021-05-08  8:56 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 48223

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

> 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.

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

--8<---------------cut here---------------start------------->8---
(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"))))))))
--8<---------------cut here---------------end--------------->8---

and now use the attached exwm, which works OK for me.

Greetings,
Janneke


[-- Attachment #2: exwm --]
[-- Type: application/octet-stream, Size: 419 bytes --]

#! /usr/bin/env bash

# source /etc/profile
source /home/janneke/.bash_profile

export EXWM=janneke

xhost +SI:localuser:$USER
dbus-launch emacs "$@" --eval '(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm")) ((not (featurep (quote exwm))) (require (quote exwm)) (require (quote exwm-config)) (exwm-config-default) (message (concat "exwm configuration not found. " "Falling back to default configuration..."))))' 

[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48223: EXWM knows nothing about Guix profiles
  2021-05-08  8:56   ` Jan Nieuwenhuizen
@ 2021-05-08  9:26     ` Leo Prikler
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Prikler @ 2021-05-08  9:26 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 48223

Hi,

Am Samstag, den 08.05.2021, 10:56 +0200 schrieb Jan Nieuwenhuizen:
> > 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 zsh
user, I'm putting stuff in .zprofile instead, so all my hacks will be
obsoleted if we start mandating bash_profile.  The "portable"
alternative, that is $HOME/.profile does not exist in our current
skeletons.

Putting this aside, I think it'd also be possible to duplicate whatever
settings you might have put into ~/.bash_profile in ~/.exwm.

> 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 to
ELPA sub-directories for structure, but keeping a hopefully backwards-
compatible hack in subdirs.el
However, I doubt, that this is the only thing making a difference
between now and then.  Since EMACSLOADPATH is wrong, it would seem,
that there is no profile evaluation whatsoever going on, and I'd argue
this has already been the case before, I just don't know when it
changed or whether things just happened to work "OOTB" despite this.

I also think, that any session should be run under the user's shell
with --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 see
the correct value – why does it not happen for EXWM under slim?

Greetings,
Leo





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-08  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 11:37 bug#48223: EXWM knows nothing about Guix profiles Leo Prikler
2021-05-07 19:15 ` janneke
2021-05-08  8:56   ` Jan Nieuwenhuizen
2021-05-08  9:26     ` Leo Prikler

all messages for Guix-related lists mirrored at yhetil.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix

Example config snippet for mirrors.


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git