3

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) started and after that I run

startx some-program

After running this command a black screen appears and on this black screen I see my program and it works as expected. That's ok - this is what I need.

However, firstly I want to use my computer and secondly I must run N such programs in N separate xserver sessions. The problem is that when I try to return to my origin session by pressing ctrl+alt+f7 some-program continues working however, its screen captures become simple black rectangles (no any content).

How can I start my some-program in separate xserver session and leave it running as I am still using that session?

1

I got the answer in xorg mailing list:

Using it this way is nearly impossible: for some historical reasons, inactive server stops drawing. Well, not just historical: it is a reasinable approach to stop wasting resources to draw unseen things.

However, you can start virtual X server (like standard Xvfb),and draw on it just fine.

You can even try to work interactively with programs on that server via something like x2x or x11vnc or x2godesktopsharing, however, usually interactive experience is worse than with console server.

Also, no hardware 3D acceleration will be available. It also works only on active console currently. If you need it, you can try to use some server-in-window servers like xpra, however, it is not perfect (and all attempts to implement it in the past -- Xgl, AIGLX was not perfect also).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.