5

I want to know how to accomplish this: Open a new window in GNU/screen, by running a command.

Here's what I want to do:
I uses GNU/screen daily. My laptop runs in UTF-8 locale, and I need to ssh to some specific servers which runs in GBK locale.
Normally I need to change encoding after I ssh to the server. I'm looking for an automatic way, which allows me just alias a series of command and then start the ssh GBK_LOCALE_SERVER command in another GBK-encoding GNU/screen window

yegle
  • 696
  • 7
  • 18

1 Answers1

7

/usr/bin/screen knows it's running within a screen session; if you pass it a command as an argument, it will run that command in a new tab.

So, from a shell within screen, you can just run

screen ssh GBK_LOCALE_SERVER

and the result will appear in a new window in the current screen.

caelyx
  • 699
  • 3
  • 7