Bug 18427

Summary: Use library instead of libexec for public interface
Product: ConsoleKit Reporter: Dan Nicholson <dbn.lists>
Component: DaemonAssignee: william.jon.mccann
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dj, lars.bamberger, rstrode
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Trivial patch to provide libexecdir to pkg-config

Description Dan Nicholson 2008-11-07 07:46:44 UTC
GDM currently calls out to ck-get-x11-display-device during operation. However, since this is in libexecdir, GDM can only make a guess where it is. I think it would be convenient to move these to a library that the libexec binaries would just be thin wrappers over and that GDM could link to. See GNOME bug 554140 for reference:

http://bugzilla.gnome.org/show_bug.cgi?id=554140

So, I'm proposing a new library, libck-util, that would initially just have two APIs:

char *
ck_util_get_x11_display_device (Display *display);

int
ck_util_get_x11_server_pid (Display *display);

I admittedly suck at API; I have no attachment to these. I'll write the patches if you think this is worth it.

At some later point, it might be nice to move other things utility routines into libck-util, like a platform-abstracted VT interface.
Comment 1 Brian Cameron 2009-01-27 13:41:15 UTC
If ConsoleKit were to install a pkgconfig file to /usr/lib/pkgconfig, this
would be another way to advertise where the scripts are stored, which might
be easier than creating a new library.

Note the dbus-1.pc uses this sort of technique to advertise where the daemon
lives (via the daemondir variable).
Comment 2 DJ Lucas 2009-09-26 17:29:18 UTC
Created attachment 29875 [details] [review]
Trivial patch to provide libexecdir to pkg-config
Comment 3 DJ Lucas 2009-09-26 17:30:32 UTC
Please, at very least, add the libexecdir to the pc file for ck-connector as I plan to send a patch for GDM that depends on it.  GDM bug will be linked to this one.

TIA.
Comment 4 DJ Lucas 2009-09-26 17:48:33 UTC
And vice-versa, https://bugzilla.gnome.org/show_bug.cgi?id=554140
Comment 5 Ray Strode [halfline] 2010-12-17 12:25:02 UTC
Comment on attachment 29875 [details] [review]
Trivial patch to provide libexecdir to pkg-config

This is commited now.
Comment 6 Michael Biebl 2012-03-19 09:24:17 UTC
Committed as bdd4b0ca1c7e766649349a4b2a131f1f795d6ad6 
and part of the 0.4.4 release.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.