From: "Michael Weber" <xmw@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/xmw:master commit in: x11-misc/trivdm/, x11-misc/trivdm/files/
Date: Fri, 23 Sep 2011 21:52:55 +0000 (UTC) [thread overview]
Message-ID: <db54be8dfd9705239a5356533b29752b10adabd7.xmw@gentoo> (raw)
commit: db54be8dfd9705239a5356533b29752b10adabd7
Author: Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 21:52:45 2011 +0000
Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 21:52:45 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=db54be8d
x11-misc/trivdm: initial import
(Portage version: 2.1.10.11/git/Linux x86_64, signed Manifest commit with key 62EEF090)
---
x11-misc/trivdm/ChangeLog | 10 +++++
x11-misc/trivdm/Manifest | 14 +++++++
x11-misc/trivdm/files/trivdm-0_p20110921 | 60 +++++++++++++++++++++++++++++
x11-misc/trivdm/metadata.xml | 10 +++++
x11-misc/trivdm/trivdm-0_p20110921.ebuild | 53 +++++++++++++++++++++++++
5 files changed, 147 insertions(+), 0 deletions(-)
diff --git a/x11-misc/trivdm/ChangeLog b/x11-misc/trivdm/ChangeLog
new file mode 100644
index 0000000..2aecf6e
--- /dev/null
+++ b/x11-misc/trivdm/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for x11-misc/trivdm
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*trivdm-0_p20110921 (23 Sep 2011)
+
+ 23 Sep 2011; Michael Weber <xmw@gentoo.org> +files/trivdm-0_p20110921,
+ +trivdm-0_p20110921.ebuild, +metadata.xml:
+ Initial import
+
diff --git a/x11-misc/trivdm/Manifest b/x11-misc/trivdm/Manifest
new file mode 100644
index 0000000..a53fae7
--- /dev/null
+++ b/x11-misc/trivdm/Manifest
@@ -0,0 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX trivdm-0_p20110921 2319 RMD160 5898c658045a642da8dc9eec67db38f62a23dbf1 SHA1 394a9f9e816f4a8143660781fc20f0c1df09ea36 SHA256 c414ed6d9c06a1df0967a787e4e5fcc89ca8e8c8f6399adcf9c02dc421bc6786
+EBUILD trivdm-0_p20110921.ebuild 1293 RMD160 c907cf4dbba504804e49b60f603e787b0fea76fe SHA1 6f0b908cdce2253c394dd11e09d041d2fbe23a73 SHA256 b045b2d0dba35229bdaa048ed0049402ade36676cfb61a7f8ca6ca0a84dbd99c
+MISC ChangeLog 287 RMD160 7e59711261ef173fc9fd22be4ca0bbb0d2059df5 SHA1 3cb44a28290f92c95ebcd78065ca14de52d60876 SHA256 5f3667a5fb992b6d5366ff5bd8eabf3a28f12e8b698a8d17bd183f1b2585dfe5
+MISC metadata.xml 245 RMD160 6b03982a4d5f32d9fa6b9259ae36f9fcb07c8404 SHA1 fb16c7b4c5ab071dd979f761b8bb075f5396b737 SHA256 375a1da02cd2c393ce2378a73c1ce08134bc030b3bb378c6a4d6ca9cd5be1f8d
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF4EAREIAAYFAk58/60ACgkQknrdDGLu8JDsXwD9HISgha9WFWIpanuyHvkXZy7/
+WRkPmnxNO4EbjkWrWm8BAI9ummaHvWodau0GVScAZiTarpau2V9eGzHcH0Eg3agh
+=tLx3
+-----END PGP SIGNATURE-----
diff --git a/x11-misc/trivdm/files/trivdm-0_p20110921 b/x11-misc/trivdm/files/trivdm-0_p20110921
new file mode 100644
index 0000000..d3cbf52
--- /dev/null
+++ b/x11-misc/trivdm/files/trivdm-0_p20110921
@@ -0,0 +1,60 @@
+#!/bin/zsh
+# trivdm by Christian Neukirchen, Michael Weber root@fs.lmu.de
+# wget http://xmw.de/tmp/trivdm -O /usr/local/bin/trivdm
+# c7:2345:respawn:/usr/bin/openvt -c 7 -f -w /usr/local/bin/trivdm
+# sumlinks to /usr/local/bin/{gdmflexiserver,w} and /etc/local.d/trivdm.start
+# groupadd --system trivdm ; useradd --system -g trivdm -G wheel trivdm
+# chmod u+s /usr/bin/chvt
+
+NAME=$(basename $0) ; USER=trivdm ; LANG=C
+log() { echo "$@" | logger -s -t $NAME }
+trap 'read -s -k -t 10 "?Press any key to continue ..." ; exit -1 ' ZERR
+w() { ps haxo ruser,tty,comm | grep -v $USER | egrep -v "agetty|login$" | \
+ awk '{ if ( $3 == "X" || $2 != "?" ) print $1" "$2 }' | sort -u | \
+ awk '{ ORS="" ; if ( u != $1 ) { u=$1 ; print "\n"u"\t" } ; print $2"," }' \
+ | sed -e '1d ; s:,$:: ; $a\' }
+
+case $NAME in
+ gdmflexiserver)
+ [ "$1" = "-ls" ] && exec chvt 7 || exec /usr/bin/gdmflexiserver $@ ;;
+ trivdm.start)
+ chvt 7 ; exec setfont sun12x22 ;;
+ w)
+ w ; exec /usr/bin/w $@ ;;
+ *)
+ [ "$1" = "update" ] && exec wget http://xmw.de/tmp/$NAME -O $0
+ [ "$(id -un)" = "$USER" ] || exec su -c $0 $USER ;;
+esac
+
+clear
+toilet --gay -f mono9 $(hostname -f | sed 's:^[^\.]*\.::')
+print -n "Usage: <username>[/<session type>]
+ <session type> in ~/.xinitrc (default), Gnome (fallback),\n\t"
+find /etc/X11/Sessions -type f ! -name Gnome | \
+ awk -F / 'BEGIN { ORS=", " } { print $5 }' | sed 's:, $:\n\n:'
+print "connected users:\n$({ w | grep '' || print '<none>'} | sed 's:^:\t:')\n"
+read "login?$(hostname)/tty7 x11 login: "
+
+case $login in
+ "")
+ exit ;;
+ */*)
+ xclient=$(find /etc/X11/Sessions -iname "*${login#*/}*" -type f | \
+ sort | head -n 1)
+ [ -n "$xclient" ] || { log invalid session ; [ ] }
+ login=${login%/*} ;;
+ *) xclient="~/.xinitrc" ;;
+esac
+
+id "$login" 2>&1 >/dev/null | sed "s|^id:|$NAME:|"
+id "$login" 2>/dev/null >/dev/null
+
+tty=$(ps h -eo ruser,tty,comm | grep "^$login " | awk '$3=="X" {print $2}')
+[ "$tty" ] && { log switching to console $tty ; chvt "${tty#tty}" ; [ ] }
+
+dpy=0 ; while [ -e /tmp/.X11-unix/X$dpy ] ; do (( dpy += 1 )) done
+su -l -c "export xclient=$xclient ;
+ [ -x \"\$xclient\" ] || xclient=/etc/X11/Sessions/Gnome ;
+ /usr/sbin/daemonize -a -e ~/.xorg-stderr -o ~/.xorg-stdout -c ~ \
+ /usr/bin/startx \$xclient -- :$dpy -retro" $login
+[ ]
diff --git a/x11-misc/trivdm/metadata.xml b/x11-misc/trivdm/metadata.xml
new file mode 100644
index 0000000..02b909e
--- /dev/null
+++ b/x11-misc/trivdm/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/x11-misc/trivdm/trivdm-0_p20110921.ebuild b/x11-misc/trivdm/trivdm-0_p20110921.ebuild
new file mode 100644
index 0000000..b298676
--- /dev/null
+++ b/x11-misc/trivdm/trivdm-0_p20110921.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="trivial display manager"
+HOMEPAGE="http://xmw.de/tmp/trivdm"
+SRC_URI=""
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-misc/toilet
+ app-shells/zsh
+ sys-apps/daemonize
+ sys-apps/kbd"
+DEPEND=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 /usr/bin/${PN} -1 ${PN}
+}
+
+src_install() {
+ newbin "${FILESDIR}"/${P} ${PN} || die
+}
+
+pkg_preinst() {
+ elog "you need some symlink to /usr/bin/trivdm to override"
+ elog "gdmflexiserver for xscreensaver->newlogin,"
+ elog "to display established sessions on w,"
+ elog "to fancy up the font on framebuffer console"
+ elog "and allow users change virtual terminal on xscreensaver->newlogin"
+ elog "update your inittab (etc-update, ...) and reload"
+ elog
+ elog "ln -s ../../bin/${PN} /usr/local/bin/gdmflexiserver"
+ elog "ln -s ../../bin/${PN} /usr/local/bin/w"
+ elog "ln -s ../../usr/bin/${PN} /etc/local.d/${PN}.start"
+ elog "chmod u+s /usr/bin/chvt"
+ elog "kill -HUP 1"
+
+ dodir /etc || die
+ local myinit=$(sed -n -e '/c7:/{s/^.*c7:/c7:/ ; s:/local/:/: ; p}' \
+ "${ED}"/usr/bin/${PN})
+ sed -e "/^c7:/d" \
+ -e "\$a$myinit\\" \
+ /etc/inittab > "${ED}"/etc/inittab || die
+}
next reply other threads:[~2011-09-23 22:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 21:52 Michael Weber [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-09-23 22:08 [gentoo-commits] dev/xmw:master commit in: x11-misc/trivdm/, x11-misc/trivdm/files/ Michael Weber
2011-09-27 21:49 Michael Weber
2011-09-27 21:51 Michael Weber
2011-10-10 22:04 Michael Weber
2012-03-21 19:58 Michael Weber
2012-04-23 8:29 Michael Weber
2012-10-28 17:26 Michael Weber
2013-07-07 0:39 Michael Weber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db54be8dfd9705239a5356533b29752b10adabd7.xmw@gentoo \
--to=xmw@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox