All posts by Rodion Nikolaev

Time tracking for Ubuntu, Debian & other Linux systems

We have updated the Screenshot Monitor desktop application for Linux to better support Ubuntu, Debian and derivatives (Mint, Elementary OS, etc). The installation now is more familiar through the Debian or RPM packages. Users of Ubuntu, Debian would only need to download the appropriate package file and run the installation

Download Screenshot Monitor for Linux – follow this link and select the appropriate package:

install

After installing the application, it will add the shortcut to the list of installed applications.  For convenience you can put a shortcut to the desktop or to the quick menu.

Screenshot from 2015-03-04 12_34_15

What is Screenshot Monitor?

Screenshot Monitor for is desktop application for employees (PC, Mac OS X, Linux). It is started and stopped by an employee to track time and take their computer screenshots during work. No other information is being collected – this is NOT a spying tool. The time and screenshots are being sent to the web where managers can see them through the browser.

Capturing screenshots in .NET and Mono

Taking screenshots (screen captures) of user displays in a .NET application is quite straightforward on Windows thanks to the Graphics.CopyFromScreen() method.   If you want to take screenshots in your .NET Mono application on Linux or Mac OS X however, you will experience difficulties as System.Drawing implementation is incomplete on Mono.

Another limitation of Graphics.CopyFromScreen()  is that you cannot take a screenshot of multiple displays at once.

We have stumbled on these problems when we needed to take screen captures reliably on all three platforms in our time tracking application Screenshot Monitor. So we have created a tiny open source .NET library that allows receiving screenshots of the main or all computer displays under Windows, Linux or Mac OS X (with Mono).

You can add it to your project via NuGet package:

PM> Install-Package Pranas.ScreenshotCapture

Then, you can start taking screenshots like this:

// take screenshot from primary display only
Image screen = Pranas.ScreenshotCapture.TakeScreenshot(true);
screen.Save("PrimaryDisplay.png");

This library also allows taking screenshots from all of the displays at once with a single call like this:

// take screenshot from all displays at once
Image screen = Pranas.ScreenshotCapture.TakeScreenshot();
screen.Save("AllDisplays.png");

You can grab the source code or fork us on GitHub. The library is under MIT license, so basically can be used anywhere. Happy coding!