screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sending an arbitary command to a detached session


From: David Collins
Subject: Re: sending an arbitary command to a detached session
Date: Fri, 12 Feb 2010 21:05:15 +0000

you can also use the following for a bit more control over a program
running in a screen session

screen -S foo -X select [windowid]
screen -S foo -X stuff 'emacs -nw somefile^M'

where ^M is entered by typing ctrl-v ctrl-m

David

On 12/02/2010, Sadrul Habib Chowdhury <address@hidden> wrote:
> * Faheem Mitha had this to say on [12 Feb 2010, 08:22:25 -0500]:
>>
>> Hi,
>>
>>> From the screen documentation, it looks like something similar to the
>> following should work, but it doesn't. If it is not already clear from
>> the commands below, I want to send an arbitrary command to run in a
>> detached screen instance. Any recipe that works would be appreciated.
>> Please CC me on any reply.
>>
>>                                                       Regards, Faheem
>>
>> *********************************************************************
>>
>> # create detached foo screen instance
>> address@hidden:~$ screen -dmS foo
>> address@hidden:~$ screen -ls
>> There is a screen on:
>>         30938.foo       (02/12/2010 06:39:33 PM)        (Detached)
>> 1 Socket in /var/run/screen/S-faheem.
>>
>> address@hidden:~$ screen -S foo -X emacs -nw somefile
>> address@hidden:~$ screen -r foo
>> # attaching to the foo screen session but nothing there
>
> You can run screen-commands with 'X', and 'emacs' is not a screen
> command! You would want something like the following instead:
>
>       screen -S foo -X screen emacs -nw somefile
>
> Cheers,
> Sadrul
>
>
>
> _______________________________________________
> screen-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/screen-users
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]