If you run something else instead of tmux, does it work?


On Mon, 7 Sep 2020 at 17:12, Oblio Leitch <[email protected]> wrote:

> No, it looks like if I do ExecStart=/usr/bin/tmux new -d 'date > /tmp/x;
> sleep 1000' it does not create the file.  If I leave off the -d I get
> "not a terminal".  When things do run, I'm sure that it's the user I expect.
>
> On Mon, Sep 7, 2020 at 10:59 AM Nicholas Marriott <
> [email protected]> wrote:
>
>> Does it actually run? Try eg "tmux new 'date >/tmp/x; sleep 1000'" and
>> see if it adds to the file.
>>
>> Are you sure it is running as the user you think it is?
>>
>>
>>
>>
>> On Mon, 7 Sep 2020 at 15:36, Oblio Leitch <[email protected]> wrote:
>>
>>> Ok, so tmux new -d -s mySession is the same as tmux new -d -s mySession
>>> /bin/bash. And the bash command is running, but in a wait state.
>>> Whereas, the example of ll executed and exit, but because it was not in
>>> a shell, didn't have a running command to fall back to.
>>>
>>> The reason I'm asking is because I want to launch a command in a shared
>>> session on system start up so that it's running in the background, "owned"
>>> by one user, but accessible to others. I'm using systemd, and I have a
>>> service setup, but it's not working.  Do you know of any reason 
>>> ExecStart=/usr/bin/tmux
>>> new -d -s mySession /bin/bash would not persist?  (I know this isn't
>>> multi user, I'm just looking to get a working example)
>>>
>>> On Mon, Sep 7, 2020 at 9:09 AM Nicholas Marriott <
>>> [email protected]> wrote:
>>>
>>>> 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
>>>>
>>> --
>>> 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/CAHxWh4YJPzAj%3D9X_pxffnV-RWaWOPQOmSgmUJ8yUKsZLJTzGtQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/tmux-users/CAHxWh4YJPzAj%3D9X_pxffnV-RWaWOPQOmSgmUJ8yUKsZLJTzGtQ%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/CAHxWh4bWSyrH9uGu%2B90EavhJQM7gatPSSJuwZc1-kiG5VtQb8A%40mail.gmail.com
> <https://groups.google.com/d/msgid/tmux-users/CAHxWh4bWSyrH9uGu%2B90EavhJQM7gatPSSJuwZc1-kiG5VtQb8A%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/CAEdLfcHgTWrnaQOviQTvck9QJGzwfRQ%3DEYQUdxfDdKkhYkEkSA%40mail.gmail.com.

Reply via email to