I need to check if my Qt GUI application is already running in the current X session. That is, I want to forbid running several instances of it. But running several instances by different users or by the same user on another (i.e. remote) X server should be allowed.
How can this be done?
Thank you.