Internet of Tomohiro
If you found my articles interesting or useful, please donate using following links:
2022/9/15: Using a remote desktop or SSH is now disallowed from Colab runtimes
Unigine Valley Running on Google ColaboratoryYou need to use ngrok or Argo Tunnel to access desktop environment on Google Colaboratory.
ssh client
If you use Windows, you can install openssh with scoop .
More details of this procedure:
https://github.com/demotomohiro/remocolab/blob/master/README.md
If you have questions:
https://github.com/demotomohiro/remocolab/wiki/Frequently-Asked-Questions
- After you open Google Colaboratory, click "Runtime" -> "Change runtime type" in top menu and change Hardware accelerator to GPU.
!pip install git+https://github.com/demotomohiro/remocolab.git import remocolab remocolab.setupVNC()
!pip install git+https://github.com/demotomohiro/remocolab.git import remocolab remocolab.setupVNC(tunnel = "argotunnel")
After connecting VNC server, you will see the screen like this.
You can check the availability of NVIDIA OpenGL implementation with following command.
$ vglrun /opt/VirtualGL/bin/glxinfo | grep NVIDIA
If everything fine, you will see following output.
OpenGL vendor string: NVIDIA Corporation OpenGL core profile version string: 4.6.0 NVIDIA 418.67 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL version string: 4.6.0 NVIDIA 418.67 OpenGL shading language version string: 4.60 NVIDIA
Following steps are supposed to be run on remote desktop. TurboVNC Viewer can copy & paste between your PC and remote PC. OpengL programs need to be run with vglrun command or it uses software GLX/OpenGL implementation included in The TurboVNC and rendering can be slow.
If you want to run a program from SSH and display it on the VNC screen, add DISPLAY=:1 to your command like this:
$ DISPLAY=:1 vglrun firefox &
Open terminal and execute following commands.
$ su # apt install firefox # exit $ vglrun firefox
Then, open Shadertoy on the firefox.
Download Unigine Valley from Unigine Valley . Then, extract the file and run it like following command.
$ chmod +x Unigine_Valley-1.0.run $ ./Unigine_Valley-1.0.run $ cd Unigine_Valley-1.0 $ vglrun ./valley
Download the file for Linux 64bit from official Blender site. Then, extract the file and run it like following command.
$ tar xf blender-2.79b-linux-glibc219-x86_64.tar.bz2 $ cd blender-2.79b-linux-glibc219-x86_64 $ vglrun ./blender
Download the file for Linux 64bit from official Godot site. The, extract the file and run it like following command.
$ unzip Godot_v3.1-stable_x11.64.zip $ vglrun ./Godot_v3.1-stable_x11.64
remocolab download and install OpenSSH, TurboVNC , libjpeg-turbo, VirtualGL and Xfce . It run desktop on Google Colaboratory 's virtual machine and make it accessible from your PC using TurboVNC. TurboVNC send desktop screen on the server to the client PC running TurboVNC Viewer , and receive mouse and keyboard input from the client PC. TurboVNC compress desktop screen image using libjpeg-turbo before sending it. These communications are encrypted by using SSH port forwarding. remocolab configures TurboVNC so that connecting to it without using SSH is forbidden. VirtualGL allow OpenGL programs can use Hardware accelerator using a GPU on server like they are executed on normal desktop.
Open TurboVNC Viewer Options and change Encoding method to Tight + Medium-Quality JPEG or Tight + Low-Quality JPEG(WAN) . Some noise will appear but looks smoother.
Open TurboVNC Viewer Options, click Connection tab and set Remote desktop size.
by Tomohiro