SunSolve Internal
 


Infodoc ID   Synopsis   Date
21137   Displaying MOTD on CDE login   15 Dec 1999

Description Top

1. Once you login CDE begins to initialize itself through a series of ksh
   programs located in /usr/dt/config/Xsession.d.  Creating a new script in 
   this directory can allow you to execute a CDE built in error reporting
   program which you can use to display your message.  The error messaging 
   program will open a window during the dtlogin session and require the 
   user to click on OK.  Look at the naming convention used for the CDE 
   initialization scripts.
   
   	# ls -l /usr/dt/config/Xsession.d
   	
2. Create the following script called 0003.message in the Xsession.d 
   directory.
   
   #!/bin/sh
   #
   # This shell script invokes a dialog
   # giving the user time to read the message of the day
   # 
   message=`cat /etc/motd | sed 's/$/\\\n/'`
   /usr/dt/bin/dterror.ds "$message" "A Message" "Click here when finished"

3. Change the mode of the new script to make it executable

	# chmod a+x 0003.message
	
4. Create a message of the day file in /etc/motd

Note: Any message (i.e. a security message) can be displayed using
this method.  Just replace the /etc/motd with the path to the file
to be displayed.

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team