Page: 1 2 3 4 5 6 7 8 9 10



STARTUP PROGRAM

The Xstartup file is typically a shell script. It is run as root and should be very careful about security. This is the place to put commands which add entries to /etc/utmp (the sessreg program may be useful here), mount users' home directories from file servers, display the message of the day, or abort the session if logins are not allowed.

In addition to any specified by DisplagManager.exportList, the following environment variables are passed:

DISPLAY the associated display name
HOME the initial working directory of the user
USER the user name
PATH the value of DisplayManager.DlSPLAY.systemPath
SHELL the value of DisplayManager.DlSPLAY.systemShell
XAUTHORITY may be set to an authority file

No arguments are passed to the script. Xdm waits until this script exits before starting the user session. If the exit value of this script is non-zero, xdm discontinues the session and starts another authentication cycle.

The sample Xstartup file shown here prevents login while the file /etc/nologin exists. Thus this is not a complete example, but simply a demonstration of the available functionality.

Here is a sample Xstartup script;

            #!/bin/sh
            #
            # Xstartup
            #
            # This program is run as root after the user is verified
            #
            if[- f /etc/nologin]; then
                     xmessage - file /etc/nologin
                     exit 1
            fi
            sessreg - a - 1 $DISPLAY - x /usr/X11R6/lib/xdm/Xservers $USER
            /usr/X11R6/lib/xdm/GiveConsole
            exit 0
SESSION PROGRAM
The Xsession program is the command which is run as the user's session. It is run with the permissions of the authorized user.

In addition to any specified by DisplayManager.exportList, the following environment variables are passed:

DISPLAY the associated display name
HOME the initial working directory of the user
USER the user name
PATH the value of DisplayManager.DlSPLAY.userPath
SHELL the user's default shell (from getpwnam)
XAUTHORITY may be set to a non-standard authority file
KRB5CCNAME may be set to a Kerberos credentials cache file
 
At most installations, Xsession should look in $HOME for a file .xsession, which contains commands that each user would like to use as a session. Xsession should also implement a system default session if no user-specified session exists. See the section Typical Usage.

An argument may be passed to this program from the authentication widget using the 'set-session-argument' action. This can be used to select different styles of session. One good use of this feature is to allow the user to escape from the ordinary session when it fails. This allows users to repair their own .xsession if it fails, without requiring administrative intervention. The example following demonstrates this feature.

This example recognizes the special "failsafe" mode, specified in the translations in the Xresources file, to provide an escape from the ordinary session. It also requires that the .xsession file be executable so we don't have to guess what shell it wants to use.

             # !/bin/sh
             #
             # Xsession
             #
             # This is the program that is run as the client
             # for the display manager.
case $# in
             1)
                     case $1 in
                     failsafe)
                              exec xterm - geometry 8024- 0- 0
                              ;;
                     esac
             esac
             startup= $HOME/.xsession
             resources= $HOME/.Xresources
if [ - f "$startup" ]; then
                      exec "$startup"
             else
                      if [ - f "$resources" ]; then
                                 xrdb - load "$resources"
fi
                      twm &
                      xman - geometry + 10-10 &
                      exec xterm - geometry 8024+ 10+10 - ls
             fi


The user's .xsession file might look something like this example. Don't forget that the file must have execute permission.
             # ! /bin/csh
             # no - f in the previous line so .cshrc gets run to set $PATH
             twm &
             xrdb - merge "$HOME/.Xresources"
             emacs - geometry + 0+ 50 &
             xbiff- geometry - 430+ 5 &
             xterm - geometry - 0+ 50 -ls

Home

RESET PROGRAM
Symmetrical with Xstartup, the Xreset script is run after the user session has terminated. Run as root, it should contain commands that undo the effects of commands in Xstartup, removing entries from /etc/utmp or unmounting directories from file servers. The environment variables that were passed to Xstartup are also passed to Xreset.

A sample Xreset script:


# !/bin/sh
#
# Xreset
#
# This program is run as root after the session ends
#
sessreg - d - 1 $DISPLAY - x /usr/X11R6/lib/xdm/Xservers $USER
/usr/X11R6/lib/xdm/TakeConsole
exit 0

CONTROLLING THE SERVER
Xdm controls local servers using POSIX signals. SICHUP is expected to reset the server, closing all client connections and performing other cleanup duties. SIGTERM is expected to terminate the server. If these signals do not perform the expected actions, the resources DisplayManager.DISPLAY.resetSignal and DisplayManager.DISPLAY.termSignal can specify alternate signals.

To control remote terminals not using XDMCP, xdm searches the window hierarchy on the display and uses the protocol request KillClient in an attempt to clean up the terminal for the next session. This may not actually kill all of the clients, as only those which have created windows will be noticed. XDMCP provides a more sure mechanism; when xdm closes its initial connection, the session is over and the terminal is required to close all other connections.

