Closed bbatsov closed 3 years ago
Thanks for the heads up, I'll take a look tomorrow. 👍
Thanks!
I expect this has something to do with either zsh not doing the right thing with environment variables (https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1640514) - or ssh not doing the right thing with them (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964580).
On a clean, Ubuntu 20.04 install using bash, I am unable to replicate this:
sudo snap install --classic emacs
emacs --daemon
# this works fine
emacsclient -t -q .bashrc
If we try with zsh:
sudo apt install zsh
# logout and log back in via:
ssh -Y4t server zsh --login -i
server% /snap/bin/emacs --daemon
# this also works fine
server% /snap/bin/emacsclient -t -q .bashrc
I pinged the downstream discussion to see if they can join in here to help debug this further https://emacs.stackexchange.com/questions/59656/emacsclient-unable-to-connect-to-daemon-under-snap-installation-of-emacs#comment93658_59656
Thanks for the swift response!
Hello @alexmurray . I didn't know the current snap was https://github.com/alexmurray/emacs-snap.
When I was facing the error, I believe I I have used following ppa link :-( => sudo add-apt-repository ppa:kelleyk/emacs
due to this documentation (https://linuxhint.com/ubuntu_emacs_installation/), which is actually a pretty new documentation. I have also followed this guide https://askubuntu.com/a/1238505/660555 .
snap
(emacs 26.3 from Alex Murray), and I verify that emacs --daemon
works without an issue on zsh
and bash
. If required I would be glad to do further debugging.$ uname -a
Linux 4.15.0-111-generic #112-Ubuntu SMP Thu Jul 9 20:32:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
$ sudo apt install snapd
$ sudo snap install emacs --classic
emacs 26.3 from Alex Murray (alexmurray) installed
$ sudo ln -svf /snap/bin/emacs /usr/bin/emacs
/usr/bin/emacs => /snap/bin/emacs
When I added following lines into .emacs
. Any paste operation(C-w
) becomes very slow, I am not sure it is related to network issue or emacs itself.
(xclip-mode 1)
(custom-set-variables '(x-select-enable-clipboard t))
@avatar-lavventura So it sounds like the snap version of emacsclient is working now? Can this issue be closed? If you are having other problems which are specific to the snap version of emacs, please feel free to open another issue and we can try and resolve that too.
@alexmurray Yes snap version of emasclient
is working without any problem, and issue can be closed.
=> Thanks for reaching out to help.
Excellent - I will close this issue then.
In my case the problem was that I hard-coded the location of the executable. Rather than /usr/bin/emacsclient
, I now find it at /snap/emacs/1161/usr/bin/emacsclient
.
@nealmcb instead you should use the path /snap/bin/emacsclient
- this ensures the snap launches with the correct environment setup etc.
After writing an article on installing Emacs via snap (https://emacsredux.com/blog/2020/07/18/installing-emacs-via-snap/), some readers pointed me to this problem https://emacs.stackexchange.com/q/59656/18414