[ConsoleKit] ck-dynamic interface

Halton Huo Halton.Huo at Sun.COM
Wed Aug 5 08:55:22 PDT 2009


Hi Ray,

Thanks for reply. Please check my comments inlines.
> Sure, so as we discussed before I think it probably makes sense to
> call it ck-seat-tool or similiar instead of ck-dynamic.
>   
I'm okay to rename ck-seat-tool instead of ck-dynamic.
>> To remove a session
>> (ck-dynamic -d)
>> ===============
>>   $ck-dynamic -d --display-number=<display_number> (Needed for SunRay)
>> OR
>>   $ck-dynamic -d --session-id=<session_id>
>>     
>
> Maybe instead of --display-number=<display_number> it would be better to do
>
> ck-dynamic -d  [variables],
>
> e.g
>
> ck-dynamic -d display=:123
> or
> ck-dynamic -d vt=vt8
>
> Basically allow any unique set of properties work.
>   
I'd like to put 'ck-seat-tool -d' after ck-list-sessions.
>   
>> To list sessions
>> (ck-dynamic -l)
>> =============
>>   $ck-dynamic -l [--display-type=<display_type>]
>>   List dynamic displays. If display_type is not given, show all dynamic
>> sessions. Otherwise, only show sessions for start with given
>> display_type. The result is separated by ";", for example, ":110;:111"
>>     
> Hmm, maybe this part should be part of ck-list-sessions? Not sure.
>
> I think it probably makes sense to be able to ask for all the sessions
> on a particular seat as well.
>
> One thing I don't like about this is it's returning display numbers,
> but not all sessions will have
> displays.  Should instead return session id i think (or we should just
> extend ck-list-sessions and use it's output format)
>   
Sound like we can enhance ck-list-sessions just like 'ps -eo' format.

The syntax is as following:

ck-list-sessions [--format|-f var1,var2,...]

For example no given parameters for ck-list-session is as before
Session1:
unix-user = '50'
realname = 'GDM user'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = ''
display-device = ''
remote-host-name = ''
is-local = TRUE
        is-dynamic = FALSE
on-since = '2009-07-06T15:56:08.908744Z'
login-session-id = ''
Session4:
unix-user = '500'
realname = 'halton huo'
seat = 'Seat5'
session-type = ''
active = TRUE
x11-display = ':10'
x11-display-device = ''
display-device = ''
remote-host-name = ''
is-local = TRUE
        is-dynamic = TRUE
on-since = '2009-07-06T15:56:08.908744Z'
login-session-id = '' 

For example above sessions:
 $ck-list-sessions --f session-id,unix-user,seat,x11-display
  Session1,50,Seat1,:0
  Session4,500,Seat5,:10
 $

Since 'ck-list-sessions -f' can always give out the session-id, I'd
like to simplify the remove a session as:
  ck-dynamic -d --session-id=<session_id>

So forget "ck-dynamic -d [variables]," thing.

To satisfy SunRay case, we can run:
 $ck-list-sessions -f session-id,display-type|grep SunRay
  Session4
 $
 Then remove Session4 by
 $ ck-seat-tool -d --session-id=Session4

NOTE "vt" and "display-type" are not properties for current 
ck-list-sessions,
they can be added if someone require.

I'm not sure what current property "session-type"stand for? It seems not 
used,
can we use it for display-type?

Thanks,
Halton.


More information about the ConsoleKit mailing list