216 Commits

Author SHA1 Message Date
David Herrmann
776566e216 build: remove getty@.service from makefiles
We removed this service unit earlier this week but the EXTRA_DIST variable
still mentions it. Remove it so kmscon builds cleanly again.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-06 00:49:38 +01:00
David Herrmann
995c07f853 kmscon: make bblit mandatory
Similar to the font backends we now require one backend to be always
available as safe fallback. The bblit backend is the most basic backend so
make it mandatory and link it unconditionally.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:48:23 +01:00
David Herrmann
b55f6e3284 build: remove libfont.la and link directly
We no longer share libfont.la so link it directly into kmscon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:47:42 +01:00
David Herrmann
72925e0af9 kmscon: move gltex renderer into module
Provide the gltex renderer via a module to allow loading it during
runtime.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:41:50 +01:00
David Herrmann
e9d314b49b kmscon: move bbulk renderer into module
Provide the bbulk renderer via mod-bbulk.so so it can be loaded during
runtime.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:36:23 +01:00
David Herrmann
70b069aacc kmscon: add freetype2 module
The freetype2 module register the freetype2 font backend with kmscon core.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:04:55 +01:00
David Herrmann
b81cff46e5 kmscon: add unifont module
The unifont module registers the unifont font backend with kmscon core.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 17:04:33 +01:00
David Herrmann
e97c71fea1 text: move font layer into top-level font_* namespace
The font layer does not longer depend on the text layer so move it into
its own namespace.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 16:55:56 +01:00
David Herrmann
c14492796e kmscon: add pango module
The pango module registers the pango font-backend with kmscon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 16:30:40 +01:00
David Herrmann
a8c1d8bbf1 kmscon: add module support
Several parts of kmscon have huge external dependencies. However, we allow
them to be disabled during build-time. But this is not enough as it
requires distributions to choose which options to use. Therefore, we now
allow dynamicly loadable modules that can optionally be installed and
kmscon automatically picks them up.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-03 16:21:18 +01:00
David Herrmann
180f25375d build: link each text-font backend separately
We want to modularize the text-font library, so we need each backend as a
different library. This step links each of them into a different static
library so we can now link them either into the binary or into modules.

This step also makes 8x16 always compiled into the text-font backend so we
always have a working implementation even though no modules might be
loaded.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-02 18:02:10 +01:00
David Herrmann
dfde5b4478 build: include kmsconvt@.service in EXTRA_DIST
We need the new kmsconvt@.service file instead of the old kmscon@.service.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-02 17:34:07 +01:00
David Herrmann
1f38e6beed build: fix man-page compilation
The man_fixup_aliases thingy was a horrible hack. Replace it with a
temporary .man_fixup file that saves compilation timestamps so we have
post-recipies for man-fixups.

Also fix some minor out-of-tree build problems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-02 17:32:49 +01:00
David Herrmann
ca446c691f build: provide git-head revision via githead.h
We need the git-revision for module-version checks so provide the
infrastructure now and print it in log_init().

Note that the git-describe string is distributed with the tarballs so
end-users will not have to generate it themself. But when building from
git, the revision will be automatically updated whenever something
changes.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-02 15:51:54 +01:00
David Herrmann
7a9b85c306 build: fix libuterm dependency typo
We didn't set the dependencies correctly for uterm libraries as a
backslash was missing. Fix this typo.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-31 15:41:00 +01:00
David Herrmann
6d51049874 build: mark man_fixup_aliases as PHONY target
We need to mark it as PHONY target as it has no corresponding source file.
It's unlikely that it causes problems, but lets be safe.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-31 15:40:06 +01:00
David Herrmann
7304985892 text: use new shl-registry objects
Instead of implementing our own thread-safe backend-storage, we now use
the generic shl-registry object.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-30 16:21:27 +01:00
David Herrmann
6b39218ceb text: font: use new shl-registry objects
Instead of implementing a thread-safe backend-system we can now use the
new shl-registry storage module.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-30 16:20:51 +01:00
David Herrmann
3c9363035e shl: add new register helper
The shl-register module is used to create registries of named-objects. The
main purpose for it will be for module-systems were we have different
backends implementing an interface. The registry can then be used to find
a specific module (or the default module).

No sophisticated filter/search mechanism is used as this cannot be done
efficiently in a generic way.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-30 16:18:25 +01:00
David Herrmann
bc40e1ae53 tsm: unicode: add wcwidth() implementation
wcwidth() is a POSIX function that returns the number of cells that a
wide-character occupies. The glibc function cannot be used as it depends
on the locale and we need _always_ UTF8 no matter what the locale is.

