티스토리 뷰

1. Install TurboVNC in the remote server, if it is not installed

2. SSH to the remote server normally. don't need -X, -Y, -L, -A. Then run,

/opt/TurboVNC/bin/vncserver :5017 -rfbport 5017 -SecurityTypes none  -localhost -vgl -fg -log /dev/stderr   

(if you are not sudo, just replace /dev/stderr with /tmp/turbovnc.log)

Keep this running.

2. Install VNC in your local laptop, or TigerVNC if your laptop is TigerVNC

3. SSH to the remote server like this: ssh -L 5017:localhost:5017

4. Run export DISPLAY=:5017

5. Luanch VNC or TigerVNC in your local laptop and connect to localhost:5017, to recieve communication from the remote server

6. Test if it works:

(Run `export XDG_RUNTIME_DIR=/run/user/$(id -u)` before, if you don't like to see error messages.)

Run `vglrun -d :5017 /usr/bin/glxgears` 

Run `eog teaser.png`


What VNC Does:

  1. Remote Desktop Access: VNC enables you to see and control the desktop environment of the remote machine. It captures the screen, mouse, and keyboard input on the server and transmits them over the network to your local machine (client). You can interact with the remote server as if you were physically present.
  2. Client-Server Model:
    • VNC Server: The VNC server runs on the remote machine (your server). It serves the desktop environment to any connected VNC client and forwards your inputs to the server.
    • VNC Client: The client runs on your local machine (your laptop). It connects to the server, receives the display updates, and sends your mouse clicks and keyboard inputs back to the server.
  3. Screen Sharing: The VNC server captures the screen (visual data) of the remote machine and compresses it for transmission. The VNC client on your laptop receives the data and displays it. This is how you are able to view and interact with applications (like viewing images) running on the remote machine.
  4. Port Forwarding (SSH Tunnel): To secure the connection, you're forwarding the VNC server's port through an SSH tunnel (via ssh -L 5017:localhost:5017 <server>). This prevents the VNC connection from being exposed to the internet, and instead it’s only accessible through the SSH tunnel, making it more secure.
  5. Why Use VNC for 3D Apps or Image Viewing: Applications that rely on 3D rendering (like the ones you're using with vglrun) need graphical output that isn't easily handled by just forwarding the X11 display over SSH. VNC solves this by letting you interact with the full graphical environment of the remote server, which can include advanced visual outputs like 3D rendering, images, or GUI-based programs.

 

What vglrun Does:

  1. GPU Offloading: When running a 3D-accelerated application (like OpenGL-based programs), vglrun redirects the rendering process to the server’s GPU. Instead of using the local machine's GPU, it uses the powerful GPU resources on the remote server, which is particularly useful for rendering complex 3D graphics.
  2. Separation of Rendering and Display: vglrun decouples the rendering (which happens on the server’s GPU) from the display (which happens on your local machine). It captures the frames rendered by the remote GPU and compresses them before sending them to the client.
  3. Forwarding 3D Output:
    • The 3D application (e.g., glxgears) runs on the remote server and generates frames using the server’s GPU.
    • vglrun intercepts these frames, compresses them, and forwards them over the network.
    • The frames are then displayed on your local machine (in this case, through the VNC connection).
  4. Virtual Display Driver: The vglrun command uses a virtual display driver to intercept OpenGL calls and direct them to the server’s GPU. It ensures that OpenGL applications think they are rendering directly to the display, but in reality, the output is redirected to VirtualGL, which sends it to the client machine.

 

Me: So, if you just run /usr/bin/glxgears without vglrun, does my local laptop renders and display?

Comparison with vglrun:

  • Without vglrun: The graphics are rendered and displayed on the remote server, and the display is forwarded over VNC or X11, which can be slow and inefficient for 3D applications.
  • With vglrun: The graphics are still rendered on the remote server's GPU, but VirtualGL intercepts the rendering process, compresses the frames, and forwards the output efficiently to your local machine, resulting in better performance for 3D applications.

'Research (연구 관련)' 카테고리의 다른 글

Human Hand Function: Conclusion  (0) 2024.09.14
What is prehension? - Noriko Kamakura  (0) 2024.09.14
HuMoR  (0) 2024.09.06
Quarternions / Gimbal lock  (0) 2024.09.01
Capture data from ARIA glasses  (0) 2024.08.30
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함