demotomohiro / remocolab

remocolab is a Python module to allow remote access to Google Colaboratory using SSH or TurboVNC.
MIT License
316 stars 229 forks source link

Colab TurboVNC root session. #49

Closed vbuterin2 closed 2 years ago

vbuterin2 commented 4 years ago

When I'm using turboVNC, we can only login using our colab account. Can we login using our root account so that we have two simultaneous online turbo VNC sessions?

demotomohiro commented 4 years ago

I cannot run turboVNC server as root.

You can login to same turboVNC server from different PCs at sametime without changing remocolab code. When you type something on one of the client PC, typed text appears almost instantly on another client PC. It works like a 1 PC with 2 keyboards.

You can also run 2 TurboVNC servers at sametime on a colab machine and 2 client PCs can login to each TurboVNC servers.

  1. After remocolab.setupVNC() done, login to the colab via ssh or VNC and open terminal.
  2. Run /opt/TurboVNC/bin/vncserver as user colab.
  3. On 2nd client PC, open terminal and run ssh command for local forwarding for VNC but change -L 5901:localhost:5901 part to -L 5901:localhost:5902.
  4. You can login to the 2nd VNC server from 2nd client PC in the same way as 1st client PC.

First TurboVNC server listen on port 5901 and 2nd one listen on port 5902. So 2nd ssh command forwards port 5901 on the 2nd client to port 5902 on the server.

tumble-weed commented 2 years ago

hi, i tried mixing up remocolab with colab-ssh . i modified some of the functionality, but i think i ran into an error that is related to your observation

I cannot run turboVNC server as root.

i didnt make the colab user but instead ran this line without the colab user. I was not able to connect to the service. can you give me an idea why vnc might not run without the colab user?

thanks

demotomohiro commented 2 years ago

Because _setupVNC is supposed to be called after _setupSSHDMain done successfully. remocolab runs turboVNC server as colab. I cannot run turboVNC server as root.