Quantcast
Channel: Tech TLDR;
Viewing all articles
Browse latest Browse all 6

Debugging Xvfb Server with VNC

$
0
0

Recently I had to debug an issue with Xvfb server. It was hard to debug, because I was not able to “see” what was going on.

I was able to reproduce and fix one of the issues by mimicking the build server in a Vagrant box. When I tried the fix on the build server, however, something else was wrong. I was able to isolate and resolve the final issue, by getting a VNC server to connect to Xvfb virtual window, by taking the following steps.

On the remote server

  1. Run Xvfb server: Xvfb :99
  2. Install and run x11vnc and point it to the same window x11vnc -display :99. Note this will output the port that x11vnc is running on, in my case it was 5900.

On the local machine

  1. Forward remote port via SSH to local port:
    ssh -p 2222 vagrant@127.0.0.1 -L 5900:127.0.0.1:5900 -N,
    where -p is the port SSH is running on, usually it’s 22 and can be omitted. vagrant@127.0.0.1 is a username and IP of the remote machine. In my case it’s the localhost IP, but with a real server it would be different. 5900 is the port, outputted when x11vnc was started.
  2. Install vncviewer (i.e. brew install tiger-vnc), and open it from command line pointing it to the localhost IP and port: vncviewer 127.0.0.1:5900.

On the remote server

  1. Run whichever app you are trying to run in the Xvfb server: DISPLAY=:99 google-chrome. It should show up in the VNC viewer.

The post Debugging Xvfb Server with VNC appeared first on Tech TLDR;.


Viewing all articles
Browse latest Browse all 6

Trending Articles