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 1Qt9Et-0000QJ-7U for garchives@archives.gentoo.org; Tue, 16 Aug 2011 02:18:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3F8621C383; Tue, 16 Aug 2011 02:18:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 74C1C21C383 for ; Tue, 16 Aug 2011 02:18:39 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B83B71B403F for ; Tue, 16 Aug 2011 02:18:38 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2214) id 71D0320051; Tue, 16 Aug 2011 02:18:37 +0000 (UTC) From: "Jeremy Olexa (darkside)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, darkside@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in x11-misc/slim/files: Xsession-r2 X-VCS-Repository: gentoo-x86 X-VCS-Files: Xsession-r2 X-VCS-Directories: x11-misc/slim/files X-VCS-Committer: darkside X-VCS-Committer-Name: Jeremy Olexa Content-Type: text/plain; charset=utf8 Message-Id: <20110816021837.71D0320051@flycatcher.gentoo.org> Date: Tue, 16 Aug 2011 02:18:37 +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: 5eb71f632ff51959440bc6d53a3bfd6d darkside 11/08/16 02:18:37 Added: Xsession-r2 Log: New Xsession script, bug 334111 by Ian Stakenvicius =20 (Portage version: 2.1.10.6/cvs/Linux x86_64) Revision Changes Path 1.1 x11-misc/slim/files/Xsession-r2 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/file= s/Xsession-r2?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/file= s/Xsession-r2?rev=3D1.1&content-type=3Dtext/plain Index: Xsession-r2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #!/bin/sh # # Slim login manager Xsession script # command=3D"$@" # this will go into slim.log along with all other echo's # good for debugging where things go wrong echo "$0: Beginning session setup..." # First read /etc/profile and .profile test -f /etc/profile && . /etc/profile test -f "$HOME/.profile" && . "$HOME/.profile" # Second read /etc/xprofile and .xprofile for X specific setup test -f /etc/xprofile && . /etc/xprofile test -f "$HOME/.xprofile" && . "$HOME/.xprofile" # wrap possible arguments to determine whether to treat special or not if [ "x$command" =3D "xcustom" ] || [ "x$command" =3D "xCustom" ] || [ "x= $command" =3D "xdefault" ] || [ "x$command" =3D "xDefault" ]; then command=3D"Xsession" fi if [ "x$command" =3D "x" ]; then # no default specified, check if Xsession will complete # and if not then assign XSESSION to command if [ -x "$HOME/.xsession" ] || [ -x "$HOME/.Xclients" ] || [ -x /etc/X1= 1/xinit/Xclients ] || [ -x /etc/X11/Xclients ]; then command=3D"Xsession" else command=3D$XSESSION fi fi # most of this is from /etc/X11/chooser.sh sessionscript=3D"" if [ -n "${command}" ]; then # find a match for $command in /etc/X11/Sessions for x in /etc/X11/Sessions/* ; do if [ "`echo ${x##*/} | awk '{ print toupper($1) }'`" =3D "`echo ${com= mand} | awk '{ print toupper($1) }'`" ]; then sessionscript=3D${x} break fi done if [ -n "${sessionscript}" ]; then if [ -x "${sessionscript}" ]; then command=3D"${sessionscript}" else command=3D"/bin/sh ${sessionscript}" fi else # find an executable for $command x=3D"" y=3D"" for x in "${command}" "`echo ${command} | awk '{ print toupper($1) }'= `" "`echo ${command} | awk '{ print tolower($1) }'`" do # Fall through ... if [ -x "`which ${x} 2>/dev/null`" ]; then y=3D"`which ${x} 2>/dev/null`" break fi done # note , if the command could not be found then $command will be empt= y command=3D"$y" unset x unset y fi fi # call xrdb and xmodmap and such, since $command is not a session script if [ -z "${sessionscript}" ]; then userresources=3D"$HOME/.Xresources" usermodmap=3D"$HOME/.Xmodmap" userxkbmap=3D"$HOME/.Xkbmap" sysresources=3D/etc/X11/Xresources=20 sysmodmap=3D/etc/X11/Xmodmap=20 sysxkbmap=3D/etc/X11/Xkbmap rh6sysresources=3D/etc/X11/xinit/Xresources=20 rh6sysmodmap=3D/etc/X11/xinit/Xmodmap=20 # merge in defaults if [ -f "$rh6sysresources" ]; then xrdb -merge "$rh6sysresources" fi if [ -f "$sysresources" ]; then xrdb -merge "$sysresources" fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi # merge in keymaps if [ -f "$sysxkbmap" ]; then setxkbmap `cat "$sysxkbmap"` XKB_IN_USE=3Dyes fi if [ -f "$userxkbmap" ]; then setxkbmap `cat "$userxkbmap"` XKB_IN_USE=3Dyes fi # # Eeek, this seems like too much magic here # if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/X= F86Config ]; then xkbsymbols=3D`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/= p' /etc/X11/XF86Config` if [ -n "$xkbsymbols" ]; then setxkbmap -symbols "$xkbsymbols" XKB_IN_USE=3Dyes fi fi fi # xkb and xmodmap don't play nice together if [ -z "$XKB_IN_USE" ]; then if [ -f "$rh6sysmodmap" ]; then xmodmap "$rh6sysmodmap" fi if [ -f "$sysmodmap" ]; then xmodmap "$sysmodmap" fi if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi fi unset XKB_IN_USE fi unset sessionscript # start failsafe session if [ -z "${command}" ]; then echo "$0: Failed to find a command to start the session, so starting a = failsafe xterm." exec xterm -geometry 80x24+0+0 fi # run all system xinitrc shell scripts which will update command if [ -d /etc/X11/xinit/xinitrc.d ]; then for i in /etc/X11/xinit/xinitrc.d/* ; do if [ -x "$i" ]; then . "$i" fi done unset i fi echo "$0: Setup done, will execute: $command" exec $command # vim:ts=3D4