'On MobaXTerm, what bash command can I use to open a file from a remote machine? instead of clicking on 'Open with default text editor'
What I'm trying to accomplish is not to right click on the SFTP tab on 'Open with default text editor', but to do this from the command line.
Solution 1:[1]
If you're fine with running remote X clients then passing the filename to xdg-open
will open it in its default (X client) application provided your SSH client has X forwarding enabled.
xdg-open foo.txt
If you're trying to open the remote file in a local application, that's not something that can be done from the remote command line.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ignacio Vazquez-Abrams |