4 ms·
I mainly use GNU, but sometimes I develop with a VM running Windows. I mainly live inside Emacs. A nice way to access my Windows system is through TRAMP, which
by Zambyte 3y ago
I mainly use GNU, but sometimes I develop with a VM running Windows. I mainly live inside Emacs. A nice way to access my Windows system is through TRAMP, which (T)ransparently extends the filesystem at an application level over various protocols. I have found that using Emacs as a Samba client to access Windows works quite well for me.
Unfortunately recent versions of Samba makes it hard (impossible?) to spawn remote processes; else I would be able to use eshell inside Emacs, which is pretty awesome over SSH.
- sgt 3y ago[flagged]
- hsbauauvhabzb 3y agoI doubt the latest assertion, the impacket tooling is well known for executing code over various interfaces. I have no idea how it works, but I imagine it would be difficult to truely prevent exec over smb. Fwiw though, windows now supports openssh via a powershell command to install (e.g it’s not some third party binary). I’m not sure if it supports sftp, but it may be worth looking into.
- Zambyte 3y agoI'll have to give execing over smb another look. I did try using OpenSSH, but there were issues with using Powershell through eshell over TRAMP. It expects a POSIX shell. I also tried using Cygwin to run OpenSSH, but that didn't work well for my needs.
- exec1 3y agoIs TRAMP similar to SSHFS?
- Zambyte 3y agoSimilar, yes. It supports many more protocols than SSH though[0]. It also supports multi-hops, even across multiple protocols if it can[1]. So you could say: access a remote server over SSH, and then pivot to a Windows machine behind a firewall using Samba, all by simply specifying a file path to do that. [0] https://www.gnu.org/software/tramp/tramp-emacs.html#Connection-types https://www.gnu.org/software/tramp/tramp-emacs.html#Connecti... [1] https://www.gnu.org/software/tramp/tramp-emacs.html#Ad_002dhoc-multi_002dhops https://www.gnu.org/software/tramp/tramp-emacs.html#Ad_002dh...
- chrchr 3y agoIt’s more like emacs-flavored RPC. You can edit files on remote hosts using TRAMP, and you can transparently execute processes on the remote host. If you’re editing a remote file and invoke, say, a compiler it will transparently run the compiler on the remote host against the remote file.
- andreareina 3y agoTRAMP is general access via ssh, e.g. you can also use it for executing binaries on the remote machine. In the case of remote files it does something like `base64 -D <(ssh remote base64 remote-file) > tempfile` for read and the inverse for write.
- ananthakumaran 3y agoTramps works well for simple use cases, like quick config edit or view some files etc. For full blown project development, I found numerous issues with tramp. Many plugins that work well with local files might not work well with remote files. This is not a fault of tramp though, just that not every plugin authors have time to support tramp well etc. At the end, I went with mosh + emacs setup which just works once you spend some time to setup[1] your terminal. 1: https://ananthakumaran.in/2021/07/31/emacs-remote.html https://ananthakumaran.in/2021/07/31/emacs-remote.html