David Herrmann 066d9fdb78 uvtd: seat: implement session IDs
Session IDs provide a unique ID for each registered session. They are used
to sort the sessions so next/prev return the correct neighbour-sessions.
Furthermore, they can be used by outside users to refer to a session
directly without knowing the session implementation.
Sessions with ID=0 are always linked at the end and considered to be
"unnamed".

The algorithm to switch to a session with a given ID is:
  Try to find the first session with the exact same ID. If there is none,
  return the session with the next higher ID. If there is none, return the
  ID'th session in the list. If there is none, return the last session.

This provides a fairly predictable way of switching between session. It is
modeled after the classic VT F1-F12 keys that switch between sessions. If
a session is not given, these keys will switch to the next higher session
instead.
All "unnamed" sessions are put at the end. So if you have only F1-F4, then
F5-F12 will map to unnamed sessions.

Please note that new sessions are always linked at the end of their group.
So new unnamed sessions are at the far end, new named sessions are linked
in the sorted list but behind all sessions with the same ID.
Hence, the caller should avoid multiple sessions with the same ID,
otherwise, some sessions might not be reachable even though they're named
(unless you use next/prev of course).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-06 18:21:25 +01:00
2013-03-05 18:02:18 +01:00
2013-02-11 16:24:21 +01:00
2013-03-06 18:21:25 +01:00
2013-03-04 15:29:48 +01:00
2013-01-13 16:11:07 +01:00
2013-03-05 18:03:18 +01:00
2013-02-28 11:37:16 +01:00

= KMSCON =

Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS).
It is an attempt to replace the in-kernel VT implementation with a userspace
console. See kmscon(1) man-page for usage information.

Website:
  http://www.freedesktop.org/wiki/Software/kmscon

== Requirements ==

  Kmscon requires the following software:
    - libudev: providing input, video, etc. device hotplug support (>=v172)
    - libxkbcommon: providing internationalized keyboard handling

  Everything else is optional:

    For video output at least one of the following is required:
      - fbdev: For framebuffer video output the kernel headers must be installed
               and located in the default include path.
      - DRM: For unaccelerated drm output the "libdrm" library must be installed
             and accessible via pkg-config.
      - OpenGLES2: For accelerated video output via OpenGLESv2 the following must
                   be installed: libdrm, libgbm, egl, glesv2 (i.e., mesa)

    For font handling the following is required:
      - 8x16: The 8x16 font is a static built-in font which does not require
              external dependencies.
      - unifont: Static font without external dependencies.
      - pango: drawing text with pango
               Pango requires: glib, pango, fontconfig, freetype2 and more

    For multi-seat support you need the following packages:
      - systemd: Actually only the systemd-logind daemon and library is required.

== Download ==

Released tarballs can be found at:
  http://www.freedesktop.org/software/kmscon/releases

== Install ==

  To compile the kmscon binary, run the standard autotools commands:
    $ test -f ./configure || NOCONFIGURE=1 ./autogen.sh
    $ ./configure
    $ make
    $ make install
  To compile the test applications, run:
    $ make check

  If you want only a very basic kmscon program without any major dependencies,
  use:
    $ ./configure --with-video=fbdev,drm2d --with-renderers= --with-fonts=unifont --disable-multi-seat --with-sessions=dummy,terminal
  However, you will loose a lot of functionality by dropping all dependencies.

  The following configure options are available. If build-time dependencies
  cannot be satisfied, an option is automatically turned off, except if you
  explicitly enable it via command line:
    --enable-multi-seat: This requires the systemd-logind library to provide
                         multi-seat support for kmscon. [default: on]
    --enable-hotplug: This requires libudev for hotplugging support. This is
                      currently mandatory and cannot be disabled. [default: on]
    --enable-debug: Enable debug mode/messages [default: on]
    --enable-optimizations: Enable code optimizations [default: on]
    --enable-eloop-dbus: Build dbus extension for eloop library [default: off]

  Backends for several subsystems in kmscon can be selected with the following
  options (all of them take a comma-separated list of backend names):
    --with-video: Video backens. Available backends are:
       - fbdev: Linux fbdev video backend
       - drm2d: Linux DRM software-rendering backend
       - drm3d: Linux DRM hardware-rendering backend
       Default is: fbdev,drm2d,drm3d
    --with-fonts: Font renderers. Available backends are:
       - unifont: Static built-in non-scalable font (Unicode Unifont)
       - freetype2: Freetype2+fontconfig based scalable font renderer
       - pango: Pango based scalable font renderer
       Default is: unifont,pango
       The 8x16 backend is always built-in.
    --with-renderers: Console rendering backends. Available are:
       - bbulk: Simple 2D software-renderer (bulk-mode)
       - gltex: OpenGLESv2 accelerated renderer
       - cairo: cairo based renderer
       - pixman: pixman based renderer
       Default is: bbulk,gltex
       The bblit backend is always built-in.
    --with-sessions: Built in sessions. Available sessions are:
       - dummy: Dummy fallback session
       - terminal: Terminal-emulator sessions
       - cdev: Fake VTs via CUSE (DEPRECATED! Don't use it!)

  The following options select which applications are built. If
  dependency-checks fail, they are disabled by default unless explicitly enabled
  on the command line:
    --enable-kmscon: Build kmscon application [default: on]
    --enable-wlterm: Build wlterm Wayland terminal [default: off]
    --enable-eloop: Build eloop event loop library [default: off]
    --enable-tsm: Build TSM terminal state-machine library [default: off]
    --enable-uterm: Build uterm library [default: off]
    --enable-uvt: Build UVT library [default: off]

== Running ==

  To get usage information, run:
    $ ./kmscon --help
  You can then run kmscon with:
    $ ./kmscon [options]

  For debug output use "--debug". For verbose output use "--verbose".
  With "--xkb-layout=<lang>" you can switch the keyboard layout.
  See "man kmscon" / kmscon(1) for more information.

== License ==

  This software is licensed under the terms of an MIT-like license. Please see
  ./COPYING for further information.

== FAQ ==

  Please see: http://www.freedesktop.org/wiki/Software/kmscon

== Contact ==

  This software is maintained by:
    David Herrmann <dh.herrmann@gmail.com>
  If you have any questions, do not hesitate to contact one of the maintainers.
Languages
C 93.4%
M4 2.9%
Makefile 1.6%
GLSL 1.3%
C++ 0.7%
Other 0.1%