" ". .
This is not enough to get a window to display reliably. In practice, you will have to determine if there is a user who is currently logged in and get your desktop. This is not a trivial obligation and can be a source of security problems. If no one is currently registered, you're out of luck.
The best solution is to have a separate graphical application that talks about the service through some IPC mechanism.
source
share