Retrieving config filename.

Alan Cox alan at lxorguk.ukuu.org.uk
Wed Oct 20 11:57:26 PDT 2004


On Sul, 2004-10-17 at 19:57, Roland Mainz wrote:
> 3. For the Xorg server there is an API in the Xfree86Misc extension.
> Example:
> -- snip --
> int dummy;
> int major = 0;
> XF86MiscFilePaths xfpaths;
> 
> if (XF86MiscQueryExtension(dpy, &dummy, &dummy) &&
>     XF86MiscQueryVersion(dpy, &major, &dummy) &&
>     (major > 0) && 
>     XF86MiscGetFilePaths(dpy, &xfpaths)) {
>     printf("File paths:\n");
>     printf("  Config file:  %s\n", xfpaths.configfile);
>     printf("  Modules path: %s\n", xfpaths.modulepath);
>     printf("  Log file:     %s\n", xfpaths.logfile);
> }
> -- snip --
> ... but again... this is a specific API for the "Xorg" server and won't
> work for everything else except "Xorg" ...

It also only works in some situations on Xorg. You must be local, you
must have access and you have to be in the same namespace or know the
namespace translations for the X server.





More information about the xorg mailing list