Page: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
STARTUP PROGRAM
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
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 |
# !/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
# ! /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 |
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
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.
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.
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) .
$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.
Home |
Home |
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. |
Xedit
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 theAthena Widget Set - C Language Interface 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
Quit
Save
Load
RESOURCES
enableBackups (Class EnableBackups)
backupNamePrefix (Class BackupNamePrefix)
backupNameSuffix (Class BackupNameSuffix)
WIDGETS
Xedit xedit
Paned paned
Paned buttons
Command quit
Command save
Command load
Text filename
Label bc_label
Text messageWindow
Label labelWindow
Text editWindow
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. |
specifies required resources
Home |
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
This option specifies the X server to contact.
- geometry geom
This option specifies the size and/or location of the window.
- bw pixels
This option specifies the border width for the window.
- bs {NotUseful,WhenMapped,Always}
This option specifies what kind of backing store to give the window. the default is NotUseful.
- id windowid
This option specifies that the window with the given id should be monitored, instead of creating a new window.
- s
This option specifies that save-unders should be enabled on the window.
- name string
This option specifies the name to assign to the created window.
- rv
This option specifies that the window should be in reverse video.
SEE ALSO
AUTHOR
Home |
NAME
SYNOPSIS
DESCRIPTION
The characters are displayed in a grid of boxes, each large enough to hold any single character in the font. Each character glyph is drawn using the PolyTextl6 request (used by the Xlib routine XDrawString16). If the - box option is given, a rectangle will be drawn around each character, showing where an ImageTextl6 request (used by the Xlib routine XDrawImageStringl6) would cause background color to be displayed.
The origin of each glyph is normally set so that the character is drawn in the upper left hand corner of the grid cell. However, if a glyph has a negative left bearing or an unusually large ascent, descent, or right bearing (as is the case with cursor font), some character may not appear in their own grid cells. The - center option may be used to force all glyphs to be centered in their respective cells.
All the characters in the font may not fit in the window at once. To see the next page of glyphs, press the Next button at the top of the window. To see the previous page, press Prev. To exit xfd, press Quit.
Individual character metrics (index, width, bearings, ascent and descent) can be displayed at the top of the window by clicking on the desired character.
The font name displayed at the top of the window is the full name of the font, as determined by the server. See xlsfonts for ways to generate lists of fonts, as well as more detailed summaries of their metrics and properties.
OPTIONS
- fn font
This option specifies the font to be displayed. This can also be set with the FontGrid font resource. A font must be specified.
- box
This option indicates that a box should be displayed outlining the area that would be filled with background color by an ImageText request. This can also be set with the FontGrid boxChars resource. The default is False.
- center
This option indicates that each glyph should be centered in its grid. This can also be set with the FontGrid centerChars resource. The default is False.
- start number
This option specifies the glyph index of the upper left hand corner of the grid. This is used to view characters at arbitrary locations in the font. This can also be set with the FontGrid startChar resource. The default is 0.
- bc color
This option specifies the color to be used if ImageText boxes are drawn. This can also be set with the FontGrid boxColor resource.
- rows numrows
This option specifies the number of rows in the grid. This can also be set with the FontGrid cellRows resource.
- columns numcols
This option specifies the number of columns in the grid. This can also be set with the FontGrid cellColumnsresource.
Home |
WIDGETS
Xfd xfd
Paned pane
Label fontname
Box box
Command quit
Command prev
Command next
Label metrics
Label range
Label start
Form form
FontGrid grid
FONTGRID RESOURCES
APPLICATION SPECIFIC RESOURCES
selectFormat
Specifies a printf-style format string used to display information about the selected character.
The default is "character 0x%02x%02x (%u,%u) (%# o,%# o)". The arguments that will come after the format string are char.byte1, char.byte2, char.byte1, char.byte2, char.byte1, char.byte2. char.byte1 is byte 1 of the selected character. char.byte2 is byte 2 of the selected character.
metricsFormat
Specifies a printf-style format string used to display character metrics. The default is "width %d; left %d, right %d; ascent %d, descent %d (font %d, %d)". The arguments that will come after the format string are the character metrics width, lbearing, rbearing, character ascent, character descent, font ascent, and font descent.
rangeFormat
Specifies a printf-style format string used to display the range of characters currently being displayed. The default is "range: 0x%02x%02x (%u,%u) thru 0x%02x%02x (%u,%u)". The arguments that will come after the format string are the following fields from the XFontStruct that is returned from opening the font: min_byte1, min_char_or_byte2, min_byte1, min_char_or_byte2, max_byte1, max_char_or_byte2, max_byte1, max_char_or_byte2.
startFormat
Specifies a printf-style format string used to display information about the character at the upper left corner of the font grid. The default is "upper left: 0x%04x (%d,%d)". The arguments that will come after the format string are the new character, the high byte of the new character, and the low byte of the new character.
nocharFormat
Specifies a printf-style format string to display when the selected character does not exist. The default is "no such character 0x%02x%02x (%u,%u) (%#o,%#o)". The arguments that will come after the format string are the same as for the selectFormat resource.
Home |
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.
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 |
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.
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.
Home |
Contents | Previous Chapter | Chapter 1 Cont. | Next Chapter |