McIDAS User's Guide
Version 2017.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


Configuring McIDAS-X Sessions with .mcidasrc

Once you have installed McIDAS-X and configured your accounts, you can run McIDAS-X. See Chapter 2 for information about starting, using and ending McIDAS-X sessions.

The first time you run McIDAS-X, the $HOME/.mcidasrc configuration file is created. This file stores flags that configure the McIDAS-X session to your preferences. This section contains descriptions of the flags and how to modify their values using a text editor. Nearly all of the flags can also be changed using the McIDAS-X Configuration GUI described in Starting McIDAS-X in Chapter 2.

The following tables list the flags for changing the Image, and Text and Command Windows settings. The flags can appear in any order in .mcidasrc. However, the file is organized in a manner you may want to follow. Default values, if present, are indicated in the tables or in the detailed descriptions that follow.

Image Window Flags Description
-autoResize automatically resizes the Image Window to the frame size
-displayVisualMode runs McIDAS-X using the visual mode set for the workstation display
-e amountk  -e amountm allocates a memory pool of amount kilobytes or megabytes for the MAKFRM command
-f framespec sets the number and size of frames
-graphicsColors number sets the number of graphics color levels (default = 16)
-igeometry xoffset+yoffset sets the location of the Image Window
-imageColors number sets the number of image display levels (default = 128)
-manualResize resizes the Image Window to the frame size only when you use the R command (default)
-optimizeForSpeed displays images as quickly as possible (default)
-optimizeForSpace allows the maximum number of frames for a given amount of memory, but displays images more slowly than -optimizeForSpeed

The table below lists the start-up flags for specifying the Text and Command Window setup. See the following sections for more information.

Text and Command Window Flags Description
-c 'command' runs a specified command at startup
-cd directory sets the working directory for the McIDAS-X session
-display workstation:0 specifies the workstation for displaying the McIDAS-X session
-font 'font' sets the font used in the Text and Command Window
-fontListHead 'fonts' specifies the fonts for the beginning of the font list for the Text and Command Window
-fontListTail 'fonts' specifies the fonts for the end of the font list for the Text and Command Window
-ih number sets the number of commands to store in the recall buffer and file MCCMDHIST.TXT (default=100)
-oh number sets the maximum number of output lines in each text frame (default=1000)
-tcolbg value 'color' sets colors for the background attributes in the McIDAS Text and Command Window
-tcolfg value 'color' sets colors for the foreground attributes in the McIDAS Text and Command Window
-tgeometry widthxheight+xoffset+yoffset sets the size and location of the McIDAS Text and Command Window

The following sections provide more information about changing your McIDAS setup using the start-up flags listed above:

Setting the Number of Frames

Use the -f framespec flag to set the number and size of the frames for your McIDAS-X session. You can use the following formats for framespec.

Format Description
number creates a specified number of 480x640 frames
linesxelements creates a frame of specific size
number@linesxelements creates a number of frames of a specific size

By default, the .mcidasrc file contains the line -f 10, meaning that McIDAS-X sessions start with ten frames that are 480 lines by 640 elements. You can add additional sets of frames of different sizes. For example, if you add the line -f 4@512x512 -f 4@1024x1280, sessions will have 18 frames: four 512 by 512 frames; four 1024 by 1280 frames, and ten 480 by 640 default frames.

The order of the framespec options determines the frame numbers. The frames are numbered starting with 1. For example, if you start your session with -f 6 -f 512x512 -f 512x512 -f 2@1024x1280, your session has 20 frames with the following numbers and sizes.

You can remove the default by commenting out the line -f 10 in your .mcidasrc file.

Allocating Additional Frame Memory

Use the -e count option to allocate a memory pool for creating additional frames with the MAKFRM command. See the Image Window section and the Adding Frames section in Chapter 2 for more information.

The default size of the -e memory pool is 0 bytes. Use a k to specify the number of bytes as kilobytes or an m to specify the memory in megabytes. For example, to allocate a 5 MB memory pool for MAKFRM, use the flag -e 5m. The amount of memory required to add a new frame is slightly more than the number of lines times the number of elements. The figure is slightly higher because additional memory is required for enhancements, stretch tables, graphics tables, etc.

Running Commands at Startup

You can specify commands to run automatically at startup using the-c 'command' flag. Specify this flag at startup or in your .mcidasrc file as many times as needed to run any set of commands. Each -c command flag is run asynchronously from all other -c flags. To run certain commands in a sequence, specify them all in one -c flag. For example, the command -c 'ECHO{HELLO};ECHO "THERE ' runs two ECHO commands in the sequence they are entered.

To run the commands from the Unix shell, prefix the command with an exclamation point (!). See the exclamation point (!) command in Chapter 3 for more information. If you do not want the command output displayed in the Text and Command Window, add an at symbol (@) after the exclamation point (!).

Setting the Text Fonts

The -font option sets the font that the Text and Command Window automatically uses. The fonts are listed by pixel size and the default font is 9x15 bold. You can specify a list of fonts for the Text and Command Window using the -fontListHead 'fonts' and -fontListTail 'fonts' flags. Once you set the fonts with these flags, you can change the font used in the Text and Command Window using the Alt < and Alt > keys.

You can specify multiple fonts for the -fontListHead and -fontListTail flags, but separate them with commas, for example, -fontListHead '5x8,6x9,6x13bold'. The .mcidasrc file lists some sample fonts.

Setting the Command and Output Recall

The -ih number flag sets the number of commands that you can recall via the ampersand (&) and caret (^) keys in the McIDAS Text and Command Window, and via the Command History GUI under the main GUI window's List menu. The default is 100. You can also access the commands, which are stored in the file MCCMDHIST.TXT, via the SEE command or a text editor for cutting and pasting.

