0011.env revision 15832
10139N/A#!/bin/sh
10139N/A#
10139N/A# CDDL HEADER START
20788N/A#
10139N/A# The contents of this file are subject to the terms of the
10139N/A# Common Development and Distribution License, Version 1.0 only
10139N/A# (the "License"). You may not use this file except in compliance
17185N/A# with the License.
10139N/A#
16880N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18603N/A# or http://www.opensolaris.org/os/licensing.
17178N/A# See the License for the specific language governing permissions
10139N/A# and limitations under the License.
20840N/A#
10139N/A# When distributing Covered Code, include this CDDL HEADER in each
20839N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12578N/A# If applicable, add the following below this CDDL HEADER, with the
10139N/A# fields enclosed by brackets "[]" replaced with your own identifying
18615N/A# information: Portions Copyright [yyyy] [name of copyright owner]
10139N/A#
20841N/A# CDDL HEADER END
18151N/A#
18151N/A#
18977N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
18970N/A# Use is subject to license terms.
17797N/A#
20307N/A
17797N/A
16880N/AHAS_XSCRNSVR=0
17733N/AX11_BIN=/usr/X11/bin
17797N/ADESKTOP_SESSION=${DESKTOP_SESSION:-"xdm"}
17753N/AMAIL=${MAIL-"/var/mail/$USER"}
16880N/ASHELL=${SHELL-"/bin/sh"}
17089N/ADISPLAY=${DISPLAY-":0"}
17797N/ATERM=${TERM-"xterm"}
18159N/A
18159N/Acase $DESKTOP_SESSION in
16880N/Agnome|GNOME|JDS|tgnome|TGNOME|tjds|TJDS|TrustedJDS)
16880N/A EDITOR=${EDITOR:-"gedit"}
16880N/A ;;
17733N/Akde|KDE)
16880N/A EDITOR=${EDITOR:-"kedit"}
17089N/A ;;
17733N/A*)
17074N/A EDITOR=${EDITOR:-"vi"}
20788N/A ;;
20333N/Aesac
20788N/A
20307N/Afor XPATH in `/bin/echo $PATH | /bin/tr ":" " "`
20788N/Ado
20839N/A if [ -x $XPATH/xscreensaver-demo ] ; then
20788N/A HAS_XSCRNSVR=1
17733N/A fi
17733N/Adone
18559N/A
20788N/Aif [ $HAS_XSCRNSVR -eq 0 -a -x $X11_BIN/xscreensaver-demo ] ; then
17884N/A PATH=${PATH}:$X11_BIN
17884N/Afi
20788N/A
18287N/A# Copied from /usr/dt/config/Xinitrc.tjds
20788N/A# http://blogs.sun.com/gfaden/entry/running_trusted_extensions_with_opensolaris
20307N/A# Workaround Xconnecion problem if needs be
20788N/Aif [ x"$DESKTOP_SESSION" = xtgnome -o x"$DESKTOP_SESSION" = xtjds ] ; then
18692N/A DISP_HOST=`expr $DISPLAY : '\([^:]*\):.*'`
20788N/A DISP_NUM=`expr $DISPLAY : '[^:]*:\(.*\)'`
18763N/A
20788N/A if [ x"$DISP_HOST" != x -a x"$DISP_HOST" != xunix ] ; then
20788N/A DISPLAY=127.0.0.1:$DISP_NUM
20788N/A fi
20788N/Afi
20788N/A
20788N/Aexport PATH EDITOR MAIL TERM SHELL DISPLAY
20788N/A
20788N/Aif xmodmap | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null
20788N/Athen
20839N/A xmodmap -e "clear Mod1" \
20839N/A -e "clear Mod4" \
20839N/A -e "add Mod1 = Alt_L" \
20839N/A -e "add Mod1 = Alt_R" \
20788N/A -e "add Mod4 = Meta_L" \
18940N/A -e "add Mod4 = Meta_R"
20788N/Afi
20788N/A
20788N/A