Common Desktop Environment: Desktop KornShell User's Guide


The Desktop KornShell User's Guide provides the information you need to create Motif applications with KornShell (kshell) scripts. In addition to the basic information you'll need to get started, several example scripts of increasing complexity are described. Throughout this guide the term dtksh means the Desktop KornShell.

Who Should Use This Guide

This guide is intended for programmers who want a quick and easy means of creating Motif applications, but don't have the time, knowledge, or inclination to use the C programming language. A good understanding of kshell programming, Motif, the Xt Intrinsics, and, to a lesser extent, Xlib is needed. An understanding of C would also be helpful.

How This Guide Is Organized

Chapter 1, Introduction to Desktop KornShell describes the basic information you need to begin writing Motif applications in dtksh scripts.

Chapter 2, A Sample Script describes two simple dtksh scripts. The first script creates a push button widget within a bulletin board widget. The second script expands the first by adding a callback for the push button.

Chapter 3, Advanced Topics describes more advanced topics pertaining to dtksh scripts.

Chapter 4, A Complex Script describes a much more complex script than either of the ones described in Chapter 2. This script creates a graphic interface to the find command.

Appendix A, dtksh Commands lists all the dtksh commands.

Appendix B, dtksh Convenience Functions contains man pages for commands or functions that are not documented elsewhere.

Appendix C, The script_find Script contains the complete listing of the complex script described in Chapter 4.

Related Books

The following books provide information on kshell programming, Motif, the Xt Intrinsics, and Xlib:

What Typographic Changes and Symbols Mean

The following table describes the type changes and symbols used in this book.

Table P-1 Typographic Conventions

Typeface or Symbol 




The names of commands, files, and directories; onscreen computer output 

Edit your .login file.

Use ls -a to list all files.

system% You have mail.



Command-line placeholder: 

replace with a real name or value 

To delete a file, type rm filename.


Book titles, new words or terms, or words to be emphasized 

Read Chapter 6 in User's Guide. These are called class options.

You must be root to do this.

Code samples may display the following: 


UNIX C shell prompt 



UNIX Bourne and Korn shell prompt 



Superuser prompt, all shells