d7d3264d0938eee009946b03986242c18a5949cf
[oweals/cde.git] / cde / programs / dtlogin / config / Xstartup.src
1 XCOMM! KORNSHELL
2 XCOMM ##########################################################################
3 XCOMM
4 XCOMM  Xstartup
5 XCOMM
6 XCOMM  Common Desktop Environment (CDE)
7 XCOMM
8 XCOMM  Configuration file for the Login Manager
9 XCOMM
10 XCOMM  (c) Copyright 1993, 1994 Hewlett-Packard Company
11 XCOMM  (c) Copyright 1993, 1994 International Business Machines Corp.
12 XCOMM  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
13 XCOMM  (c) Copyright 1993, 1994 Novell, Inc.
14 XCOMM
15 XCOMM      ************** DO NOT EDIT THIS FILE **************
16 XCOMM
17 XCOMM  CDE_INSTALLATION_TOP/config/Xstartup is a factory-default file and will
18 XCOMM  be unconditionally overwritten upon subsequent installation.
19 XCOMM  Before making changes to the file, copy it to the configuration 
20 XCOMM  directory, CDE_CONFIGURATION_TOP/config. You must also update the startup
21 XCOMM  resource in CDE_CONFIGURATION_TOP/config/Xconfig.
22 XCOMM
23 XCOMM  $XConsortium: Xstartup.src /main/6 1996/08/15 16:52:10 rswiston $
24 XCOMM
25 XCOMM  This file is typically a shell script. It is run as "root" and should be
26 XCOMM  very careful about security. This is the place to put commands that
27 XCOMM  display the message of the day or do other system-level functions on
28 XCOMM  behalf of the user. The following are the environment variables set for 
29 XCOMM  use in the script:
30 XCOMM
31 XCOMM    DISPLAY, HOME, PATH, USER, SHELL, TZ (timeZone)
32 XCOMM
33 XCOMM  System Administrators are encouraged to use this file as a base to run 
34 XCOMM  system-wide initialization commands with good security.
35 XCOMM
36 XCOMM ##########################################################################
37
38
39 XCOMM
40 XCOMM This script is run as root after the user is verified...
41 XCOMM
42
43 XCOMM dtdbcache file's directory should match
44 XCOMM _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
45 #ifdef __osf__
46 DTDBFILE=/var/tmp/dtdbcache_$DISPLAY
47 #else
48 DTDBFILE=/tmp/dtdbcache_$DISPLAY
49 #endif
50 if [ -f $DTDBFILE ]
51 then
52   /bin/rm -f $DTDBFILE
53 fi
54
55
56 if [ "$DTXSERVERLOCATION" = "local" ]
57 then
58   if [[ ! -z "$ITE" && "$ITE" != "??" && -a "/dev/$ITE" ]]
59   then
60 #if defined (__OpenBSD__)
61         /sbin/chown $USER /dev/$ITE
62         /bin/chgrp $USER_GID /dev/$ITE
63 #elif defined (__FreeBSD__) || defined(__NetBSD__)
64         /usr/sbin/chown $USER /dev/$ITE
65         /usr/bin/chgrp $USER_GID /dev/$ITE
66 #else
67         /bin/chown $USER /dev/$ITE
68         /bin/chgrp $USER_GID  /dev/$ITE
69 #endif
70   fi
71 fi
72
73
74