ssh session immediately on starting xterm

0

What's the most elegant way to start an xterm window that, instead of opening a bash shell for the local computer and requires me to execute my ssh command manually, opens an ssh session for remote computer immediately?

I've seen some tricks involving SHELL=ssh username@host.domain.com for related problems. Is that the most natural way to achieve this behavior?

Notes:

  • The reason I want to do this is because I often do command line work on my remote ubuntu server from my Macbook. I ssh into this server more often than I do command line work relevant to my local Macbook, so I'd like to optimize my workflow for the ssh case.
  • Eventually I want to use iTerm instead of xterm but since iTerm is nowhere near as widespread as xterm I'd prefer to see if there's a general solution that can work on any terminal emulator.

Sridhar Sarnobat

Posted 2014-08-21T19:45:44.233

Reputation: 870

Answers

0

Use the execute-parameter provided by most of the linux terminal progs:

Examples: xterm -e "..." see http://linux.die.net/man/1/xterm

xfce-terminal -e "..." see http://man.cx/xfce4-terminal%281%29

SLN

Posted 2014-08-21T19:45:44.233

Reputation: 71