<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>I am developing a remote support product. It is like a vnc server. I have used xcb for screen capturing and input simulation.<br><br></div>My use case is as follows.<br><br></div>1) I have a service that runs as root, this service does many actions other than remote support stuff.<br></div>2) This service is responsible for invoking my remote support binary, for unattended/attended access.<br><br></div>I want to do the following<br><br></div>1) If local user has not logged in or is in login screen, start my remote desktop process as root with DISPLAY= the id of display manager greeter. Here the problem is , how to <br></div>  > Detect that user is in login screen if there are multiple logged in users across different dms (If I try starting my agent with the display id and xauthority files of logged in users, my screen capture data using xcb is black)<br><div><div><div>  > Find the xauthority file of the display manager login screen across multiple dms like kdm , light dm etc (or is lightdm becoming defacto?)<br><br></div><div>2) If local user is logged in, find this user as their  display is active (xcb screen capture doesn't give a horrid blank) and also the display id and xauthority files.<br><br><br><br></div><div>The thing is I don't want to create new virtual displays, connect to the one that is actually used. I know there is no idea of "current" display in X11, but even if multiple displays are active, if I connect to one in background, it gives no data as I suspect the desktop environment is stopped for that display.<br><br><br><br></div><div>I understand this question might not be directly releavant to x11 alone and may involve display manager specific stuff, but my knowledge of X, display managers etc is  quite currently limited. <br><br><br><br></div><div>Thank you,<br><br></div><div>R. Sai Prasanna<br></div><div><br><br><br></div><div><br><br><br><br><br></div></div></div></div>