CONTROLLING XDM
Xdm responds to two signals: SIGHUP and SIGTERM. When sent a SIGHUP, xdm rereads the configuration file, the access control file, and the servers file. For the servers file, it notices if entries have been added or removed. If a new entry has been added, xdm starts a session on the associated display. Entries which have been removed are disabled immediately, meaning that any session in progress will be terminated without notice and no new session will be started.

When sent a SIGTERM, xdm terminates all sessions in progress and exits. This can be used when shutting down the system.

Xdm attempts to mark its various sub-processes for ps(1) by editing the command line argument list in place. Because xdm can't allocate additional space for this task; it is useful to start xdm with a reasonably long command line (using the full path name should be enough). Each process which is servicing a display is marked - display.

OTHER POSSIBILITIES
You can use xdm to run a single session at a time, using the 4.3 init options or other suitable daemon by specifying the server on the command line:

xdm - server ":0 SUN-3/60CG4 local /usr/X11R6/bin/X :0"

Or, you might have a file server and a collection of X terminals. The configuration for this is identical to the sample above, except the Xservers file would look like

extol:0 VISUAL-19 foreign

exalt:0 NCD-19 foreign

explode:0 NCR -TOWER VIEW3000 foreign

This directs xdm to manage sessions on all three of these terminals. See the section Controlling Xdm for a description of using signals to enable and disable these terminals in a manner reminiscent of init(8) .

LlMITATIONS
One thing that xdm isn't very good at doing is coexisting with other window systems. To use multiple window systems on the same hardware, you'll probably be more interested in xinit.

FILES
usr/lib/X11/xdm/xdm-config
the default configuration file

$HOME/.Xauthority user authorization file where xdm stores keys for clients to read

< XRoot> /1ib/X11/xdm/chooser
the default chooser

< XRoot> /bin/X11/xrdb
the default resource database loader

< XRoot> /bin/X11/X the default server

< XRoot> /bin/X11/xterm
the default session program and failsafe client

< XRoot> /lib/X11/xdm/A < display > - < suffix>
the default place for authorization files

/tmp/K5C< display> Kerberos credentials cache

Note: < XRoot> refers to the root of the X11 install tree.

SEE ALSO
X (1),xinit (1),xauth (1),Xsecurity (1),sessreg (1),Xserver (1),
X Display Manager Control Protocol

AUTHOR
Keith Packard, MIT X Consortium

Home

NAME
xdpyinfo - display information utility for X
 

SYNOPSIS
xdpyinfo [- display displayname] [- queryExtensions]
 

DESCRIPTION
Xdpyinfo is a utility for displaying information about an X server. It is used to examine the capabilities of a server, the predefined values for various parameters used in communicating between clients and the server, and the different types of screens and visuals that are available.

By default, numeric information (opcode, base event, base error) about protocol extensions is not displayed. This information can be obtained with the - queryExtensions option. Use of this option on servers that dynamically load extensions will likely cause all possible extensions to be loaded, which can be slow and can consume significant server resources.
 
ENVIRONMENT
DISPLAY
To get the default host, display number, and screen.

SEE ALSO
X(1), xwininfo(1), xprop(1), xrdb(1)

AUTHOR
Jim Fulton, MIT X Consortium

Home

NAME
xedit - simple text editor for X

SYNOPSIS
xedit [ -toolkitoption . . . ] [filename ]

DESCRIPTION
Xedit provides a window consisting of the following four areas:
Commands Section A set of commands that allow you to exit xedit, save the file, or load a new file into the edit window.
Message Window Displays xedit messages. In addition, this window can be used as a scratch pad.
Filename Display Displays the name of the file currently being edited, and whether this file is Read-Write or Read Only.
Edit Window Displays the text of the file that you are editing or creating.

OPTIONS

Xedit

accepts all of the standard X Toolkit command line options (see X(1)). The order of the command line options is not important.

filename
Specifies the file that is to be loaded during start-up. This is the file which will be edited. If a file is not specified, xedit lets you load a file or create a new file after it has started up.

EDITING
The Athena Text widget is used for the three sections of this application that allow text input. The characters typed will go to the Text widget that the pointer cursor is currently over. If the pointer cursor is not over a text widget then the keypresses will have no effect on the application. This is also true for the special key sequences that popup dialog widgets, so typing Control-S in the filename widget will enable searching in that widget, not the edit widget.

Both the message window and the edit window will create a scrollbar if the text to display is too large to fit in that window. Horizontal scrolling is not allowed by default, but can be turned on through the Text widget's resources, see the Athena Widget Set - C Language Interface in SUPER-UX X Toolkit Programming Manual for the exact resource definition.

The following keystroke combinations are defined:

