Score:0

Stop tmux new-session after opeing terminal each time

to flag

I am using tmux on Kubuntu 22.04.1 with ZSH terminal. I have oh-my-zsh with it.

I have enabled tmux plugin of oh-my-zsh.

STEPS TO REPRODUCE:

  1. enable tmux plugin in oh-my-zsh.
  2. copy-paste below code(I have this in my ~/.zshrc) in ~/.zshrc
export ZSH_TMUX_AUTOSTART=true    # Automatically starts tmux (default: false)
export ZSH_TMUX_AUTOCONNECT=false    # Automatically connect to a previous session if it exits (default: true)
export ZSH_TMUX_AUTOSTART_ONCE=true    # Autostart only if tmux hasn't been started previously (default: true)

OBSERVED RESULT:

It keeps creating new-session everytime I open terminal with previous session running.

EXPECTED RESULT:

I want it to kill all session on closing terminal (Konsole application of Kubuntu)

But I don't want it to create new session every time I open terminal. Which means I want only one session(new) running when I open terminal after closing it without connecting to previous session.

How can I stop this?

Artur Meinild avatar
vn flag
This sounds like a bug in the `oh-my-zsh` tmux plugin. And I believe it should be reported as such.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.