[13363] in Athena Bugs

home help back first fref pref prev next nref lref last post

xess does not allow overriding of resources

daemon@ATHENA.MIT.EDU (John Hawkinson)
Thu Mar 23 20:22:22 1995

Date: Thu, 23 Mar 95 20:22:16 -0500
To: bugs@MIT.EDU
Cc: alexp@MIT.EDU
From: John Hawkinson <jhawk@MIT.EDU>


The scripts that are used to start Xess (/mit/xess/scripts/...) all
set the XENVIRONMENT variable to a file containing app-defaults
for Xess, and the perl versions include the comment:

# If the user has already set this resource, his/her personal settings
# will override these systems defaults, so we don't worry about them.

Unfortunately, this is not true of XENVIRONMENT, which overrides the
user's settings. Instead, XUSERFILESEARCHPATH (which has a slightly
different syntax than XENVIRONMENT) should be used, as it allows
resources in the RESOURCE_MANAGER and SCREEN_RESOURCES properties
(i.e. xrdb-style) to take effect, as well as those in XENVIRONMENT,
and a few other places.

Attached are patches to /mit/xess/scripts to correct this.

Thanks!

--jhawk

diff -rc /mit/xess/scripts/xess /tmp/newscripts/xess
*** /mit/xess/scripts/xess	Wed Oct 12 10:41:21 1994
--- /tmp/newscripts/xess	Thu Mar 23 20:15:20 1995
***************
*** 26,37 ****
  # End of Main
  #
  
- #
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable XENVIRONMENT.
! # If the user has already set this resource, his/her personal settings
! # will override these systems defaults, so we don't worry about them.
  #
  sub do_resources
  {
--- 26,37 ----
  # End of Main
  #
  
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable
! # XUSERFILESEACHPATH.  If the user has already set this resource,
! # his/her personal settings will override these systems defaults, so we
! # don't worry about them.
  #
  sub do_resources
  {
***************
*** 112,116 ****
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XENVIRONMENT'} = "/tmp/xess.resources.${myshell}"; 
  }
--- 112,116 ----
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XUSERFILESEARCHPATH'} = "/tmp/xess.resources.$myshell:" . $ENV{'XUSERFILESEARCHPATH'}; 
  }
diff -rc /mit/xess/scripts/xess.csh /tmp/newscripts/xess.csh
*** /mit/xess/scripts/xess.csh	Fri Sep 30 12:49:13 1994
--- /tmp/newscripts/xess.csh	Thu Mar 23 20:16:20 1995
***************
*** 7,13 ****
  set XESSDIR=/mit/xess
  set MACH=`/bin/athena/machtype`
  set XESSRESOURCEDIR=${XESSDIR}/lib/X11/app-defaults
! setenv XENVIRONMENT ${XESSRESOURCEDIR}/Xess3
  setenv XESS_LICENSE_FILE ${XESSDIR}/xess_license_coriander.dat:${XESSDIR}/xess_license_oregano.dat
  exec ${XESSDIR}/${MACH}binary/xess3 $*
  
--- 7,13 ----
  set XESSDIR=/mit/xess
  set MACH=`/bin/athena/machtype`
  set XESSRESOURCEDIR=${XESSDIR}/lib/X11/app-defaults
! setenv XUSERFILESEARCHPATH ${XESSRESOURCEDIR}/Xess3:${XUSERFILESEARCHPATH}
  setenv XESS_LICENSE_FILE ${XESSDIR}/xess_license_coriander.dat:${XESSDIR}/xess_license_oregano.dat
  exec ${XESSDIR}/${MACH}binary/xess3 $*
  
diff -rc /mit/xess/scripts/xess.csh.linux /tmp/newscripts/xess.csh.linux
*** /mit/xess/scripts/xess.csh.linux	Thu Mar  9 12:54:47 1995
--- /tmp/newscripts/xess.csh.linux	Thu Mar 23 20:17:28 1995
***************
*** 7,13 ****
  set XESSDIR=/mit/xess
  set MACH=`/bin/athena/machtype`
  set XESSRESOURCEDIR=${XESSDIR}/lib/X11/app-defaults
