0015.sun.env.src 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. XCOMM!KORNSHELL
  2. XCOMM ####################################################################
  3. XCOMM ## File: 0015.sun.env.src
  4. XCOMM ##
  5. XCOMM ## Default Location: /usr/dt/config/Xsession.d/
  6. XCOMM ##
  7. XCOMM ## Purpose: Setup various items for Solaris desktop support
  8. XCOMM ##
  9. XCOMM ## Description: This script is invoked by means of the Xsession file
  10. XCOMM ## at user login.
  11. XCOMM ##
  12. XCOMM ## Invoked by: /usr/dt/bin/Xsession
  13. XCOMM ##
  14. XCOMM ## Product: @(#)Common Desktop Environment 1.0
  15. XCOMM ##
  16. XCOMM ## $XConsortium: 0015.sun.env.src /main/3 1996/04/23 11:41:31 drk $
  17. XCOMM ##
  18. XCOMM ## (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  19. XCOMM ##
  20. XCOMM ####################################################################
  21. #define HASH #
  22. XCOMM ##########################################################################
  23. XCOMM
  24. XCOMM Directory specifications
  25. XCOMM
  26. XCOMM ##########################################################################
  27. HASH
  28. HASH Set OPENWINHOME
  29. HASH
  30. if [ -z "$OPENWINHOME" ]
  31. then
  32. export OPENWINHOME="/usr/openwin"
  33. fi
  34. HASH
  35. HASH Set MANPATH
  36. HASH
  37. if [ -z "$MANPATH" ]
  38. then
  39. export MANPATH=/usr/man:$OPENWINHOME/share/man
  40. else
  41. export MANPATH=$MANPATH:$OPENWINHOME/share/man
  42. fi
  43. HASH
  44. HASH Set HELPPATH
  45. HASH
  46. if [ -z "$HELPPATH" ]
  47. then
  48. export HELPPATH=$OPENWINHOME/lib/locale:$OPENWINHOME/lib/help
  49. else
  50. export HELPPATH=$HELPPATH:$OPENWINHOME/lib/locale:$OPENWINHOME/lib/help
  51. fi
  52. HASH
  53. HASH Set AnswerBook path
  54. HASH
  55. if [ -z "$AB_CARDCATALOG" ]
  56. then
  57. export AB_CARDCATALOG=CDE_INSTALLATION_TOP/share/answerbooks/$LANG/ab_cardcatalog
  58. else
  59. export AB_CARDCATALOG=CDE_INSTALLATION_TOP/share/answerbooks/$LANG/ab_cardcatalog:$AB_CARDCATALOG
  60. fi
  61. HASH
  62. HASH Set XFILESEARCHPATH
  63. HASH
  64. if [ -z "$XFILESEARCHPATH" ]
  65. then
  66. export XFILESEARCHPATH="$OPENWINHOME/lib/locale/%L/%T/%N%S:$OPENWINHOME/lib/%T/%N%S"
  67. else
  68. export XFILESEARCHPATH="$XFILESEARCHPATH:$OPENWINHOME/lib/locale/%L/%T/%N%S:$OPENWINHOME/lib/%T/%N%S"
  69. fi
  70. HASH Allocate default colormaps for dynamic non-default visuals
  71. if [ -x $OPENWINHOME/bin/cmap_alloc ]
  72. then
  73. $OPENWINHOME/bin/cmap_alloc -allscreens
  74. fi
  75. HASH start virtual keyboard backend
  76. HASH
  77. HASH To start old OpenLook virtual keyboard for use with the OpenLook deskset
  78. HASH applications, uncomment (remove "#" character from) the following 4 lines.
  79. HASH Note, this may add a few extra seconds to your desktop start time.
  80. HASH if [ -x $OPENWINHOME/bin/vkbd ]
  81. HASH then
  82. HASH $OPENWINHOME/bin/vkbd -nopopup &
  83. HASH fi
  84. HASH Init DeskSet colors (for OpenWindow applications)
  85. if [ -x $OPENWINHOME/bin/ds_server_init ]
  86. then
  87. $OPENWINHOME/bin/ds_server_init
  88. fi
  89. HASH Add font paths in $HOME/.OWfontpath
  90. if [ "$DTXSERVERLOCATION" != "remote" ]; then
  91. HASH
  92. HASH Since X server is local,
  93. HASH making one call to xset.
  94. HASH
  95. ADDFONTPATH() {
  96. HASH Combine lines together to make arguments for the xset command
  97. FP=`nawk '
  98. BEGIN { fp="fp+ " }
  99. /^[ ]*$/ { fp=" +fp " ; continue }
  100. { fontsdir = sprintf("%s%s", $0,"/fonts.dir")
  101. getline fontsdata < fontsdir
  102. if (fontsdata != 0) {
  103. printf("%s%s", fp, $0) ; fp="," ; fontsdata=0 } } ' $1`
  104. if [ -n "$FP" ]; then
  105. eval "$OPENWINHOME/bin/xset $FP"
  106. fi
  107. }
  108. HASH Add personal fontpaths
  109. if [ -r $HOME/.OWfontpath ]; then
  110. ADDFONTPATH $HOME/.OWfontpath
  111. fi
  112. else
  113. HASH
  114. HASH Since X server is not local, we don't know if the font
  115. HASH directories exist on the X server machine, so
  116. HASH setting them one at a time.
  117. HASH
  118. if [ -r $HOME/.OWfontpath ]; then
  119. nawk ' BEGIN {
  120. fp=" fp+ "
  121. XDIR=0
  122. }
  123. /^[ ]*$/ {
  124. fp=" +fp " ; continue }
  125. {cmd = sprintf("%s%s%s%s%s",XDIR,"/xset",fp, $0," 1>/dev/null");
  126. system(cmd); } ' XDIR=$OPENWINHOME/bin .OWfontpath
  127. fi
  128. fi
  129. XCOMM ######################### eof #####################