I have a few scripts that need to be started as root and from cron, and need basic user interaction with zenity. To start zenity on user screen, I was used to this form of command:
DIPLAY=:0 sudo -u some_user zenity ...
But if the user is running a Wayland session:
whonow shows/dev/tty2instead of:0- the above command does not work (regardless
:0or/dev/tty2asDISPLAYvalue), and returnsError: Can't open display: /dev/tty2
Do you know the "Wayland way" to achieve a similar goal? (Although I am less interested, a MIR equivalent would be an interesting bonus...)
Again, to be clearer, my question is about Wayland user session: I have no problem when user session is running under Xorg. If you still think my question is a duplicate of this one, please explain why.