* David Collins had this to say on [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'
You can actually avoid the first command by using the -p flag in the second. Sadrul > where ^M is entered by typing ctrl-v ctrl-m > > David > > On 12/02/2010, Sadrul Habib Chowdhury <ima...@gmail.com> 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 > >> fah...@merlin:~$ screen -dmS foo > >> fah...@merlin:~$ 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. > >> > >> fah...@merlin:~$ screen -S foo -X emacs -nw somefile > >> fah...@merlin:~$ 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 > > screen-users@gnu.org > > http://lists.gnu.org/mailman/listinfo/screen-users > > _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users