Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Add ConsoleKit2 launch support #1467

Closed
wants to merge 1 commit into from

Conversation

valpackett
Copy link
Contributor

Fixes #1178.

@PureTryOut please test on Linux, I've only tested on FreeBSD.


This is similar to the logind backend, but connecting to the event loop is a bit more complicated (uses the method stolen from Weston). Plus, there's a couple lines to handle FreeBSD's "meaningless" major/minor numbers (since there's no persistent DRM_MAJOR to check against, I store the makedev() number for the first DRM device and compare against that).

@PureTryOut
Copy link

Wow thanks! I don't have much time this week, so testing will sadly have to wait till sunday.

@valpackett valpackett force-pushed the consolekit2 branch 2 times, most recently from 1a65535 to 37d7933 Compare January 15, 2019 23:02
ConsoleKit2 can be used on FreeBSD and systemd-free Linux distributions
like Alpine.
@emersion
Copy link
Member

I'm not personally willing to maintain this libdbus code.

@valpackett
Copy link
Contributor Author

I don't see the need for any maintenance at all though… libdbus API is not going to change ever. wl_event_ has been very stable too. The event loop integration doesn't touch anything else.

@emersion
Copy link
Member

That's not how it works. When we merge something, it means we officially support it. It means users can (and will) report bugs and it means contributors can send patches. The rest of wlroots can change too: the way threads/signals are handled now in the ConsoleKit2 session could break because of this, and the session interface can change too.

This patch is 879 lines of code we'll need to maintain. I don't want to have ConsoleKit2 as a second-class citizen in wlroots, nor do I want to commit to fix it when we'll find bugs in it.

@ddevault
Copy link
Contributor

Emersion has extracted sd-bus into a standalone library:

https://github.com/emersion/basu

I recommend basing this on sd-bus and shipping basu on BSD.

@emersion
Copy link
Member

emersion commented Jan 20, 2019

There's discussion about this in emersion/mako#92

basu needs to strip down more things, and it's still coming from systemd so it's still using some Linux-specific features. Alternatively, @sghctoma has been working on a sd-bus shim on top of libdbus.

@ddevault
Copy link
Contributor

Aye, some work is still necessary in these areas. In either case, the final merge will look a lot different from this, so let's close it.

@ddevault ddevault closed this Jan 20, 2019
@ddevault
Copy link
Contributor

By the way, it wouldn't bother me if ports wants to merge this patch downstream in the meanwhile.

@PureTryOut
Copy link

I haven't been able to test it yet, but we'll probably make use of this downstream indeed till there is an upstream solution. Everything better then setting a suid bit 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants