-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Description
I've configured an Emacs daemon to start as an OpenRC user service and added it to the default runlevel.
However, when I open a shell within an Emacs client and execute rc-status --user, the Emacs service is not listed in the output.
This behavior is observed exclusively when the service is included in the default runlevel.
Initial discussion: https://snac.lin.moe/lindsay/p/1740969003.750311
Related files
$XDG_CONFIG_HOME/zsh/.zprofile:
# load only user interactive login
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]] && [[ -x "$(command -v sway)" ]]; then
if [ -d "$XDG_CONFIG_HOME/rc" ]; then
openrc --user default
fi
if [[ -S $XDG_RUNTIME_DIR/bus ]]; then
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
exec sway
else
exec dbus-run-session -- sway
fi
fi
$XDG_CONFIG_HOME/rc/init.d/emacs:
#!/sbin/openrc-run
name="Emacs daemon"
command="/usr/bin/emacs"
command_args="--fg-daemon"
command_background="yes"
pidfile="$XDG_RUNTIME_DIR/${SVCNAME}.pid"
$XDG_RUNTIME_DIR/openrc/deptree
depinfo_0_service='emacs'
depinfo_1_service='dbus'
How to reproduct
- Start the emacs user service
- Start an emacs client:
emacsclient -c -a "" - Open
eshell:M-x eshell <Enter>(orAlt+x eshell <Enter>) - Run:
rc-status --user
Expected: Emacs service listed in the manual runlevel. - Run command
rc-update --user add emacs default && rc-status --user
Expected: Emacs service disappears from the output.
Metadata
Metadata
Assignees
Labels
No labels