At this point I believe I am using the emacs version on my Mac that is built by Homebrew and the "stock" emacs on Ubuntu 18.04.
I set up emacs server on the Ubuntu host as it is described in Starting Emacs Daemon with systemd and connect to it using emacsclient as described. This all works fine.
I also use emacs on my Mac with tramp to access the file systems on the Ubuntu host. And this works fine too. Even magit
works which is rather spectacular.
The main reason for the emacs in daemon mode on the Ubuntu host is to replace tmux
so if the connection drops, the shell process continues and I can later view the *shell*
buffer.
Is there a way for me to view and interact with the *shell*
buffer from the emacs on my Mac?
The ultimate goal here is to have just one emacs on my Mac and the ability to start and run commands on the remote Ubuntu system in such a way that if the connection drops, the remote commands continue to run and I can later connect and view the output like tmux
, screen
, or emacs in daemon mode can do.
emacsclient
on the OSX machine and connect it to the server on the remote host; but rather you're trying to have a separate instance of Emacs interacting with a remote emacs server (but also doing its own things locally on OSX), correct? To my knowledge you can't do that (other than by using aterm
buffer to runemacsclient
on the remote host via ssh, which would be a bit awkward).emacsclient
connected to the Ubuntuemacs-server
may be at least slightly better than running theemacsclient
on the Ubuntu machine.ssh $1 "emacsclient -n -c -e nil -u" < /dev/null > /dev/null 2>&1
where$1
is the host. When the remote host is rebooted, I ssh to the remote host and start emacs viaemacs --daemon
. This isn't / wasn't my initial goal but it isn't too bad.