This implementation is provided by Markus Kuhn and is equivalent to
xterm's behavior.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-10 15:36:04 +01:00
David Herrmann
4e06dc3543 build: add systemd service files to EXTRA_DIST
These service files aren't installed, yet but they work so distribute
them.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-09 19:52:35 +01:00
David Herrmann
146431c834 build: add manpage-XML files to EXTRA_DIST
We need these XML files to build the man-pages so add them to EXTRA_DIST.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-09 19:51:51 +01:00
David Herrmann
c74658f368 build: add kmscon_cdev.h to source files
This is needed to get "make distcheck" working again.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-09 19:51:22 +01:00
David Herrmann
3d28387fb2 kmscon: remove compositor support
The wayland compositor support was some research project that turned out
to not work that well. The main problem is that the DRM planes support
cannot be easily forwarded to a child. Sub-surface support might change
that but until then we remove compositor support.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-09 15:55:26 +01:00
David Herrmann
b985e55d3a Add manpage infrastructure and kmscon.1 manpage
Add a very basic man-page infrastructure so we can easily add new
docbook-style manpages.

Also add kmscon.1 man-page with a basic overview.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-09 13:18:56 +01:00
David Herrmann
b18cf69663 Move .pc files to ./docs/pc/
We want only C-source files in ./src and the documents ./docs directory is
meant to contain any other sources.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-05 18:25:05 +01:00
David Herrmann
22e73357ff uterm: monitor: put systemd-layer into separate file
This moves all systemd code into uterm_systemd.[ch]. This removes all the
ugly #ifdef's.

Furthermore, this fixes some hidden bugs in the previous implementation
and makes use of sd_booted() to see whether runtime systemd is really
available.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-29 18:09:35 +01:00
David Herrmann
9d2018f521 build: fix "make check" build failures
I forgot again to keep these up to date. The conf-layer updates broke them
horribly. However, we now build them correctly without kmscon-core by
including all required layers directly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-27 18:32:43 +02:00
David Herrmann
89e84aa78c uterm: add PCI primary GPU detection
We used to simply probe every GPU that is reported by the kernel. However,
if a system has multiple GPUs that share display controllers, we cannot
use both simultaneously. Unfortunately, the kernel currently does not
notify us about this. Hence, we use some heuristics to determine which GPU
is the boot-gpu/primary-gpu.

This only adds the detection logic, it does not modify any code to use
this detection at all.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-27 13:25:44 +02:00
David Herrmann
2c5e9bff2b kmscon: add character-device session dummy
If libfuse is available then kmscon is built with a new session type: cdev
This session creates a fake TTY char-dev via CUSE (which itself uses FUSE)
which then can be used by user-space as if it were a real VT.

This is still incomplete and does only support basic I/O, yet. But it
shows in what direction this is going.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-26 18:08:35 +02:00
David Herrmann
696adf965a build: add proper dependency checking to configure.ac
We build several tools inside of this repository and we need to make sure
all dependencies are met. Furthermore, we must make sure that default
values are recognized even on dependencies.
Hence, this reworks the whole configure.ac handling and does some renaming
of the constants that are used all over the source.

We need to test this some more weeks, but it should finally be a proper
autotools handling that we can release with kmscon-6.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-23 11:35:49 +02:00
David Herrmann
d3b718f187 kmscon: add dummy session type
The dummy session is a very simply session implementation that simply
draws a black background. It will be used by each seat as fallback if no
other session is available. If we didn't do that, we wouldn't be able to
guarantee that the screen is cleared after a session is unregistered.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-18 13:14:16 +02:00
Ran Benita
d2600527a7 external: remove unused imKStoUCS files
We needed these files before libxkbcommon had a function to convert
keysyms to unicode, and then for the 'plain' keyboard backend, which
didn't use libxkbcommon. Since this backend was removed, these files are
no longer needed.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-15 21:18:14 +02:00
David Herrmann
3ad2996e27 kmscon: add wayland-session support
This adds a wayland compositor which registers sessions for each top-level
window within kmscon. This means, you can run any arbitrary
wayland-application on kmscon. Each top-level window that is registered by
the applications is put into a separate session and you can switch between
the sessions with the previously introduced session-shortcuts.

The compositor is still very basic. It doesn't support input devices at
all (not even talking about DnD). The only thing it does is surface
management (and even that is not fully implemented).

However, this shows the direction that kmscon will go. You can run the
Wayland "simple-shm" and "simple-egl" demos on kmscon to see how it works.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-15 18:10:27 +02:00
David Herrmann
11eaec0e68 Introduce session management
On seats other than seat0 we do not have any session-management, because
VTs are not available. Furthermore, if we want to get rid of CONFIG_VT
entirely, we also need to provide session-management for seat0.

This commit introduces sessions. Every seat (seats are now managed in
kmscon_seat.c) can have registered sessions. One of the sessions is active
and gets control over all displays. Session switching is entirely handled
inside of kmscon so there is always an active session (except if no
session is registered at all).

This also reworks the seat-management. kmscon_main.c now only manages the
seat allocation/deallocation and video-objects. The seat itself is handled
inside of kmscon_seat.c and does not know of uterm_video objects. Instead,
it is assigned a list of displays that it can use. Everything is still
hotplugging capable so user-experience should be the same as before.

