[ConsoleKit] ck-dynamic interface
Ray Strode
halfline at gmail.com
Wed Aug 5 06:54:26 PDT 2009
Hi,
On Fri, Jul 24, 2009 at 2:15 AM, Halton Huo<Halton.Huo at sun.com> wrote:
> I'd like to talk about ck-dynamic interfaces for finalization here.
Sure, so as we discussed before I think it probably makes sense to
call it ck-seat-tool or similiar instead of ck-dynamic.
> To add a session
> (ck-dynamic -a)
> ===============
> $ck-dynamic -a --session-type=<session_type>
> --display-type=<display_type> [--seat-id=<seat_id>] [variables...]
>
> session_type
> Specify session type. Now only support LoginWindow AFAIK.
> display_type
> Specify display type under <etc>/ConsoleKit/displays.d/
> seat_id
> Specify a seat to attach this session. If not given, create a new
> seat.
> variables
> Specify values of variables in display type
Seems reasonable
> 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.
> 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)
> Examples:
> ============
> 1. Start a local session with display :1 on vt8, this session is
> attached on Seat1.
> $ck-dynamic -a --session-type=LoginWindow --display-type=Local
> --seat-id=Seat1 display=:1 vt=vt8
Looks good.
> 2. Start a VNC session with display :8 port 5908 and password
> file /etc/X11/vnc-password.
>
> Precondition
> ------------
> <etc>/ConsoleKit/displays.d/LocalVNC.display as following:
> [Display]
> Type=X11
>
> [X11]
> Exec=@X11_DIR@/Xvnc -rfbport $port -PasswordFile $password-file $display
>
> Command
> ------------
> $ck-dynamic -a --session-type=LoginWindow --display-type=LocalVNC
> port=5908 password-file=/etc/X11/vnc-password display=:8
looks good.
>
> 3. Start a SunRay session with display :11
> Precondition
> ------------
> <etc>/ConsoleKit/displays.d/SunRay.display as following:
> [Display]
> Type=X11
>
> [X11]
> Exec=/etc/opt/SUNWut/basedir/lib/utxsun $display -auth $auth
>
> Command
> ------------
> $ck-dynamic -a --session-type=LoginWindow --display-type=SunRay
> display=:11
looks good.
> 4. List all SunRay sessions created dynamically
> $ck-dynamic -l --display-type=SunRay
> :11;:12
> $
>
> 5. Remove session with display number :11
> $ck-dynamic -d --display-number=:11
These two I don't like as mentioned above.
> 6. Remove session with session id Session3
> $ck-dynamic -d --session-id=Session3
Sounds fine.
--Ray
More information about the ConsoleKit
mailing list