Skip to content
Advertisement

Check if at least one Wayland session is running

I’m using Qt and want to check if any Wayland session is running.

For now I have this just for test code, that works as expected:

JavaScript

Is it possible to get rid of QProcess and use Linux C++ API?

Advertisement

Answer

You can try to connect to Wayland. If you can connect to a Wayland composer it is running otherwise is not running or someone haven’t set the environment variables correctly and not used the default name.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement