Linux – How to capture desktop screen in Linux and draw in window

How to capture desktop screen in Linux and draw in window… here is a solution to the problem.

How to capture desktop screen in Linux and draw in window

I’m new to Linux and I need to port my Windows programs to Linux and need help with.

  1. I need to take a screenshot.
  2. I need to create a window without borders and titles that cover the entire screen.
  3. I need to draw the capture screen on that window.
  4. I need to alpha blend a black picture on the window with XX% opacity.

All of this can be easily done on Windows using GetDC(NULL), BitBlt(), and AlphaBlend().

Linux looks very difficult when dealing with such a simple program.

Solution

For Linux; You can always check the source of scrot — a small, simple screenshot program.

Related Problems and Solutions