XLib and Xvfb: capture screen

2017-02-08 Thread Alex Sviridov
Hi all This is my c++ code which I use to capture screen:     Display* display = XOpenDisplay(NULL);     Window root = DefaultRootWindow(display);     XWindowAttributes attributes = {0};     XGetWindowAttributes(display, root, &attributes);     int width, height;     width = attributes.width;    

Xlib: capture screen in separate xserver session

2017-02-07 Thread Alex Sviridov
Hi all. I need to run some-program which makes screen capturing via xlib library in separate xserver session. So, I start my ubuntu 14 and `origin` xserver session (lets call it this way) starts. After that I run     startx some-program After running this command a black screen appears and on t