Xephyr allows no proper access from a different user
Submitted by Lasse Kliemann
Assigned to Xorg Project Team
Description
Version: the one that comes with Ubuntu 13.04, with all recent updates.
Here is how to reproduce.
Prepare Xephyr:
xauth -f /tmp/xauth.test add :10 . $(mcookie) chmod a+r /tmp/xauth.test Xephyr :10 -auth /tmp/xauth.test
Then switch user, e.g. by su, and as the new user:
export DISPLAY=:10 export XAUTHORITY=/tmp/xauth.test
Many X applications will work and indeed use Xephyr as their display.
However, some (e.g. okular) will fail and just show an empty rectangle, giving the following error message:
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x105
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x151
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x20001b
...and so on.
I guess the first two regarding the MIT-SHM extension are the most significant ones.
When not switching users, everything works fine.
As far as I see, the cookie should be enough for full access.