diff options
author | B. Watson <yalhcru@gmail.com> | 2014-10-17 08:52:55 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-10-17 08:52:55 +0700 |
commit | c9082984bbb9e4fe6790846a430d677a4d8c6b19 (patch) | |
tree | 566a831bae4dc72248f6597475c80043ececac55 /system/kmscon | |
parent | b4adb046e5ef406d91a16c3e296c643c984acbaa (diff) |
system/kmscon: Added (KMS/DRM based System Console).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/kmscon')
-rw-r--r-- | system/kmscon/README | 13 | ||||
-rw-r--r-- | system/kmscon/README.Slackware | 71 | ||||
-rw-r--r-- | system/kmscon/doinst.sh | 11 | ||||
-rw-r--r-- | system/kmscon/kmscon.SlackBuild | 86 | ||||
-rw-r--r-- | system/kmscon/kmscon.conf | 40 | ||||
-rw-r--r-- | system/kmscon/kmscon.info | 10 | ||||
-rw-r--r-- | system/kmscon/slack-desc | 19 |
7 files changed, 250 insertions, 0 deletions
diff --git a/system/kmscon/README b/system/kmscon/README new file mode 100644 index 0000000000000..d54b82578bd12 --- /dev/null +++ b/system/kmscon/README @@ -0,0 +1,13 @@ +kmscon (KMS/DRM based System Console) + +kmscon is a system console for linux. It does not depend on any +graphics-server on your system (like X.org), but instead provides a raw +console layer that can be used independently. It can replace the linux +kernel console entirely but was designed to work well side-by-side, +too. Even though initially targeted at providing internationalization +to the system-console, it has grown into a fully modularized console +layer including features like multi-head support, internationalized +font rendering, XKB-compatible keyboard handling, hardware-accelerated +graphics access and more. + +For Slackware-specific notes on kmscon, see README.Slackware. diff --git a/system/kmscon/README.Slackware b/system/kmscon/README.Slackware new file mode 100644 index 0000000000000..a3e71f6d8070a --- /dev/null +++ b/system/kmscon/README.Slackware @@ -0,0 +1,71 @@ +Using kmscon as a regular user +------------------------------ + +As shipped, kmscon only works for root. If you want to be able to run +it as a normal user, you could make it setuid root (not recommended). A +better solution: + +setcap cap_sys_tty_config,cap_sys_admin=ep + +See capabilities(7) and http://www.slackbuilds.org/caps/ for more info +on capabilities. + +When running as a normal user, you probably also want to add "--login +-- /bin/bash -i" on the kmscon command line (or the equivalent, in +/etc/kmscon/kmscon.conf). + +Using kmscon as a console replacement +------------------------------------- + +kmscon has much better support for fonts and Unicode/UTF-8 than the +Linux framebuffer console. If you want to use kmscon for all your +console logins, edit /etc/inittab and replace the /sbin/agetty lines +(around line 50 on Slack 14.1) with: + +c1:12345:respawn:/usr/bin/kmscon --vt /dev/tty1 +c2:12345:respawn:/usr/bin/kmscon --vt /dev/tty2 +c3:12345:respawn:/usr/bin/kmscon --vt /dev/tty3 +c4:12345:respawn:/usr/bin/kmscon --vt /dev/tty4 +c5:12345:respawn:/usr/bin/kmscon --vt /dev/tty5 +c6:12345:respawn:/usr/bin/kmscon --vt /dev/tty6 + +You might also want to edit /etc/kmscon/kmscon.conf and uncomment the +line beginning with 'login=/sbin/agetty ...'. + +If you're in the habit of logging in as root, you'll want to edit +/etc/securetty and uncomment the lines for pts/0 through pts/7. This +is only needed for actual root logins (su and sudo will work fine +without it). + +After making your edits, "init q" followed by "killall agetty" will fire +up the new kmscon login prompts (alternatively, you can reboot). + +There's no need to use setcap if you're running kmscon from /etc/inittab, +since it will always run as root. + +Misc +---- + +You'll almost certainly want to use a UTF-8 locale with kmscon. Normally +this is set in /etc/profile.d/lang.sh (but you could also do it in your +your ~/.bash_profile or such, if you like). + +When using kmscon, you'll have to use ctrl-alt-F# to switch consoles. Also +try ctrl-plus and ctrl-minus (for zooming). + +You won't be able to run links in framebuffer mode (with "links -g +-driver fb") from within a kmscon session. + +startx will work normally from kmscon. + +kmscon has *no* support for gpm, or the mouse in general. There's no way +to select or paste text with the mouse, and no way to use the mouse in +mouse-aware textmode applications like links. + +svgalib applications are highly unlikely to work from within kmscon. + +mplayer's framebuffer support (-vo fbdev or -vo fbdev2) doesn't work from +within kmscon. + +Japanese man pages render beautifully with kmscon. Install man-db and +man-pages-ja, and set LANG="ja_JP.UTF-8" in /etc/profile.d/lang.sh. diff --git a/system/kmscon/doinst.sh b/system/kmscon/doinst.sh new file mode 100644 index 0000000000000..d7468f28c9dd8 --- /dev/null +++ b/system/kmscon/doinst.sh @@ -0,0 +1,11 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config etc/kmscon/kmscon.conf.new diff --git a/system/kmscon/kmscon.SlackBuild b/system/kmscon/kmscon.SlackBuild new file mode 100644 index 0000000000000..f3f0871941779 --- /dev/null +++ b/system/kmscon/kmscon.SlackBuild @@ -0,0 +1,86 @@ +#!/bin/sh + +# Slackware build script for kmscon + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=kmscon +VERSION=${VERSION:-8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --disable-static \ + --enable-shared \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +gzip $PKG/usr/man/man1/$PRGNAM.1 + +mkdir -p $PKG/etc/$PRGNAM +cat $CWD/$PRGNAM.conf > $PKG/etc/$PRGNAM/$PRGNAM.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/kmscon/kmscon.conf b/system/kmscon/kmscon.conf new file mode 100644 index 0000000000000..727f4280130bb --- /dev/null +++ b/system/kmscon/kmscon.conf @@ -0,0 +1,40 @@ +# Config file for kmscon. +# Any long option listed in "man kmscon" can be used here. + +# As shipped, all the options in this file are commented out. + +# Use agetty for logging in. +# By default, kmscon spawns "/bin/login -p", which works fine but +# isn't as nice (or as familiar) as using agetty. +# If you plan to spawn kmscon from /etc/inittab, you probably want to +# uncomment this. + +#login=/sbin/agetty 38400 -- - linux + + +# Enable DRM 2D acceleration. 3D accel won't work unless you have +# GL/ES support (which Slackware doesn't ship with, and isn't available +# on SBo either). + +#drm + + +# Font size, in points (not pixels). Don't set too large, you want +# at least 80x25 character cells. 'echo $COLUMNS $LINES' should show +# at least 80 columns and 25 lines. + +#font-size=15 + + +# Enable shortcut keys for multiple sessions on the same +# virtual terminal. + +#session-control + + +# Keyboard repeat delay is in milliseconds. Repeat rate is *also* in +# milliseconds (unlike "xset r", which uses repeats-per-second). + +#xkb-repeat-delay=200 +#xkb-repeat-rate=12 + diff --git a/system/kmscon/kmscon.info b/system/kmscon/kmscon.info new file mode 100644 index 0000000000000..ffeac16026e0b --- /dev/null +++ b/system/kmscon/kmscon.info @@ -0,0 +1,10 @@ +PRGNAM="kmscon" +VERSION="8" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/kmscon/" +DOWNLOAD="http://www.freedesktop.org/software/kmscon/releases/kmscon-8.tar.xz" +MD5SUM="90d39c4ef53a11c53f27be4a7e9acee4" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libtsm" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/kmscon/slack-desc b/system/kmscon/slack-desc new file mode 100644 index 0000000000000..fe41a104d25ec --- /dev/null +++ b/system/kmscon/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +kmscon: kmscon (KMS/DRM based System Console) +kmscon: +kmscon: kmscon is a system console for linux. It does not depend on any +kmscon: graphics-server on your system (like X.org), but instead provides +kmscon: a raw console layer that can be used independently. It can replace +kmscon: the linux kernel console entirely but was designed to work well +kmscon: side-by-side, too. Even though initially targeted at providing +kmscon: internationalization to the system-console, it has grown into a fully +kmscon: modularized console layer including features like multi-head support, +kmscon: internationalized font rendering, XKB-compatible keyboard handling, +kmscon: hardware-accelerated graphics access and more. |