screen/remote apps
Cameron Simpson
cs at zip.com.au
Fri Jan 22 21:44:45 UTC 2016
On 22Jan2016 09:50, Markus Schönhaber <fedora-users at list-post.mks-mail.de> wrote:
>Bruce, Fri, 22 Jan 2016 03:35:12 -0500:
>Don't top-post!
>>> ssh into the remote box and start screen there (screen has to be
>>> installed on the remote box, obviously). Use the remote screen to start
>>> the app.
>
>> So you're saying it's basically a 2 step process:
>> 1) -ssh remote box start Screen (with starting attributes)
>> 2) --ssh remote box "ScreenCmd --name appToRun"
>>
>> something like this??
>
>I'm not sure I understand what the above is supposed to mean.
>
>What I meant is the following:
>localbox$ ssh user at remotebox
>(you're on the remotebox now)
>remotebox$ screen yourapp
>
>Or, if you don't want screen to terminate with your app, start screen
>and the the app from inside screen.
Yeah, ssh to remote host, start (or resume) a named screen session with the app
started inside it.
I use tmux instead of screen when possible, and I have a helper script named
"tm":
https://bitbucket.org/cameron_simpson/css/src/tip/bin/tm
largely for local sessions, but it also aids using remote sessions. It has a
"use-session-remote" operation which connects to a remote host and join (or
create) a named session. For convenience, it will also recite a shell function
namd "tm_remote" for accessing remote sessions, which I alias to "@":
eval "$(tm recite-function-remote)"
alias @=tm_remote
which lets me go:
@ remote-host:SESSION_NAME
In case of disconnect, it remembers the last command, so to reconnect one just
says:
@
Cheers,
Cameron Simpson <cs at zip.com.au>
More information about the users
mailing list