zellij icon indicating copy to clipboard operation
zellij copied to clipboard

How to start Multi-user session?

Open elevaitleo opened this issue 3 years ago • 4 comments

Hey there, thank you so much for this tool, it really looks promising and solves exactly one of the problems we have right now: the ability to have a multi-user session with multiple cursors (unlike tmate.io which is really nice but has only one cursors forcing us to be super disciplined).

However, I was not able to start a "real" multi-user session, in the sense that different users on the same machine are able to attach or even see the same zellij session.

I downloaded the latest binary (0.26.1). Whenever one user starts a zellij session, the others users cannot see it via zellij ls and are not able to attach. Is this expected behavior? That is: should I create a single user on the machine for share zellij sessions (I would prefer if I didn't have to do it...)? Is there something that I should take care of?

Thanks in advance!

elevaitleo avatar Mar 31 '22 11:03 elevaitleo

Hey @elevaitleo ! I'm very happy to hear you're excited about this feature.

I totally get what you're saying about not wanting to have a specialized user, but for now you do have to all be logged into the same user. The reason for this is that having multiple users log into the same session is a bit of a security issue we're not too thrilled about (imagine being able to just move focus to another user's terminal pane and gain root access).

This isn't a hard decision though, and so it's good feedback to get. In general multiplayer sessions are a bit of a new feature, and so they might be a little rough around the edges. Any further feedback you have or bugs you find would be very welcome!

imsnif avatar Mar 31 '22 12:03 imsnif

Hey @imsnif , many thanks for the quick answer, at least I know what to do now :-) My issue with all users using the same account is about ssh keys: we typically use ssh to push and pull code and that means this "multiplayer-user" needs one private ssh key to be able to do so. In addition, the commits still need an author, and thus the "driver" would have to make the right configurations for git.

But I guess we can find some work-arounds. Any suggestions on the best practices or tips for multiplayer usage are very wellcome!

elevaitleo avatar Mar 31 '22 13:03 elevaitleo

Hum. That makes sense. I wonder if we can somehow limit the users in a session to a certain group - maybe that's the solution we actually want here?

As for multiplayer session tips, a short while ago we did a stream of a multiplayer session, you can check out the recording if you like: https://www.youtube.com/watch?v=G1iCXWJybvE

imsnif avatar Mar 31 '22 14:03 imsnif

If zellij operates like tmux (client and server, using a unix domain socket), you could just create the socket with 700 permissions in a known location. Now the user creating the socket can control, who can join. And he can later change the permissions again.

We are in the same situation like the issue author.

At the moment we use tmux and attach from our respective os users. If I want to "throw out" my colleagues, I just change the permissions on the socket and detach them.

Of course, they could have installed a trojaner/virus or something already. But for me it is more about privacy and not security, as I trust my colleagues generally.

typetetris avatar Jul 08 '22 07:07 typetetris

Hey,

Any update on this topic? I agree with @typetetris, I trust my colleagues generally speaking.

Socket seems a reasonable approach to me.

alexandrestein avatar May 06 '23 14:05 alexandrestein

I would like to see a multi user session feature, for security reasons I suggest the approach like how screen operates it

by activating multi user mode inside the active session then giving users or groups permission to attach to it

:multiusersession on :adduser user1 user2 user3 :addgroup group1

IIIzP0III avatar Aug 18 '23 02:08 IIIzP0III

Would love to see multiplayer in zellig.

If you want some prior art on how to accomplish this, look at wemux https://github.com/zolrath/wemux

It works basically how @typetetris described but with the edges smoothed out a bit.

bsima avatar Aug 23 '23 23:08 bsima