Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 6 down vote accepted

/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.

share|improve this answer

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.