Does Mac X11 have the XTEST extension?

2019-03-18 03:54发布

问题:

So I moved some X programs down to the mac, and I'm getting

Error: XTEST extension unavailable on '(null)'.

from xdotool.

  • Does OS X X11 come with XTEST?

  • If not, is there a way to add it?

回答1:

Run the following command in the Terminal:

defaults write org.x.X11 enable_test_extensions -boolean true

(as per here). Then quit and restart the X server; the XTEST extension should then be available.



回答2:

I had to do the following two commands to get this to work on Mountain Lion (from here):

defaults write org.x.X11 enable_test_extensions -boolean true
defaults write org.macosforge.xquartz.X11 enable_test_extensions -boolean true


回答3:

For XQuartz,

defaults write org.macosforge.xquartz.X11 enable_test_extensions -bool yes

See this link.



回答4:

Mac has test extension as part of the open source XQuartz project (if installed).

The X11.app was available by default for Mac OS X v10.5-10.7, but since Mountain Lion, Apple dropped dedicated support for X11.app, with users directed to the open source XQuartz project (to which it contributes) instead.

To test if the TEST extension is enabled, try the following commands:

$ defaults read org.x.X11
{
    "enable_test_extensions" = 1;
}
$ defaults read org.macosforge.xquartz.X11
{
...
    "enable_test_extensions" = 1;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}

For downloading instructions, check XQuartz page.



标签: macos x11