We plan to add virtual display driver support for three most popular operating systems. The driver related codes can be placed in following subdirectories win
, mac
, linux
.
It is a challenging technical task and we need to enable an entire community power to solve it. If you know a solution and willing to contribute, you are highly welcome!
Things that you need to keep in mind while making your virtual display driver solution for Deskreen:
- The driver code can be in any language you are comfortable with, the most important that the API should provide a functionality to:
- add
- set virtual display resolution
- get virtual display resolution
- get available resolutions of virtual display
- remove the virtual display
- Your driver code will be interfaced with Typescript/JavaScript after your successful submission. You don't have to write an interface for JS yourself. The community will come to help. It is going to be implemented by maintainer and other community members if there are any to volunteer. But if you want, you can participate in making a JS interface for it.
- After creating virtual display with you driver code API, it should display virtual screen in native OS Displays settings, so that user will be able to arrange it as a normal display. (similar to how commercial solutions work)
// creates a virtual display with a list of common display resolutions available, sets default display resolution to
// some decent one ex: 1280x720
driver.addVirtualDisplay() : // returns OS specific virtual display ID usually it's integer but can be other type as well.
driver.setVirtualDisplayResolution(virtualDisplayID: 123543, width: 640, height: 480) : // returns void
driver.getVirtualDisplayResolution(virtualDisplayID: 123543) : // returns object: { width: int, height: int }
driver.getAvailableVirtualDisplayResolutions(virtualDisplayID: 123543) : // returns object: { width: int, height: int }
driver.removeVirtualDisplay(virtualDisplayID: 123543) : // return void
driver.removeAllVirtualDisplays() : // return void
driver.getAllVirtualDisplays() : // returns array of virtual display objects created by driver: [{ displayID: int, width: int, height: int }, ...]
After OS updates your driver code may break. This happens even in commercial second screen software, so we need to think on how to add patches for OS updates in that case.
- rdpwrap - a tool that allows to have multiple user sessions in windows: https://github.com/stascorp/rdpwrap they have patches for each minor windows update.