Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ConsoleKit: Is it needed/useful?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2509
Location: Canada

PostPosted: Thu Oct 08, 2009 10:51 pm    Post subject: Reply with quote

i92guboj wrote:
This gives a better insight about the whole thing, it also tells you in which circumstances it can be useful.

http://fedoraproject.org/wiki/Desktop/FastUserSwitching


It looks like Fedora pushes quite a few technologies (KMS, ConsoleKit) which main justification is 'Fast User Switching'. Hardly a critical issue for many ?
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Oct 08, 2009 11:21 pm    Post subject: Reply with quote

Zarhan wrote:
I hope it's not in a bunch of XML files like some of the recent stuff Freedesktop.org has been touting...
In fact, it is, see /etc/dbus-1/system.d/ConsoleKit.conf

and it needs to be patched to work properly with KDE4 powerdevil.
Code:
diff -Naur ConsoleKit.conf.old ConsoleKit.conf.new
--- ConsoleKit.conf.old 2009-09-15 10:29:27.000000000 -0400
+++ ConsoleKit.conf.new 2009-10-08 19:19:40.757795542 -0400
@@ -8,13 +8,14 @@
     <allow own="org.freedesktop.ConsoleKit"/>

     <!-- Allow all methods on interfaces -->
-    <allow send_interface="org.freedesktop.ConsoleKit.Manager"/>
-    <allow send_interface="org.freedesktop.ConsoleKit.Seat"/>
-    <allow send_interface="org.freedesktop.ConsoleKit.Session"/>
+    <allow send_destination="org.freedesktop.ConsoleKit"/>
   </policy>

   <!-- Deny all and then allow some methods on interfaces -->
   <policy context="default">
+    <allow send_destination="org.freedesktop.ConsoleKit"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
+
     <deny send_interface="org.freedesktop.ConsoleKit.Manager"/>
     <deny send_interface="org.freedesktop.ConsoleKit.Seat"/>
     <deny send_interface="org.freedesktop.ConsoleKit.Session"/>
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3373

PostPosted: Tue Oct 13, 2009 1:34 pm    Post subject: Reply with quote

dmpogo wrote:
i92guboj wrote:
This gives a better insight about the whole thing, it also tells you in which circumstances it can be useful.

http://fedoraproject.org/wiki/Desktop/FastUserSwitching


It looks like Fedora pushes quite a few technologies (KMS, ConsoleKit) which main justification is 'Fast User Switching'. Hardly a critical issue for many ?


I'm not a Fast User Switching user, either. But I acknowledge that ConsoleKit is a better way to dole out console privileges than simply using groups. Maybe I can trust myself to get full group-based permissions, though I've been known to do something wrong every now and then. But I also have other users in the family who don't understand as well, and ConsoleKit is the right way to give them enough permission, at the right time.

I also think that KMS will be really neat to have one of these days for purposes other than FUS. For instance when something hangs it should make it possible for the kernel to switch things back to a console and show the oops. Right now Magic-SysRq R-E-I-S-S-S-U-B usually gets the system back, but it would be nicer to be seeing those "Sync Complete" messages, and not just typing keys blind. I guess an occasional kernel spasm is the price I pay for running ~arch kernels with some out-of-tree drivers, etc. I think KMS will make that nicer.

That said, I also HATE the not-discoverably-documented XML stuff that keeps showing up. There are always problems cropping up, and a few gurus giving the solutions to problems. Furthermore, those solutions are always "obvious" in hindsight, but generally without having known the answer, there was no way to get to the answer. That is, without having read a pile of documentation and having become a HAL/*Kit expert. That's why I say "not-discoverably-documented" above - because as bad as xf86config is, that's how I learned it - I learned enough to do what I needed to do, each time I had a problem. That method doesn't seem to work with HAL/*Kit. It seems to be at-the-mercy-of-others or become an expert.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2509
Location: Canada

PostPosted: Tue Oct 13, 2009 7:02 pm    Post subject: Reply with quote

depontius wrote:


That said, I also HATE the not-discoverably-documented XML stuff that keeps showing up. There are always problems cropping up, and a few gurus giving the solutions to problems. Furthermore, those solutions are always "obvious" in hindsight, but generally without having known the answer, there was no way to get to the answer. That is, without having read a pile of documentation and having become a HAL/*Kit expert. That's why I say "not-discoverably-documented" above - because as bad as xf86config is, that's how I learned it - I learned enough to do what I needed to do, each time I had a problem. That method doesn't seem to work with HAL/*Kit. It seems to be at-the-mercy-of-others or become an expert.


Don't even want to start about THAT :(
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3373

PostPosted: Wed Oct 14, 2009 11:59 pm    Post subject: Reply with quote

dmpogo wrote:
Don't even want to start about THAT :(


One of those things on my list-of-things-to-do is to write an editorial letter to Carla Schroeder and Linux Today. Basically, "just works" is a great idea as long as you can still open the hood and do it yourself. IMHO, the hood on HAL/*Kit isn't welded shut, but it's got a nasty combination lock on it.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Oct 15, 2009 12:59 am    Post subject: Reply with quote

depontius wrote:
dmpogo wrote:
i92guboj wrote:
This gives a better insight about the whole thing, it also tells you in which circumstances it can be useful.

http://fedoraproject.org/wiki/Desktop/FastUserSwitching


It looks like Fedora pushes quite a few technologies (KMS, ConsoleKit) which main justification is 'Fast User Switching'. Hardly a critical issue for many ?


I'm not a Fast User Switching user, either. But I acknowledge that ConsoleKit is a better way to dole out console privileges than simply using groups. Maybe I can trust myself to get full group-based permissions, though I've been known to do something wrong every now and then. But I also have other users in the family who don't understand as well, and ConsoleKit is the right way to give them enough permission, at the right time.


It's not just about permissions and stuff. I am yet to find if this will evolve into anything useful or not, but it has some potential they way I see it.

For example, right now a lot of stuff like automounting, notifications, etc are handled in a very rough and ugly way, they ever were. It would be nice if I could get a notification in my desktop regardless of the WM or DE that I am using, things like automounting and notifications, hardware detection, etc. should be moved outside the DE, because that's a thing from the OS. Moving them into the DE only causes bloat, and portability issues, a lot.

Wouldn't it be nice if a program could send the notification to the active session whatever it is and regardless if it's a kde, gnome, xfce, fvwm or console session in an appropriate way? Things like the UID could as well be used to decide not to show sensitive info, consolekit is aware of that as well. Right now there's no easy way to do so, but it seems that consolekit understands enough about your sessions to be able to do all of that and more, this is the output of ck-list-sessions after having started the consolekit session at bootupt:

Code:
Session1:
        unix-user = '1000'
        realname = ''
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty4'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2009-10-14T17:17:01.182326Z'
        login-session-id = '4294967295'



In the same way that kernel mode setting has moved that into the OS and out of an specific program (x server), consolekit has the potential to move some more things were they belong, so desktops can concentrate in what they should concentrate: offer an UI, and not dealing with the hardware and system services. That should be in a much lower level.

As said, we will have to wait to see if this really evolves into something really useful, and not the mess and useless thing that hal has always been.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Oct 15, 2009 1:17 am    Post subject: Reply with quote

Yes, and with normal (not xml) config files. And with good documentation.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3373

PostPosted: Thu Oct 15, 2009 12:09 pm    Post subject: Reply with quote

I could even put up with xml configuration, as long as it's "discoverable", and not the "hindsight crap" we seem to have, today.

Let's take a current example, the xserver-1.6 upgrade guide. http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.6-upgrade-guide.xml

I'm used to using Ctl-Alt_Backspace as a nearly-last-resort to kill an X session when a bad app grabs things too hard. With the new xserver-1.6 that's no longer enabled by default. If you want it, you've got to re-enable it.

If you're using HAL :
<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

If you're using xorg.conf :
Option "XkbOptions" "terminate:ctrl_alt_bksp"

With the HAL version, they tell what file to insert it in, and if you have no such file, where to get the prototype. But they don't tell where in the file to insert it, and the file looks clearly context-sensitive. I guessed, but haven't tested it yet. Plus I've only done this on one system - I haven't gotten around to doing it in the other systems, yet.

The two option specifications look clearly similar, but the HAL option looks like it's part of a hierarchical namespace. I can go into /usr/share/fdi/... and find lots of other examples --- I just decided to try to find the HAL documentation. Because HAL is depracated, the documentation appears to be gone, and because the *Kit stuff is just coming online, I can't find the documentation for that.

I guess you've got to know the answer to get the answer. UTSL - you have to become an expert, you can't just hack around. IMHO, that's bad.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Thu Oct 15, 2009 12:38 pm    Post subject: Reply with quote

depontius wrote:
Because HAL is depracated

That's new to me. Are you serious?
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2045
Location: Germany

PostPosted: Thu Oct 15, 2009 12:41 pm    Post subject: Reply with quote

sera wrote:
depontius wrote:
Because HAL is depracated

That's new to me. Are you serious?


yes
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Thu Oct 15, 2009 12:47 pm    Post subject: Reply with quote

energyman76b wrote:
sera wrote:
depontius wrote:
Because HAL is depracated

That's new to me. Are you serious?


yes


I used hal for the first time as xorg-server.1.5 became stable. :roll:
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2045
Location: Germany

PostPosted: Thu Oct 15, 2009 12:49 pm    Post subject: Reply with quote

sera wrote:
energyman76b wrote:
sera wrote:
depontius wrote:
Because HAL is depracated

That's new to me. Are you serious?


yes


I used hal for the first time as xorg-server.1.5 became stable. :roll:


and you will use it for while. Deprecated means that it won't get any more development (but it will get bug fixes) and everything should move over to its successors.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Thu Oct 15, 2009 1:09 pm    Post subject: Reply with quote

After then years of development and half a year of usage it's deprecated. Sounds pretty much like Vista.

So all the *-kit stuff together is meant to be a full replacement for hal?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3687
Location: Dallas area

PostPosted: Thu Oct 15, 2009 1:13 pm    Post subject: Reply with quote

http://lists.freedesktop.org/archives/devkit-devel/2009-April/000140.html

This sounds like the direction that they want to go in.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Thu Oct 15, 2009 1:23 pm    Post subject: Reply with quote

Anon-E-moose wrote:
http://lists.freedesktop.org/archives/devkit-devel/2009-April/000140.html

This sounds like the direction that they want to go in.


Thanks, Anon-E-moose, that was a good read.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Oct 15, 2009 1:27 pm    Post subject: Reply with quote

depontius wrote:
I'm used to using Ctl-Alt_Backspace as a nearly-last-resort to kill an X session when a bad app grabs things too hard. With the new xserver-1.6 that's no longer enabled by default. If you want it, you've got to re-enable it.


Kinda OT, but on my box (using kdm) I only need to take "-novtswitch" out of kdmrc to get Ctl-Alt_Backspace back.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2509
Location: Canada

PostPosted: Thu Oct 15, 2009 2:23 pm    Post subject: Reply with quote

sera wrote:
Anon-E-moose wrote:
http://lists.freedesktop.org/archives/devkit-devel/2009-April/000140.html

This sounds like the direction that they want to go in.


Thanks, Anon-E-moose, that was a good read.


I especially enjoyed that

Quote:

...
X will likely take over most of the input handling.
...


:)
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Thu Oct 15, 2009 2:55 pm    Post subject: Reply with quote

thanks for the links guys !

talking about hal being killed : i found it great that the first one saying that hal was overkill was its own creator and he being the first one in pushing for better solutions. Such things almost never happen nowadays.

I really hope all this stuff will finnally give us a more functional desktop and i really really hope it won´t be just another "brilliant idea" like pushing for pulseaudio - i still don´t get why this crap ships with almost every known distro ...

cheers
_________________
Error: Failing not supported by current locale
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3687
Location: Dallas area

PostPosted: Thu Oct 15, 2009 3:10 pm    Post subject: Reply with quote

depontius wrote:
Because HAL is depracated, the documentation appears to be gone, and because the *Kit stuff is just coming online, I can't find the documentation for that.


Not sure if this what you want

Hal: (it is for hal 0.5.10)
http://www.marcuscom.com/hal-spec/hal-spec.html

Consolekit: (such as it is)
http://www.freedesktop.org/software/ConsoleKit/doc/ConsoleKit.html
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 960

PostPosted: Thu Oct 15, 2009 3:27 pm    Post subject: Reply with quote

Ehh...great. So just when HAL sort of became properly integrated with xorg 1.5, instead of just causing a popup when plugging in a usb stick, it's going away.

Way to go, Desktop Linux! It's so nice you don't reinvent the wheel too many times.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3373

PostPosted: Thu Oct 15, 2009 3:57 pm    Post subject: Reply with quote

Anon-E-moose wrote:

Not sure if this what you want

Hal: (it is for hal 0.5.10)
http://www.marcuscom.com/hal-spec/hal-spec.html

Consolekit: (such as it is)
http://www.freedesktop.org/software/ConsoleKit/doc/ConsoleKit.html


That's a bit better. But looking in the HAL spec, I see the hierarchical namespaces defined, but of course the option strings that can be used in each namespace aren't. This also makes me think I did my Ctl-Alt-Backspace wrong.

The xserver-1.6 upgrade guide said to add this string, and what file to use as a skeleton/template, but didn't say where to put it inside there :
Code:
<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

I found a section that had something to do with "keys", so I added it there, like this :
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <!-- FIXME: Support tablets too. -->
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_driver" type="string">mouse</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>

    <match key="info.capabilities" contains="input.touchpad">
      <merge key="input.x11_driver" type="string">mouse</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
      <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>
    </match>
  </device>
</deviceinfo>

Now that I look at the spec, I see that I've put it into "input.keys" instead of "input.xkb". I suspect I have to add an entirely new stanza for "input.xkb" instead of piggybacking on "input.keys". Before doing that, I want to first verify that what I have doesn't work.

The xserver-1.6 migration howto didn't describe this adequately.

Seems to me that some sort of GUI app would be a good way to "discover" HAL. IsThere one, outside of Gnome/KDE? I just run icewm, though I have my wife set up with xfce, and could use that.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3687
Location: Dallas area

PostPosted: Thu Oct 15, 2009 4:36 pm    Post subject: Reply with quote

depontius, where you have it should be fine, if I understand the hierarchy properly.

Ok I just did some testing and this is what is needed - a copy of part of the 10-x11-input.fdi file copied to /etc/hal/fdi/policy
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keys">
      <!-- If we're using Linux, we use evdev by default (falling back to keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
      <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>
    </match>
  </device>
</deviceinfo>

it only needs the above in it.

And this shows up in the Xorg.0.log file after rebooting.
Code:

(**) Option "xkb_options" "terminate:ctrl_alt_bksp"


Now some caveats :lol:

It did not work from within my gnome session, may need some other flag, or allowance.
It did work from the gdm greeter, although it just respawns.
It did work just running X from the command line
and it should work from startx

Enjoy


Edit to add: it seems that input.xkb.options is depreciated in favor of input.x11_options.XkbOptions
although both seem to work (at this moment)
I have my line set to
Code:
<merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>

YMMV
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon


Last edited by Anon-E-moose on Thu Oct 15, 2009 6:01 pm; edited 3 times in total
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2509
Location: Canada

PostPosted: Thu Oct 15, 2009 5:16 pm    Post subject: Reply with quote

Zarhan wrote:
So just when HAL sort of became properly integrated with xorg 1.5, instead of just causing a popup when plugging in a usb stick,


This is an excellent example of the confusion that current setup creates ! Why on earth plugging of usb stick (and, probably, mounting it) should have any relation to xorg, the display subsystem ??
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 960

PostPosted: Thu Oct 15, 2009 5:21 pm    Post subject: Reply with quote

HAL is supposed to abstract hardware. In practice, until recently, it's only real use was the USB stick. Now with new xorg it also abstracts input devices (and allows you to hotplug USB keyboards and mice - VERY good feature on laptops). So USB sticks and mounting them have nothing to do with display subsystem, but hotplugging and utilizing ANY devices (in case of xorg, mice and keyboards) very much is.

So now that it finally works (even if the configs are hidden in XML crap), they are going to do it again. Bah.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3687
Location: Dallas area

PostPosted: Thu Oct 15, 2009 5:40 pm    Post subject: Reply with quote

I take changes with a grain of salt and have learned to adapt to them.

They realized that a monolithic Hal wasn't what they really wanted, and it sounds like they
are going to try and merge in the changes smoothly and (hopefully) without anyone being
inconvenienced by them.

Going from win 1 to win 3 to win98 to vista wasn't without a learning curve (or heartburn :lol: )
Linux now is a much different beast than it was when it first came out.
The more things change....
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum