ssh prolog editor

51 views
Skip to first unread message

Sam Neaves

unread,
Jul 19, 2016, 2:22:53 AM7/19/16
to SWI-Prolog
If I ssh into a remote server and run prolog, then edit('myfile.pl'). I enter vim on the remote machine, is there a way to change this so that I go into the normal prolog editor (pce emacs) on my local machine?  Also for debugging and tracing in the gui?


Carlo Capelli

unread,
Jul 19, 2016, 2:48:16 AM7/19/16
to Sam Neaves, SWI-Prolog
HI Sam

Have you considered to start your session with -X ? I use that, and XPCE is available.
I find a bit difficult to track the debugging context, since I can't see a clue in window' titles about the host machine.
Don't debug locally and remotely the same application :)

ssh -X login@server

2016-07-19 8:22 GMT+02:00 Sam Neaves <sam.n...@gmail.com>:
If I ssh into a remote server and run prolog, then edit('myfile.pl'). I enter vim on the remote machine, is there a way to change this so that I go into the normal prolog editor (pce emacs) on my local machine?  Also for debugging and tracing in the gui?


--
You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
Visit this group at https://groups.google.com/group/swi-prolog.
For more options, visit https://groups.google.com/d/optout.

Jacco van Ossenbruggen

unread,
Jul 19, 2016, 7:39:51 AM7/19/16
to swi-p...@googlegroups.com
On 07/19/2016 08:22 AM, Sam Neaves wrote:
> If I ssh into a remote server and run prolog, then edit('myfile.pl <http://myfile.pl>'). I enter vim on the remote machine, is there a way to change this so that I go into the normal prolog editor (pce emacs) on my local machine? Also for debugging and tracing in the gui?
>

Sam,

I use the same "ssh -X" trick as suggested by Carlo. In cases were I have good internet connection, this works fine for graphical editing, debugging and tracing. I typically have my swi-prolog http server running in an environment such as "screen" or VNC so I can leave the server running and still easily access it remotely. This allows you to use the GUI to trace, debug, modify, and update your http server without taking it down.

Alternatively, I check in my server code into git, check it out, debug, fix and test locally, check in the fixes, check out on my server, run 'make/0' in the swi-prolog command line interface on the server, and also have a fixed server without ever taking it down. I'm still amazed how easy this is in Prolog compared to the traditional edit, recompile, restart server cycles I still see a lot around me!

hope this helps,

Jacco


Sam Neaves

unread,
Jul 19, 2016, 4:36:15 PM7/19/16
to Jacco van Ossenbruggen, SWI-Prolog
Good tips thanks :)

Reply all
Reply to author
Forward
0 new messages