I'm using BASH on the command line, logged into another user's PC as root, via SSH.
I wish to send the user currently logged in running an X-session, a popup message, but this is the result:
root@i5:~$ xmessage now
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0
The expected result was a popup message on remote machine, saying "now".
I can replicate this on my local machine by starting a local x-session, then in a terminal if I type xmessage now
it works, but if in the terminal I su-
so I'm root and I try again, I get the same error as above.
I'm also wishing to use this in a script which needs to be run as root by cron, on my local machine and the script in certain instances, will alert me and request that I choose one of two buttons giving feedback to the script.
-display
parameter or it's syntax.