Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 2
    What if there is no X server running on the machine, but X is forwarded from another machine (e.g. using ssh -X)? Commented Mar 8, 2018 at 20:36
  • I try to deal only with local X session, but if you have a magic trick to deal both on local and remote, welcome Commented Mar 8, 2018 at 21:15
  • For the same user, I think it's not necessary to force XAUTHORITY (tested with zenity in cron) Commented Mar 8, 2018 at 22:07
  • The same user may have an additional authentication with xhost Check the output of xhost, remove the entry with xhost -SI:localuser:USERNAME and try again. xhost entries can be given, but do not rely on them. Commented Mar 8, 2018 at 22:10
  • What's strange is that if I force XAUTHORITY to what I fetched from Xorg command or other places, in cron, I get error 'Unable to init server: Could not connect: Connection refused' (with the good DISPLAY and the same user) Commented Mar 8, 2018 at 22:26