0

Let's take an example. When I run:

xkbprint $DISPLAY keyboard.ps

what happens in the system? I would like to know how the X really work because I regularly get nasty error reports such as

Fatal Error: Cannot load geometry for /tmp/launch-NawGIk/:0

             Exiting

I know that the X11 was designed in a way that it is easy to extend. But how? How does the X11 protocol work? How do the X extensions work?

2 Answers 2

4

Whatever happens, I'm pretty certain it isn't going to be what you expect.

The syntax of xkbprint(1) is

$ xkbprint sourcefile destfile

and sourcefile should be a compiled xkb file. $DISPLAY is going to resolve to something like mymachine:0.0, which isn't a very reasonable file name.

Actually, since you're running a Mac, it's echoing exactly what it's seeing: /tmp/launch-NawGIk/:0 is the special OS/X magic to let launchd run X apps. The error message means that it's not finding a geometry or display in that file. Which is no surprise since there is no file named `/tmp/launch-NawGIk/:0

Try reading the man page, and see if you don't have more luck with a compiled .xkm file.

More generally, if you want a starting introduction to X, try this article.

2
  • My man xkbprint says: "The source can be any compiled keymap (.xkm) file that includes a geometry description or an X display specification. ". He should probably express his display specification more precisely to remove confusion with file path.
    – anon
    May 25, 2009 at 14:57
  • No, that display spec is exactly the Mac standard. That lets launchd interpret the "file path" as a display for X; it results in launchd starting an X server if none is running. May 25, 2009 at 15:23
2

Man xkbprint says:

The xkbprint comman generates a printable or encapsulated PostScript description of the XKB keyboard description specified by source. The source can be any compiled keymap (.xkm) file that includes a geometry description or an X display specification.

As Charlie Martin pointed out, xkbprint is misusing your $DISPLAY as a file name. Try specifying the display more precisely, to avoid ambiguity with file name. Try man xhost. Maybe passing simple ":0" will fix the problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.