The kmscon_terminal layer is reworked to be session based. So every
terminal is now a single session. By default, a single terminal-session is
created for each seat. This may be changed, though.

There is currently no input-control to change between session with
keyboard hotkeys. However, this will be added when we have more than one
session.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-11 10:54:01 +02:00
David Herrmann
26949d961a kmscon: move config-handling to kmscon_conf.c
Configuration handling is totally independent from kmscon_main.c so we
move it into a separate file to avoid cluttering up kmscon_main.c.

This also does some basic initialization in kmscon_conf.c which is solely
related to configuration handling and logging.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-10 21:32:12 +02:00
David Herrmann
e2266c9986 kmscon: move kmscon_main.h to kmscon_conf.h
Everything in this header is solely related to configuration parsing so we
should name it properly. We will also move the configuration-handling from
kmscon_main.c to kmscon_conf.c in some of the next commits to clean up
kmscon-main.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-10 21:23:38 +02:00
David Herrmann
1709c64ee6 Prefix kmscon sources with kmscon_*
We will be adding more applications to this repository, so to keep better
overview, we prefix kmscon sources with kmscon_*.

The only sources that have no prefix are either shared between
applications (i.e., statically linked) or they were not cleaned up, yet.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-09 13:53:55 +02:00
David Herrmann
fa566972e5 uterm: input: remove plain backend
We made xkbcommon mandatory some time ago and there is no reason to keep
this plain backend around anymore. It isn't tested at all and provides no
real advantage over xkb.
Even for debugging it is easier to use XKB.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-08 18:11:17 +02:00
David Herrmann
158b5fcbac shl: hook: link elements in reverse order
When adding new elements, we should add them at the tail, not at the
front. And when removing elements, we should remove them from the tail,
too.

We also convert the whole stuff to the shl_dlist API so we do not have to
manage the linked-list ourself.

Note that this silently breaks the idea of having multiple listeners with
the same function+data in the hook. This is because removing the listener
may now change order of two identical entries, as we don't know which of
them to remove. That means, when adding two identical entries, you cannot
rely on them to retain their position in regard to each other.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-08 17:26:48 +02:00
David Herrmann
742acfa093 wlt: toolkit: add input_offer support
Input offers are used to implement pasting data from other applications.
This adds the infrastructure to operate on data-managers and allows
applications to retrieve the currently active selection-data via a
file-descriptor.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-07 13:13:03 +02:00
David Herrmann
5f1af984d7 build: print (GEN) during genshader/unifont creation
Use the automake silent-rules feature to suppress unused messages.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-05 13:20:24 +02:00
Zbigniew Jędrzejewski-Szmek
bf3415c5b4 build: fix linking for kmscon_font_*
We need to link text-font to kmscon-core as we use it heavily in the
terminal layers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-02 12:55:18 +02:00
Zbigniew Jędrzejewski-Szmek
df52ae27f5 build: actually make use of pkg-config info about xbkcommon
We now use xkbcommon in lots of places so add the build-flags to all
libraries and applications that use it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-02 12:54:21 +02:00
David Herrmann
de2c0e1d85 build: add shl_misc to all its users
Even though it's just a header, we want to be safe so add it to all users.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-01 12:23:15 +02:00
David Herrmann
a3abdfc5bc Make xkbcommon mandatory
We really need xkbcommon. There is so much stuff (including parsing of
keyboard shortcuts in conf.c) that depends on it. Therefore, we make it
mandatory now which allows us to use xkbcommon functions all over the
place.

Note that xkbcommon itself has no runtime dependencies so it is a small
self-contained library. The only reason I didn't do this ealier is that
xkbcommon has not seen a public release, yet. However, that should be done
in the near future.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-01 10:10:50 +02:00
David Herrmann
c43d1ca722 kmscon: allow paths with --vt=<xy>
The getty variants out there (including agetty) require an relative path
to the /dev directory as argument. This is really odd but we want to be
backwards-compatible to them so we allow this, too.

--vt now accepts:
  * A positive number which is internally converted into /dev/ttyXY
  * A string that does not start with '/' or '.' which is interpreted
    relative to /dev as /dev/%s
  * Everything else is interpreted as path

This option still selects only the TTY on seat0. On all other seats we do
not use controlling TTYs.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-30 19:13:02 +02:00
David Herrmann
c95bcdf22b shl: add shl_strtou() helper
The standard C/POSIX helpers are really ugly to use. This small helper
returns 0 on success, otherwise an error.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-30 18:57:40 +02:00
David Herrmann
d16f429335 wlterm: add hard-dependency to xkbcommon
wlterm needs xkbcommon as the wayland protocol depends on XKB states.
Hence, we add a hard-dependency for wlterm.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-26 23:45:02 +02:00
David Herrmann
f40c6eaf32 build: build text_font subsystem as separate static library
We want to use the font-rendering layer in wlterm so we need to split this
out. Gladly, the layer has only a build-time dependency on uterm and not
other hard-coded stuff. That is, we have no cleanup to do.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-26 21:54:37 +02:00