Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm on Mac using Terminal for a SSH connection a Linux server, but I guess this could apply for any OS/client.

If I'm using Terminal on my local machine I can open a file in a GUI application by doing open [appname] [filename].

Is it possible to make it that way when connected to a remote server via ssh as well?

I allready have the remote server mounted as drive, so it's accessible via /Volumes/my_server, so what I basically want to do is to, when "on the remote server" via ssh, be able to write something like openlocally [filename] which sends a command to my local terminal session, or whatever it has to be, that runs open [appname] [filename] locally.

share|improve this question

migrated from stackoverflow.com Jul 2 '10 at 12:28

This question came from our site for professional and enthusiast programmers.

4  
why don't you just open another terminal window or tab? – Nikolaus Gradwohl Jul 2 '10 at 11:54

I don't have a mac to check right now, but the ssh manpage says there is an escaped key combination (~^Z) that sends the ssh client to the background. Did you try it ?

share|improve this answer
    
Ah, didnt know about that one. Thanks! :) If I could create a script that would take one argument, run the ~^Z, run open [appname] $argument, and then return with fg that would be perfect. But I can't find any way to programatically trigger the suspense. Any ideas? – phobia Jul 2 '10 at 15:31
    
@phobia: quite possibly you would still have to ~^Z to run the script on your local computer in the first place. – David Z Jul 2 '10 at 19:08
    
I am trying to do the same, did you get any success @OMG_peanuts? – Nicky Vandevoorde Feb 12 '15 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .