LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't edit files while using ssh to remotely access linux server from a Windows comp (https://www.linuxquestions.org/questions/linux-newbie-8/cant-edit-files-while-using-ssh-to-remotely-access-linux-server-from-a-windows-comp-837147/)

soundersfc 10-09-2010 06:52 PM

Can't edit files while using ssh to remotely access linux server from a Windows comp
 
I can ssh to the server but it wont allow me edit files, even though I have basic text editors like gedit and notepad installed on my windows computer. Anyone have an idea what the problem is? (I get an error message like this-(gedit:23978): Gtk-WARNING **: cannot open display:) Thanks in any case

neonsignal 10-09-2010 07:55 PM

When you ssh to a remote server, you are actually running the editor from the remote server. Because you do not have an X-windows (the GUI) connection, the editor cannot put up its graphical user interface, which is why you get a warning.

The easiest alternative would be a non-GUI editor such as nano. Many users prefer vi or emacs, but there is a learning curve if you have not used them before.

In order to run a GUI program on the remote computer, you would need an X server on your own computer, and will require additional flags to ssh (to tell it to forward the X connection). There are X servers for Windows such as Xming.

schneidz 10-10-2010 12:07 PM

i dunno' about windows -> linux but with linux -> linux the command should be:
Code:

ssh -X <server>.com
please tell us what ssh client you are using ?

man ssh for more info.

soundersfc 10-11-2010 01:48 PM

Thanks neonsignal. I downloaded Xming and Nano, and both are working as good solutions. Thanks Again!


All times are GMT -5. The time now is 01:39 AM.