new sessions of dwm launches when emacs is started
As the headline above states, when I start emacs (with spacemacs installed) I get two new sessions of dwm, one right after another. They appear to be blocking, because emacs won't continue to load until I exit out of each session.
configurations
fresh installation of emacs and spacemacs, no config alterations made
shell type: Busybox 1.30.1 sh / ash
platform: Alpine Linux 3.10, vanilla kernel
configuration files:
.profile
startx
.xinitrc
exec dwm
.xsession-bak (moved for debugging, not currently in use)
#!/bin/sh
#
# ~/.xsession
#
# Executed by xdm/gdm/kdm at login
#
/bin/sh -l ~/.xinitrc
emacs / xorg output on startup
Error (use-package): exec-path-from-shell/:init: Expected printf from shell, but got "/bin/ash: can't access ttyp: job control turned off
...Xorg starts up here...
It appears that sh parses .profile when -l is used (a POSIX standard per here: https://linux.die.net/man/1/sh) and when .profile is called, I get a new session of dwm.
new sessions of
dwm
launches when emacs is startedAs the headline above states, when I start emacs (with spacemacs installed) I get two new sessions of dwm, one right after another. They appear to be blocking, because emacs won't continue to load until I exit out of each session.
configurations
.profile
.xinitrc
.xsession-bak
(moved for debugging, not currently in use)emacs / xorg output on startup
I think the issue arises here: https://github.com/purcell/exec-path-from-shell/blob/3cfedb8791397ed50ee66bc0a7cbee5b9d78245c/exec-path-from-shell.el#L121-L132, because when I also call
/bin/ash/ -l
the behaviour is the same; I get a new session of dwm/Xorg opened up.It appears that
sh
parses.profile
when-l
is used (a POSIX standard per here: https://linux.die.net/man/1/sh) and when.profile
is called, I get a new session ofdwm
.Solution
https://bbs.archlinux.org/viewtopic.php?id=144119
Change
.profile
to something like this: