Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 users using subl at the same time #11

Open
botmike opened this issue Jan 29, 2020 · 3 comments
Open

2 users using subl at the same time #11

botmike opened this issue Jan 29, 2020 · 3 comments

Comments

@botmike
Copy link

botmike commented Jan 29, 2020

If I have 2 users, one logged tunneled on computerA as:
ssh -R 52698:localhost:52698 [email protected]

Another tunneld on computerB as:
ssh -R 52699:localhost:52699 [email protected]

using
subl myfile.txt

opens it only on the 1st persons computerA (no matter which user when do it with)

So, can we tunnel with different ports for different users instead of just 52698 (so that different people can edit with sublime on different machines, or are we restricted to only one person using this at a time) ?

@randy3k
Copy link
Owner

randy3k commented Jan 29, 2020

you could forward a different remote port to the local machine 52698.

To connect to a different port via the rmate client, you could either set the env variable RMATE_PORT or pass the argument -p <number> to rmate.

@botmike
Copy link
Author

botmike commented Jan 30, 2020

So while someone (user1) was using this on another machine, eg:
ssh -R 52699:localhost:52699 [email protected]

I tried:
ssh -R 52696:localhost:52696 [email protected]

then:
rsubl myfile -p 52696

and got:
setsockopt TCP_NODELAY: Invalid argument
connect_to localhost port 52696: failed.

I dont think I am doing this right, I'm not even sure what I should be doing, if we are both on the same IP, how will it know to open sublime on one computer (if using one port) and then open sublime on another computer if using another port.

Has anyone had experience of using this plugin with 2 different users on the same network?
can it be done?

(I tried using rsubl myfile -p 52698, but that opened up on my friends sublime, because he had the tunnel opened 1st, I dont know how this can work with 2 users on the same network)

@botmike
Copy link
Author

botmike commented Jan 30, 2020

figured it out(I was being dumb), both users have to use port numbers, like:

ssh -R 52679:localhost:52696 [email protected]
rsubl -p 52679 myfile2

and

ssh -R 52678:localhost:52696 [email protected]
rsubl -p 52678 myfile1

solution was mentioned here:
https://acarril.github.io/posts/ssh-sripts-st3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants