I have used this functionality extensively, and wrote a few scripts to make it easier to run programs as other users. So I ran into this rather quickly on 15.04. As a workaround, you can use xauth instead. For example, as a script:
#!/bin/sh OTHER_USER=user2 echo "Giving $OTHER_USER xauth key" XAUTH_KEY=$(xauth list | grep $(uname -n) | sed -n '1,1p' | cut -d ' ' -f 5) #If XAUTHORITY is set, it probably won't be a file writable by the other user unset XAUTHORITY sudo -Hu $OTHER_USER xauth add $DISPLAY . $XAUTH_KEY sudo -Hu $OTHER_USER xclock echo "Taking $OTHER_USER xauth key" sudo -Hu $OTHER_USER xauth remove $DISPLAY -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to x11-xserver-utils in Ubuntu. https://bugs.launchpad.net/bugs/1448431 Title: xhost access control fails to add other users To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/x11-xserver-utils/+bug/1448431/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp