How can I use another user's display

bash, ssh

Solution

By default, most X servers disallow other users displaying to each other's screens. If you want to disable this protection, you might be able to using xhost.

Problem

I'm using xdotool in a SSH connection logged in as root, I'm setting `DISPLAY=":0.0"` which is what `echo $DISPLAY` on the logged user says. But I get a error unless I `su` to the other user: ``` root@sb:~# export DISPLAY=":0.0" root@sb:~# xdotool getactivewindow No protocol specified No protocol specified Error: Can't open display: (null) Segmentation fault (core dumped) ``` ``` geerm@sb:~$ export DISPLAY=":0.0" geerm@sb:~$ xdotool getactivewindow 41943046 ``` Is this even possible? If so, what do I need to change to use the logged in user's session?

Original source