1

I currently develop a program that will launch an X client in a different user than the currently logged in. unfortunately I cannot find any examples or resources on doing the X Authorization.

Can someone help me understanding the Xauth library and how to use it to authorize my client?

What I already got is access to the logged in users XAuthority file ($HOME/.Xauthority).

ftp://www.x.org/pub/X11R7.7/doc/man/man3/Xau.3.xhtml

Here is the Xau documentation. There is only stated how I read the authorization file via XauReadAuth. Is reading the file enough? Do I need to add the Xauth data somewhere to gain access to the display?

Nidhoegger
  • 4,973
  • 4
  • 36
  • 81
  • 1
    Have you tried setting the XAUTHORITY environment variable to point to the user's Xauthority file, before doing XOpenDisplay? That might save you a lot of trouble... (manual: setenv). – JvO Oct 10 '17 at 08:08
  • that also came across my mind. I think that will be the way. thanks! – Nidhoegger Oct 10 '17 at 08:14

0 Answers0