components/gnome/gdm/files/0011.env
changeset 7201 bcc18175756d
equal deleted inserted replaced
7200:bc003d56ef5a 7201:bcc18175756d
       
     1 #!/bin/sh
       
     2 #
       
     3 # CDDL HEADER START
       
     4 #
       
     5 # The contents of this file are subject to the terms of the
       
     6 # Common Development and Distribution License (the "License").
       
     7 # You may not use this file except in compliance with the License.
       
     8 #
       
     9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
    10 # or http://www.opensolaris.org/os/licensing.
       
    11 # See the License for the specific language governing permissions
       
    12 # and limitations under the License.
       
    13 #
       
    14 # When distributing Covered Code, include this CDDL HEADER in each
       
    15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    16 # If applicable, add the following below this CDDL HEADER, with the
       
    17 # fields enclosed by brackets "[]" replaced with your own identifying
       
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    19 #
       
    20 # CDDL HEADER END
       
    21 #
       
    22 #
       
    23 # Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 
       
    27 DESKTOP_SESSION=${DESKTOP_SESSION:-"xdm"}
       
    28 MAIL=${MAIL-"/var/mail/$USER"}
       
    29 SHELL=${SHELL-"/bin/sh"}
       
    30 DISPLAY=${DISPLAY-":0"}
       
    31 TERM=${TERM-"xterm"}
       
    32 
       
    33 case "$DESKTOP_SESSION" in
       
    34 gnome|GNOME|JDS)
       
    35     EDITOR=${EDITOR:-"gedit"}
       
    36     ;;
       
    37 kde|KDE)
       
    38     EDITOR=${EDITOR:-"kedit"}
       
    39     ;;
       
    40 *)
       
    41     EDITOR=${EDITOR:-"vi"}
       
    42     ;;
       
    43 esac
       
    44 
       
    45 export EDITOR MAIL TERM SHELL DISPLAY
       
    46 
       
    47 if /usr/bin/xmodmap | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null
       
    48 then
       
    49     /usr/bin/xmodmap \
       
    50 	-e "clear Mod1" \
       
    51         -e "clear Mod4" \
       
    52         -e "add Mod1 = Alt_L" \
       
    53         -e "add Mod1 = Alt_R" \
       
    54         -e "add Mod4 = Meta_L" \
       
    55         -e "add Mod4 = Meta_R"
       
    56 fi