Re: ssh/screen question - thread

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

 



hey guys...

got a much simpler issue/question...

I thought I had been running the remote cmd within the screen named
session.. upon further testing.. I may not have actually been running
it in the screen session.. perhaps outside of the session..

I think this works....

//--fire up the named screen session..
ssh crawl_user@192.81.214.49 "screen -d -m -S 'testname' "

//fire up the "long running cmd....
ssh  -t crawl_user@192.81.214.49  "screen -r -S testname  -X stuff
'sleep 60'$(echo -ne '\015')  "

i've tested this with sleeping of different times, as well as diff sys
commands.. it seems to work ok...

I'll do more testing of course!

I've been able to do the proc tbl (ps) to see that the cmds are being
run.. and in checking the screen/session.. it is definitely detached.

As a check to ensure that this really works... I did a sleep test,
without the echo -ne '\015' -- which generates the newline..

This checked out that the screen session was attached...

So, I think this is ok...

Thoughts/Comments




On Mon, Nov 14, 2016 at 3:01 PM, Tom Horsley <horsley1953@xxxxxxxxx> wrote:
> On Mon, 14 Nov 2016 14:13:48 -0500
> bruce wrote:
>
>> It only detaches after the process completes!!
>
> ssh goes to fantastic amounts of trouble to invent
> ridiculous file descriptors it can wait on till
> they close (specifically to prevent you from
> exiting an ssh session and leaving anything running).
>
> I use the bg-dammit program I wrote to actually
> for Gosh sakes background stuff. You can find the source
> on this web page:
>
> http://tomhorsley.com/game/Mjolnir.html
>
> (you might need to tweak things like debug
> logging code that has hard coded file paths :-).
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux