On Wed, Dec 07, 2022 at 07:41:50PM -0600, Rob Browning wrote:
> Ross Vandegrift <rvandegr...@debian.org> writes:
> > But it starts on my system without (as far as I recall) me enabling
> > it.
> >
> >
> > What's the appropriate way to disable it?  `systemctl --user disable --now
> > emacs.server` only lasts until I reboot.  Masking it works.
> >
> > I've noticed that even after disabling, status shows it's enabled:
> >   $ systemctl --user disable --now emacs.service
> >   $ systemctl --user status emacs.service | head -n 3
> >   ○ emacs.service - Emacs text editor
> >        Loaded: loaded (/usr/lib/systemd/user/emacs.service; enabled; 
> > preset: enabled)
> >        Active: inactive (dead) since Wed 2022-12-07 15:03:03 PST; 4s ago
> >
> > I don't really understand how systemd user stuff works - 
> > ~/.config/systemd/user
> > is empty (until masking), but I don't know if that's informative.
> 
> I suspect you're having the same problem I was, which I believe is
> caused by the fact that earlier versions of the package (in untable)
> didn't have --no-enable, and the auto-run behavior seems to be sticky.
> 
> I "fixed" it here by purging and reinstalling emacs-common, but I'd hope
> there's a better way.  If so, I'd be happy to consider adding some notes
> to a suitable /usr/share/doc file, and/or trying to automate a fix.
> 
> Though if the fix isn't simple, I might hesitate attempting to automate
> it, since the problem (I hope) only existed somewhat briefly in
> unstable.

Aha, thanks that's a good hint.  Purging emacs-common didn't do the
trick for me, but purging all emacs packages did.  etckeeper then
revealed the culprit:
  /etc/systemd/user/default.target.wants/emacs.service

I couldn't easily find any tool to manage files there, since systemdctl
--user does not.  But probably, deleting it and doing daemon-reload or
reboot would've done the job.

Agreed that it probably isn't worth automating a solution to this in the
package.

Thanks,
Ross

Reply via email to