I have tried this approach, but it was inconvenient for me because I use the same setup on multiple machines (basically it’s one git repo cloned on different machines). I couldn’t figure out how to use standard environment variables like $HOME or $PATH, e.g. in this case I would like something like this:
(where $PATH is whatever is the default for systemd user unit files)
Strange, because this returns a value that includes $HOME/bin.
To give more info: the unit I’m having trouble with runs emacs --daemon. I have both Emacs from the Fedora repos, and a newer Emacs I compiled from source which is installed in /opt/emacs.
I have a common setup across multiple machines. So on machines where I want to use the newer Emacs, I drop a symlink in $HOME/bin. Then my configuration need not know the difference between machines. However this doesn’t work if I use
although it works nicely if I use the full path /opt/emacs/bin/emacs.