! setenv XENVIRONMENT ${XESSRESOURCEDIR}/Xess304
  
  if (! $?XESS_LINUX_MSG) then
  cat <<END
--- 7,13 ----
  set XESSDIR=/mit/xess
  set MACH=`/bin/athena/machtype`
  set XESSRESOURCEDIR=${XESSDIR}/lib/X11/app-defaults
! setenv XUSERFILESEARCHPATH ${XESSRESOURCEDIR}/Xess304:${XUSERFILESEARCHPATH}
  
  if (! $?XESS_LINUX_MSG) then
  cat <<END
diff -rc /mit/xess/scripts/xess.inbsd /tmp/newscripts/xess.inbsd
*** /mit/xess/scripts/xess.inbsd	Tue Mar 14 16:42:31 1995
--- /tmp/newscripts/xess.inbsd	Thu Mar 23 20:15:03 1995
***************
*** 50,61 ****
  # End of Main
  #
  
- #
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable XENVIRONMENT.
! # If the user has already set this resource, his/her personal settings
! # will override these systems defaults, so we don't worry about them.
  #
  sub do_resources
  {
--- 50,61 ----
  # End of Main
  #
  
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable
! # XUSERFILESEACHPATH.  If the user has already set this resource,
! # his/her personal settings will override these systems defaults, so we
! # don't worry about them.
  #
  sub do_resources
  {
***************
*** 136,140 ****
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XENVIRONMENT'} = "/tmp/xess.resources.${myshell}"; 
  }
--- 136,140 ----
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XUSERFILESEARCHPATH'} = "/tmp/xess.resources.$myshell:" . $ENV{'XUSERFILESEARCHPATH'}; 
  }
diff -rc /mit/xess/scripts/xess.linux /tmp/newscripts/xess.linux
*** /mit/xess/scripts/xess.linux	Tue Mar 14 16:57:15 1995
--- /tmp/newscripts/xess.linux	Thu Mar 23 20:15:17 1995
***************
*** 50,61 ****
  # End of Main
  #
  
- #
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable XENVIRONMENT.
! # If the user has already set this resource, his/her personal settings
! # will override these systems defaults, so we don't worry about them.
  #
  sub do_resources
  {
--- 50,61 ----
  # End of Main
  #
  
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable
! # XUSERFILESEACHPATH.  If the user has already set this resource,
! # his/her personal settings will override these systems defaults, so we
! # don't worry about them.
  #
  sub do_resources
  {
***************
*** 136,140 ****
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XENVIRONMENT'} = "/tmp/xess.resources.${myshell}"; 
  }
--- 136,140 ----
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XUSERFILESEARCHPATH'} = "/tmp/xess.resources.$myshell:" . $ENV{'XUSERFILESEARCHPATH'}; 
  }
diff -rc /mit/xess/scripts/xess.sgi /tmp/newscripts/xess.sgi
*** /mit/xess/scripts/xess.sgi	Thu Mar  9 13:08:27 1995
--- /tmp/newscripts/xess.sgi	Thu Mar 23 20:14:55 1995
***************
*** 29,40 ****
  # End of Main
  #
  
- #
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable XENVIRONMENT.
! # If the user has already set this resource, his/her personal settings
! # will override these systems defaults, so we don't worry about them.
  #
  sub do_resources
  {
--- 29,40 ----
  # End of Main
  #
  
  # Figure out values for default printer(s) and add them to the resource
  # file so that we have some options for printing.  Finally, set the
! # resource file pointer using the environment variable
! # XUSERFILESEACHPATH.  If the user has already set this resource,
! # his/her personal settings will override these systems defaults, so we
! # don't worry about them.
  #
  sub do_resources
  {
***************
*** 112,116 ****
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XENVIRONMENT'} = "/tmp/xess.resources.${myshell}"; 
  }
--- 112,116 ----
      print RES "helios:lpr -Phelios %s";
      printf RES ("\n");
      close RES;
!     $ENV{'XUSERFILESEARCHPATH'} = "/tmp/xess.resources.$myshell:" . $ENV{'XUSERFILESEARCHPATH'}; 
  }



home help back first fref pref prev next nref lref last post