The -oh number flag sets the number of output lines to store in each text frame in the McIDAS Text and Command Window. The default is 1000. Use the Page Up, Page Down and arrow keys or the McIDAS-X command TFIND to scroll the output lines.

Setting the Workstation Display

The -display workstation:0 flag sets the workstation display for the McIDAS-X session. Typically, you will not have to set this at startup because it is in your .profile file. This flag is useful for displaying the McIDAS-X session on a workstation not listed in your .profile.

Setting the Working Directory

The -cd directory flag sets the working directory for the McIDAS-X session. Therefore, Unix commands that are run from the Text and Command Window (e.g., !ls -l AREA* or OS "pwd) will use it as the current directory and thus give the same output that they would if run at a Unix prompt while in that directory. If this flag is not set, the working directory is set to the directory in which McIDAS-X was started.

Setting the Configuration GUI Option

The -config flag makes the McIDAS-X Configuration GUI appear each time you start a McIDAS-X session. The Configuration GUI, which can also be started by running the command mcidas -config at the Unix prompt, contains sliders, checkboxes and text fields that let you override the settings of the corresponding flags in .mcidasrc. It makes one-time (for the current session only) configuration changes easier and less error-prone. It also contains an option to save its settings in .mcidasrc. See Starting McIDAS-X in Chapter 2 for more information about the Configuration GUI.

Setting the McIDAS Text and Command Window Options

You can specify the following start-up options for the McIDAS Text and Command Window.

To specify the size and location of the McIDAS Text and Command Window use the -tgeometry widthxheight+xoffset+yoffset flag, where width and height are the width and height of the window in characters, and xoffset and yoffset are the distance in pixels from the left edge and top edge of the screen, respectively. For example, to create a Text and Command Window that is 85 characters by 26 characters and is located 300 pixels in from the left edge and 400 pixels below the top edge of the screen, enter the flag -tgeometry 85x26+300+400.

You can specify colors to use for the Text and Command Window borders, backgrounds, command text, error messages, etc. To change the display, use the -tcolfg value'color' and -tcolbg value'color' flags. The -tcolbg flag sets colors for the background attributes in the McIDAS Text and Command Window and -tcolfg sets the attributes for the foreground. Typically, the foreground attributes are text and the background attributes are window backgrounds.

The table below lists the values for several McIDAS Text and Command Window attributes. The value specifies the attribute to change. The colors shown in the Default Color column are the initial .mcidasrc file defaults. For example, to change the color of error messages to yellow, use the flag -tcolfg14 'yellow'. The .mcidasrc file provides a complete list of the attributes that you can change and their corresponding values.

Window Attribute Value Default Color
local text 7 white
echoed commands 10 green
command editor 11 cyan
communications status messages 13 magenta
error messages 14 yellow
line continuation marks 96 yellow

Setting the McIDAS Image Window Options

You can specify the following start-up options for the Image Window.

To set the location of the McIDAS Image Window, use the -igeometry xoffset+yoffset flag, where xoffset and yoffset are the distance in pixels from the left edge and top edge of the screen, respectively. For example, to start a session with the Image Window placed 100 pixels in from the left edge and 200 pixels below the top edge of the screen, use the flag -igeometry +100+200.

The -manualResize flag is the default resize flag. This flag requires you to use the R command to resize the Image Window to the size of the displayed frame. To automatically resize the Image Window to the size of the frame, specify the -autoResize flag.

Use the -graphicsColors number option to change the number of graphics color levels available. The default number of graphics color levels is 16; the maximum is 128. Use the -imageColors number option to change the number of image display levels available. The default number of image display levels is 128; the maximum is 253 or 254, depending on your hardware. The more image display levels you specify, the less graphics color levels there are available and vice versa.

The -optimizeForSpeed and -optimizeForSpace options change the amount of memory used for displaying images and loops. The -optimizeForSpeed option, which is the default, displays images as quickly as possible. This option requires a large amount of memory. The -optimizeForSpace option displays images using a minimum amount of memory. This option greatly slows looping, but it more than doubles the amount of frames that can be created for a given amount of memory. Because the looping is slow, you can only use this option if you are running a local McIDAS-X session on your workstation.

The -displayVisualMode option forces McIDAS-X to run in the visual mode set for the workstation display, e.g., TrueColor, StaticColor, etc. The default (when this flag is not set) is to run McIDAS-X in the 8-bit PseudoColor mode. Set this flag only if your display does not support the 8-bit PseudoColor mode, as setting it may significantly slowdown commands that write image or graphic output.

Using the MCIDASRC Environment Variable

The MCIDASRC environment variable lets you store and use multiple versions of the .mcidasrc session configuration file. Using the MCIDASRC environment variable is most beneficial to users who often change session configurations or those who have several users that run McIDAS-X from the same account. In cases like these, you simply create a different configuration file for each user and/or purpose, then use MCIDASRC to select the desired file for a given McIDAS-X session. Maintaining multiple configuration files like this is easier and less error-prone than constantly changing your .mcidasrc file.

For example, if you have configuration files named .mcidasrc, .mcidasrc_jeff, .mcidasrc_mary, .mcidasrc_sue and .mcidasrc_tom in in your /home/team1/ directory, enter the following Unix commands (substitute the equivalent if using C shell) to start a McIDAS-X session using the specified configuration file (e.g., .mcidasrc_jeff or .mcidasrc_mary).

Type:  export MCIDASRC; MCIDASRC=/home/team1/ filename

Type:  mcidas


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]