Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
4  
why don't you just open another terminal window or tab? –  Nikolaus Gradwohl Jul 2 '10 at 11:54
add comment

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

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

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.