0011.env revision 15767
10139N/A#!/bin/sh
10139N/A#
10139N/A# CDDL HEADER START
12141N/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
10139N/A# with the License.
10139N/A#
17180N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17180N/A# or http://www.opensolaris.org/os/licensing.
17180N/A# See the License for the specific language governing permissions
12285N/A# and limitations under the License.
10139N/A#
10139N/A# When distributing Covered Code, include this CDDL HEADER in each
10139N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16186N/A# If applicable, add the following below this CDDL HEADER, with the
10139N/A# fields enclosed by brackets "[]" replaced with your own identifying
10139N/A# information: Portions Copyright [yyyy] [name of copyright owner]
10139N/A#
10139N/A# CDDL HEADER END
14525N/A#
12285N/A#
12773N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
12773N/A# Use is subject to license terms.
12773N/A#
10139N/A
10139N/A
10139N/AHAS_XSCRNSVR=0
10139N/AX11_BIN=/usr/X11/bin
10139N/ADESKTOP_SESSION=${DESKTOP_SESSION:-"xdm"}
10139N/AMAIL=${MAIL-"/var/mail/$USER"}
10139N/ASHELL=${SHELL-"/bin/sh"}
10139N/ADISPLAY=${DISPLAY-":0"}
10139N/ATERM=${TERM-"xterm"}
10139N/A
10139N/Acase $DESKTOP_SESSION in
10139N/Agnome|GNOME|JDS)
10139N/A EDITOR=${EDITOR:-"gedit"}
10139N/A ;;
10139N/Akde|KDE)
10139N/A EDITOR=${EDITOR:-"kedit"}
10139N/A ;;
10139N/A*)
13969N/A EDITOR=${EDITOR:-"vi"}
10441N/A ;;
11896N/Aesac
11896N/A
11970N/Afor XPATH in `/bin/echo $PATH | /bin/tr ":" " "`
11970N/Ado
11982N/A if [ -x $XPATH/xscreensaver-demo ] ; then
11982N/A HAS_XSCRNSVR=1
14519N/A fi
14496N/Adone
11896N/A
10139N/Aif [ $HAS_XSCRNSVR -eq 0 -a -x $X11_BIN/xscreensaver-demo ] ; then
10139N/A PATH=${PATH}:$X11_BIN
10139N/Afi
10139N/A
10139N/Aexport PATH EDITOR MAIL TERM SHELL DISPLAY
10139N/A
10139N/Aif xmodmap | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null
10139N/Athen
10139N/A xmodmap -e "clear Mod1" \
10139N/A -e "clear Mod4" \
10139N/A -e "add Mod1 = Alt_L" \
10139N/A -e "add Mod1 = Alt_R" \
10139N/A -e "add Mod4 = Meta_L" \
10139N/A -e "add Mod4 = Meta_R"
10139N/Afi
10139N/A
10139N/A