From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R7DpV-0002Eh-A8 for garchives@archives.gentoo.org; Fri, 23 Sep 2011 22:02:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB16E21C39E; Fri, 23 Sep 2011 21:55:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A0BBA21C38A for ; Fri, 23 Sep 2011 21:53:01 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0CD401B4009 for ; Fri, 23 Sep 2011 21:52:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 02F3C80042 for ; Fri, 23 Sep 2011 21:52:55 +0000 (UTC) From: "Michael Weber" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Weber" Message-ID: Subject: [gentoo-commits] dev/xmw:master commit in: x11-misc/trivdm/, x11-misc/trivdm/files/ X-VCS-Repository: dev/xmw X-VCS-Files: x11-misc/trivdm/ChangeLog x11-misc/trivdm/Manifest x11-misc/trivdm/files/trivdm-0_p20110921 x11-misc/trivdm/metadata.xml x11-misc/trivdm/trivdm-0_p20110921.ebuild X-VCS-Directories: x11-misc/trivdm/ x11-misc/trivdm/files/ X-VCS-Committer: xmw X-VCS-Committer-Name: Michael Weber X-VCS-Revision: db54be8dfd9705239a5356533b29752b10adabd7 Date: Fri, 23 Sep 2011 21:52:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3c0b3b632af36bac9f1a2370a278a150 commit: db54be8dfd9705239a5356533b29752b10adabd7 Author: Michael Weber gentoo org> AuthorDate: Fri Sep 23 21:52:45 2011 +0000 Commit: Michael Weber gentoo org> CommitDate: Fri Sep 23 21:52:45 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/xmw.git;a=3Dco= mmit;h=3Ddb54be8d 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 +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 5898c658045a642da8dc9eec67db38f62a23d= bf1 SHA1 394a9f9e816f4a8143660781fc20f0c1df09ea36 SHA256 c414ed6d9c06a1df= 0967a787e4e5fcc89ca8e8c8f6399adcf9c02dc421bc6786 +EBUILD trivdm-0_p20110921.ebuild 1293 RMD160 c907cf4dbba504804e49b60f603= e787b0fea76fe SHA1 6f0b908cdce2253c394dd11e09d041d2fbe23a73 SHA256 b045b2= d0dba35229bdaa048ed0049402ade36676cfb61a7f8ca6ca0a84dbd99c +MISC ChangeLog 287 RMD160 7e59711261ef173fc9fd22be4ca0bbb0d2059df5 SHA1 = 3cb44a28290f92c95ebcd78065ca14de52d60876 SHA256 5f3667a5fb992b6d5366ff5bd= 8eabf3a28f12e8b698a8d17bd183f1b2585dfe5 +MISC metadata.xml 245 RMD160 6b03982a4d5f32d9fa6b9259ae36f9fcb07c8404 SH= A1 fb16c7b4c5ab071dd979f761b8bb075f5396b737 SHA256 375a1da02cd2c393ce2378= a73c1ce08134bc030b3bb378c6a4d6ca9cd5be1f8d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iF4EAREIAAYFAk58/60ACgkQknrdDGLu8JDsXwD9HISgha9WFWIpanuyHvkXZy7/ +WRkPmnxNO4EbjkWrWm8BAI9ummaHvWodau0GVScAZiTarpau2V9eGzHcH0Eg3agh +=3DtLx3 +-----END PGP SIGNATURE----- diff --git a/x11-misc/trivdm/files/trivdm-0_p20110921 b/x11-misc/trivdm/f= iles/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=20 +# chmod u+s /usr/bin/chvt + +NAME=3D$(basename $0) ; USER=3Dtrivdm ; LANG=3DC +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 =3D=3D "X" || $2 !=3D "?" ) print $1" "$2 }' | sort -= u | \ + awk '{ ORS=3D"" ; if ( u !=3D $1 ) { u=3D$1 ; print "\n"u"\t" } ; pr= int $2"," }' \ + | sed -e '1d ; s:,$:: ; $a\' } + +case $NAME in + gdmflexiserver) + [ "$1" =3D "-ls" ] && exec chvt 7 || exec /usr/bin/gdmflexiserver $@ ;; + trivdm.start) + chvt 7 ; exec setfont sun12x22 ;; + w) + w ; exec /usr/bin/w $@ ;; + *) + [ "$1" =3D "update" ] && exec wget http://xmw.de/tmp/$NAME -O $0 + [ "$(id -un)" =3D "$USER" ] || exec su -c $0 $USER ;; +esac + +clear +toilet --gay -f mono9 $(hostname -f | sed 's:^[^\.]*\.::') +print -n "Usage: [/] + in ~/.xinitrc (default), Gnome (fallback),\n\t" +find /etc/X11/Sessions -type f ! -name Gnome | \ + awk -F / 'BEGIN { ORS=3D", " } { print $5 }' | sed 's:, $:\n\n:' +print "connected users:\n$({ w | grep '' || print ''} | sed 's:^:\= t:')\n" +read "login?$(hostname)/tty7 x11 login: " + +case $login in + "")=20 + exit ;; + */*)=20 + xclient=3D$(find /etc/X11/Sessions -iname "*${login#*/}*" -type f | \ + sort | head -n 1) + [ -n "$xclient" ] || { log invalid session ; [ ] } + login=3D${login%/*} ;; + *) xclient=3D"~/.xinitrc" ;; +esac + +id "$login" 2>&1 >/dev/null | sed "s|^id:|$NAME:|" +id "$login" 2>/dev/null >/dev/null=20 + +tty=3D$(ps h -eo ruser,tty,comm | grep "^$login " | awk '$3=3D=3D"X" {pr= int $2}') +[ "$tty" ] && { log switching to console $tty ; chvt "${tty#tty}" ; [ ] = } + +dpy=3D0 ; while [ -e /tmp/.X11-unix/X$dpy ] ; do (( dpy +=3D 1 )) done +su -l -c "export xclient=3D$xclient ;=20 + [ -x \"\$xclient\" ] || xclient=3D/etc/X11/Sessions/Gnome ;=20 + /usr/sbin/daemonize -a -e ~/.xorg-stderr -o ~/.xorg-stdout -c ~ \ + /usr/bin/startx \$xclient -- :$dpy -retro" $login=20 +[ ] 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 @@ + + + +no-herd + +xmw@gentoo.org +Michael Weber + + + 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=3D3 + +inherit eutils + +DESCRIPTION=3D"trivial display manager" +HOMEPAGE=3D"http://xmw.de/tmp/trivdm" +SRC_URI=3D"" + +LICENSE=3D"MIT" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"" + +RDEPEND=3D"app-misc/toilet + app-shells/zsh + sys-apps/daemonize + sys-apps/kbd" +DEPEND=3D"" + +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=3D$(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 +}