I have a terminal window and am ssh'ed into a server, possibly running tmux. Both the remote server and my local computer have the same view of the filesystem I am working on. I would like to be able to type certain commands like
subl (sublime text) in the remote terminal and have that command execute on the local computer, in the same directory. What is the easiest way to set up something like this?
I have X forwarding set up correctly, but to be clear, I do not want to run these certain commands on the remote server and have them forwarded - I want to spawn a new process on the client, using the
pwd from the server.
I could program a deamon and run it on the client, and have my command on the server connect to it, but it would be tricky to set up (with firewalls etc.). It would be great if I could somehow piggyback on the ssh or X forwarding connection somehow. Any suggestions?