if you don't give a command, tmux will start a shell creating a session with -d is no different from creating it without except it does not attach
On Mon, 7 Sep 2020 at 14:08, Oblio Leitch <[email protected]> wrote: > Then, I'm not clear why tmux new -d -s mySession persists a detached > session; it doesn't have any commands in it. > > On Mon, Sep 7, 2020 at 6:53 AM Nicholas Marriott < > [email protected]> wrote: > >> Unless you turn remain-on-exit on, then there needs to be a running >> command in each pane. A session must have at least one pane (ie at least >> one window). >> >> On Mon, 7 Sep 2020 at 11:52, Oblio Leitch <[email protected]> wrote: >> >>> So detached sessions have to be actively executing something or they're >>> closed? What if I just did tmux -S /tmp/tmux/shared new -d 'll'? >>> >>> On Mon, Sep 7, 2020 at 12:49 AM Nicholas Marriott < >>> [email protected]> wrote: >>> >>>> You could try adding ";sleep 1000" to your command and you should be >>>> able to attach and see if it is reporting an error message. >>>> >>>> On Mon, 7 Sep 2020, 05:48 Oblio Leitch, <[email protected]> wrote: >>>> >>>>> I'd like to create a new session, multi-user (shared socket), give it >>>>> a command and detach all at once. However I'm not sure how to go about >>>>> that. I have the socket set up, and my syntax looks like this: >>>>> >>>>> tmux -S /tmp/tmux/shared new -d 'command-to-run' >>>>> >>>>> The trouble is, it does not persist - there's no sessions running. >>>>> I'm not sure how to go about this. >>>>> >>>>> Thanks >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "tmux-users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web, visit >>>>> https://groups.google.com/d/msgid/tmux-users/CAHxWh4bJJGVY-i%2Bsf8DEYrA%2Bj5U1vQ3A0hnhwpJLHotfWhs9tw%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/tmux-users/CAHxWh4bJJGVY-i%2Bsf8DEYrA%2Bj5U1vQ3A0hnhwpJLHotfWhs9tw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "tmux-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web, visit >>> https://groups.google.com/d/msgid/tmux-users/CAHxWh4ZKcHa-fKz2T1tJpJD0gJqWthyw6xkjfM_tS2PYL%3DgKXw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/tmux-users/CAHxWh4ZKcHa-fKz2T1tJpJD0gJqWthyw6xkjfM_tS2PYL%3DgKXw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "tmux-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/tmux-users/CAHxWh4a2A-q3XhPwgSTwELYynUe5_8bv1Y55tsvmWychUpg26A%40mail.gmail.com > <https://groups.google.com/d/msgid/tmux-users/CAHxWh4a2A-q3XhPwgSTwELYynUe5_8bv1Y55tsvmWychUpg26A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAEdLfcFHRELjvq72FPoQYt_TrsLaBBR7qyo08JHXG7BRGt%2BWWg%40mail.gmail.com.