Ctrl-a Beginning Of Line Meta-b Backward Word
Ctrl-b Backward Character Meta-f Forward Word
Ctrl-d Delete Next Character Meta-i Insert File
Ctrl-e End Of Line Meta-k Kill To End Of Paragraph
Ctrl-f Forward Character Meta-q Form Paragraph
Ctrl-g Multiply Reset Meta-v Previous Page
Ctrl-h Delete Previous Character Meta-y Insert Current Selection
Ctrl-j Newline And Indent Meta-z Scroll One Line Down
Ctrl-k Kill To End Of Line Meta-d Delete Next Word
Ctrl-l Redraw Display Meta-D Kill Word
Ctrl-m Newline Meta-h Delete Previous Word
Ctrl-n Next Line Meta-H Backward Kill Word
Ctrl-o Newline And Backup Meta-< Beginning Of File
Ctrl-p Previous Line Meta-> End Of File
Ctrl-r Search/Replace Backward Meta-] Forward Paragraph
Ctrl-s Search/Replace Forward Meta-[ Backward Paragraph
Ctrl-t Transpose Characters
Ctrl-u Multiply by 4 Meta-Delete Delete Previous Word
Ctrl-v Next Page Meta-Shift Delete Kill Previous Word
Ctrl-w Kill Selection Meta-Backspace Delete Previous Word
Ctrl-y Unkill Meta-Shift Backspace Kill Previous Word
Ctrl-z Scroll One Line Up

In addition, the pointer may be used to cut and paste text:

Button 1 Down Start Selection
Button 1 Motion Adjust Selection
Button 1 Up End Selection (cut)
Button 2 Down Insert Current Selection (paste)
Button 3 Down Extend Current Selection
Button 3 Motion Adjust Selection
Button 3 Up End Selection (cut)

Home

COMMANDS

RESOURCES

For xedit the available resources are:

enableBackups (Class EnableBackups)

backupNamePrefix (Class BackupNamePrefix)

backupNameSuffix (Class BackupNameSuffix)

WIDGETS

In order to specify resources, it is useful to know the hierarchy of the widgets which compose xedit. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.

Xedit xedit

Paned buttons

Label bc_label
Text messageWindow
Label labelWindow
Text editWindow

ENVIRONMENT
DISPLAY to get the default host and display number.
XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.

FILES
< XRoot> /lib/X11/app-defaults/Xedit

specifies required resources

SEE ALSO
X(1), xrdb(1), Athena Widget Set - C Language Interface in the SUPER-UX X Toolkit Programming Manual

RESTRICTIONS
There is no undo function.

COPYRIGHT
Copyright 1988, Digital Equipment Corporation.
Copyright 1989, X Consortium
See X(1) for a full statement of rights and permissions.

AUTHOR
Chris D. Peterson, MIT X Consortium

Home

NAME

SYNOPSIS

DESCRIPTION

OPTIONS

SEE ALSO

AUTHOR

Home

NAME

SYNOPSIS

DESCRIPTION

OPTIONS

Home

WIDGETS

FONTGRID RESOURCES

APPLICATION SPECIFIC RESOURCES

SEE ALSO
X(1), xlsfonts(1), xrdb(1), xfontsel(1), X Logical Font Descriplion Conventions

BUGS
The program should skip over pages full of non-existent characters.

AUTHOR
Jim Fulton, MIT X Consortium; previous program of the same name by Mark Lillibridge, MIT Project Athena .

Home

NAME
xfontset - point & click interface for selecting X11 font names

SYNOPSIS
xfontsel [-toolkitoption ...] [-pattern fontname] [-print] [-sample text] [-samplel1 text16] [ noscaled]

DESCRIPTION
The xfontsel application provides a simple way to display the fonts known to your X server, examine samples of each, and retrieve the X Logical Font Description ("XLFD") full name for a font.

If -pattern is not specified, all fonts with XLFD 14-part names will be selectable. To work with only a subset of the fonts, specify -pattern followed by a partially or fully qualified font name; e.g., "-pattern *medium*" will select that subset of fonts which contain the string "medium" somewhere in their font name. Be careful about escaping wildcard characters in your shell.

If -print is specified on the command line the selected font specifier will be written to standard output when the quit button is activated. Regardless of whether or not -print was specified, the font specifier may be made the PRIMARY (text) selection by activating the select button.

The -sample option specifies the sample text to be used to display the selected font if the font is linearly indexed, overriding the default.

The -sample16 option specifies the sample text to be used to display the selected font if the font is matrix encoded, overriding the default.

The -noscaled option disables the ability to select scaled fonts at arbitrary pixel or point sizes. This makes it clear which bitmap sizes are advertised by the server, and can avoid an accidental and sometimes prolonged wait for a font to be scaled.

INTERACTIONS
Clicking any pointer button in one of the XLFD field names will pop up a menu of the currently-known possibilities for that field. If previous choices of other fields were made, only values for fonts which matched the previously selected fields will be selectable; to make other values selectable, you must deselect some other field(s) by choosing the "*" entry in that field. Unselectable values may be omitted from the menu entirely as a configuration option; see the ShowUnselectable resource, below. Whenever any change is made to a field value, xfontsel will assert ownership of the PRIMARY_FONT selection. Other applications (see, e.g., xterm) may then retrieve the selected font specification.

Scalable fonts come back from the server with zero for the pixel size, point size, and average width fields. Selecting a font name with a zero in these positions results in an implementation-dependent size. Any pixel or point size can be selected to scale the font to a particular size. Any average width can be selected to anamorphically scale the font (although you may find this challenging given the size of the average width menu).

Clicking the left pointer button in the select widget will cause the currently selected font name to become the PRIMARY text selection as well as the PRIMARY_FONT selection. This then allows you to paste the string into other applications. The select button remains highlighted to remind you of this fact, and de-highlights when some other application takes the PRIMARY selection away. The select widget is a toggle; pressing it when it is highlighted will cause xfontsel to release the selection ownership and de-highlight the widget. Activating the select widget twice is the only way to cause xfontsel to release the PRIMARY_FONT selection.

Home

RESOURCES
The application class is XFontSel. Most of the user-interface is configured in the app-defaults file; if this file is missing a warning message will be printed to standard output and the resulting window will be nearly incomprehensible.

Most of the significant parts of the widget hierarchy are documented in the app-defaults file (normally < Xrooto> /lib/X11/app-defaults/XFontSel, where < XRoot> refers to the root of the X11 install tree.)

Application specific resources:

cursor (class Cursor)

Specifies the cursor for the application window.

pattern (class Pattern)

Specifies the font name pattern for selecting a subset of available fonts. Equivalent to the pattern option. Most useful patterns will contain at least one field delimiter; e.g. *-m-* for monospaced fonts.

plxelSizeList (class PixelSizeList)

Specifies a list of pixel sizes to add to the pixel size menu, so that scalable fonts can be selected at those pixel sizes. The default pixelSizeList contains 7, 30, 40, 50, and 60.

pointSizeList (class PointSizeList)

Specifies a list of point sizes (in units of tenths of points) to add to the point size menu, so that scalable fonts can be selected at those point sizes. The default pointSizeList contains 250, 300, 350, and 400.

printOnQuit (class PrintOnQuit)

If True the currently selected font name is printed to standard output when the quit button is activated. Equivalent to the -print option.

sampleText (class Text)

The sample 1-byte text to use for linearly indexed fonts. Each glyph index is a single byte, with newline separating lines.

sampleTextl6 (class Textl6)

The sample 2-byte text to use for matrix-encoded fonts. Each glyph index is two bytes, with a 1-byte newline separating lines.

scaledFons (class ScaledFonts)

If True then selection of arbitrary pixel and point sizes for scalable fonts is enabled.

Widget specific resources:

showUnselectable (class ShowUnselectable)

Specifies, for each field menu, whether or not to show values that are not currently selectable, based upon previous field selections. If shown, the unselectable values are clearly identified as such and do not highlight when the pointer is moved down the menu. The full name of this resource is fleldN.menu.options.showUnselectable, class MenuButton.SimpleMenu.Options.ShowUnselectable; where N is replaced with the field number (starting with the left-most field numbered 0). The default is True for all but field 11 (average width of characters in font) and False for field 11. If you never want to see unselectable entries, '*menu.options.showUnselectable:False' is a reasonable thing to specify in a resource file.

FlLES
$XFILESEARCHPATH/XFontSel

SEE ALSO
xrdb(1), xfd(1)

BUGS
Sufficiently ambiguous patterns can be misinterpreted and lead to an initial selection string which may not correspond to what the user intended and which may cause the initial sample text output to fail to match the proffered string. Selecting any new field value will correct the sample output, though possibly resulting in no matching font.

Should be able to return a FONT for the PRIMARY selection, not just a STRING.

Any change in a field value will cause xfontsel to assert ownership of the PRIMARY_FONT selection. Perhaps this should be parameterized.

When running on a slow machine, it is possible for the user to request a field menu before the font names have been completely parsed. An error message indicating a missing menu is printed to stderr but otherwise nothing bad (or good) happens.

The average-width menu is too large to be useful.

COPYRIGHT
Copyright 1989, 1991, X Consortium
See X(1) for a full statement of rights and permissions.

AUTHOR
Ralph R. Swick, Digital Equipment Corporation/MIT Project Athena

Home

Contents Previous Chapter Chapter 1 Cont. Next Chapter