0020.dtims.src 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. XCOMM!KORNSHELL
  2. XCOMM ####################################################################
  3. XCOMM ## File: 0020.dtims
  4. XCOMM ##
  5. XCOMM ## Default Location: /usr/dt/config/Xsession.d/
  6. XCOMM ##
  7. XCOMM ## Purpose: Start desktop input method server if required
  8. XCOMM ##
  9. XCOMM ## Description:
  10. XCOMM ## This script is invoked by means of the Xsession file
  11. XCOMM ## at user login. It starts an input method server as
  12. XCOMM ## required for selected locales.
  13. XCOMM ##
  14. XCOMM ## Invoked by: /usr/dt/bin/Xsession
  15. XCOMM ##
  16. XCOMM ## Product: @(#)Common Desktop Environment 1.0
  17. XCOMM ##
  18. XCOMM ## Note:
  19. XCOMM ##
  20. XCOMM ## The /usr/dt/config/Xsession.d/0020.dtims file is a
  21. XCOMM ## factory-default file and will be unconditionally overwritten upon
  22. XCOMM ## subsequent installation. To customize input method server startup
  23. XCOMM ## behavior, copy this file to the configuration directory,
  24. XCOMM ## /etc/dt/config/Xsession.d and customize that version
  25. XCOMM ## of the file.
  26. XCOMM ##
  27. XCOMM ## The value of DTSTARTIMS determines whether this file,
  28. XCOMM ## /usr/dt/config/Xsession.d/0020.dtims, will start
  29. XCOMM ## the specified input method server. Should an input method server
  30. XCOMM ## be started from /etc/dt/config/Xsession.d/0020.dtims
  31. XCOMM ## or should an input method server not be desired, unset DTSTARTIMS
  32. XCOMM ## to prevent this file from starting one.
  33. XCOMM ##
  34. XCOMM ## The general logic of this file is:
  35. XCOMM ##
  36. XCOMM ## if [ "$DTSTARTIMS" = "True" ]
  37. XCOMM ## then
  38. XCOMM ## <start input method server>
  39. XCOMM ## unset DTSTARTIMS
  40. XCOMM ## fi
  41. XCOMM ##
  42. XCOMM ## Revision: $XConsortium: 0020.dtims /main/2 1996/07/18 14:23:41 drk $
  43. XCOMM ##
  44. XCOMM ## (c) Copyright 1993, 1994 Hewlett-Packard Company
  45. XCOMM ## (c) Copyright 1993, 1994 International Business Machines Corp.
  46. XCOMM ## (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  47. XCOMM ## (c) Copyright 1993, 1994 Novell, Inc.
  48. XCOMM ##
  49. XCOMM ####################################################################
  50. #define HASH #
  51. if [ "$DTSTARTIMS" = "True" ]
  52. then
  53. XCOMM
  54. XCOMM Start HP platform IM (Input Method) server for Asian locales.
  55. XCOMM
  56. if [[ -z "${CDE_IMS_PID:-}" ]]
  57. then
  58. case "$LANG" in
  59. ja_JP* | japanese* | \
  60. ko_KR* | korean* | \
  61. zh_TW* | chinese-t* | \
  62. zh_CN* | chinese-s* )
  63. DTIMS_SCRIPT=0020.dtims
  64. DTIMS_CMD="/usr/dt/bin/dtimsstart -env -shell ksh"
  65. if [[ -x "${DTIMS_CMD%% *}" ]]; then
  66. HASH execute DTIMS_CMD and 'eval' its output
  67. Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" started."
  68. eval ` $DTIMS_CMD `
  69. HASH set CDE_IMS_PID to 0 (IMS started, but its pid is unknown.)
  70. CDE_IMS_PID=0
  71. else
  72. Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" not found."
  73. fi
  74. unset DTIMS_CMD DTIMS_SCRIPT
  75. ;;
  76. esac
  77. unset DTSTARTIMS
  78. fi
  79. fi
  80. XCOMM ######################### eof #####################