Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening Sublime Text editor from PuTTY terminal

I'm implementing a program on my Linux virtual server. For that I use WinSCP and PuTTY.

Should I install my text editor (Sublime Text) on my laptop or on my virtual server and how do I open it from PuTTY?

like image 781
user3299453 Avatar asked Oct 21 '22 03:10

user3299453


2 Answers

You cannot run local Windows application from PuTTY terminal connected to a remote server.

You can run remote installation of an application on a local X Server from PuTTY terminal though.

Anyway, why do you need to run it from PuTTY terminal? As you are using WinSCP too, why don't you configure the local Windows installation of Sublime Text as an external editor for WinSCP?
https://winscp.net/eng/docs/ui_pref_editor

Alternatively install SFTP plugin to your local installation of Sublime Text.
See How could I run Sublime Text 2 without X server?

like image 38
Martin Prikryl Avatar answered Oct 23 '22 10:10

Martin Prikryl


Another option is rmate

Sublime Text
install package RepoteSubl

Linux Bash Shell

>sudo wget -O /usr/local/bin/rmate https://raw.github.com/aurora/rmate/master/rmate
>sudo chmod a+x /usr/local/bin/rmate

rmate for bash

PuTTY
edit your session
SSH > Tunnels
source port: 52698
destination: localhost:52698
checked: "remote" and "auto"

Connect to Server via SSH (PuTTY)
>rmate file
and the file will open in Sublime Text
edit, save and it will be saved on server

like image 140
Gregory.K Avatar answered Oct 23 '22 11:10

Gregory.K