I created some tmux session a while a ago, since then I've been added to some unix groups. As the tmux server has started before I was added into the groups, all shell I create in tmux won't be part of thoses groups.
I know there is this two thead who are related. 1 2
In the first one they use newgrp which open a new shell with a new group (if we have the right). It's not what I want for multiples reasons:
- I'll have to do it for each groups (potentially a lot)
- I'll have to do it for each new window/pane I'll create (potentially a lot)
- I won't have access to the commands line history on the shells already open (potentially a lot)
In the second one, they simply kill the tmux server. I don't want to do that because I will lose all the shells history, and then I'll have to resetup all my env.
Is there a way to update the groups of the tmux server, and pass them to the open shells (potentially with a magic linux command)?