SUNVIEW(1)

NAME
sunview - the SunView window environment

SYNOPSIS
sunview [ -i ] [ -p ] [ -B|-F|-P ] [ -S ] [ -8bit_color_only ] [ -overlay_only ] [ -toggle_enable ] [ -b red green blue ] [ -d display-device ] [ -f red green blue ] [ -k keyboard-device ] [ -m mouse-device ] [ -n|-s startup-filename ] [ -background raster-filename ] [ -pattern on| off| gray| iconedit-filename ]

DESCRIPTION

sunview starts up the SunView environment and (unless you have specified otherwise) a default layout of a few useful “tools,” or window-based applications.

See Start-up Processing below to learn how to specify your own initial layout of tools. Some of the behavior of sunview is controlled by settings in your defaults database; see SunView Defaults below, and defaultsedit(1) for more information.

To exit sunview use the Exit SunView menu item. In an emergency, type CTRL-D then CTRL-Q (there is no confirmation in this case).

OPTIONS

-i  Invert the background and foreground colors used on the screen. On a monochrome monitor, this option provides a video reversed image. On a color monitor, colors that are not used as the background and foreground are not affected.

-p  Print to the standard output the name of the window device used for the sunview background.

-B  Use the “background color” ( -b ) for the background.

-F  Use the “foreground color” ( -f ) for the background.

-P  Use a stipple pattern for the background. This option is assumed unless -F or -B is specified.

-S  Set Click-to-type mode, allowing you to select a window by clicking in it. Having done so, input is directed to that window regardless of the position of the pointer, until you click to select some other window.

-8bit_color_only
    For multiple plane group frame buffers, only let windows be created in the 8 bit color plane group. This frees up the black and white overlay plane to have a separate desktop running on it. This option is usually used with the -toggle_enable option. See Multiple Desktops on the Same Screen, below.

-overlay_only
    For multiple plane group frame buffers, only let windows be created in the black and white overlay plane group. This frees up the 8 bit color plane group to have a separate desktop running in it. This option is usually used with the -toggle_enable option. See Multiple Desktops on the Same Screen, below.

-toggle_enable
    For multiple plane group frame buffers, when sliding the pointer between different desktops running within different plane groups on the same screen, change the enable plane to allow viewing of the destination desktop. See Multiple Desktops on the Same Screen, below.

-b red green blue
    Specify values for the red, green and blue components of the background color. If this option is not specified, each component of the background color is 255 (white). Sun 3/110 system users that use this option should use the -8bit_color_only option as well.

-d display-device
    Use display-device as the output device, rather than /dev/fb the default frame buffer device.

-f red green blue
    Specify values for the red, green and blue components of the foreground color. If this option is not specified, each component of the foreground color is 0 (black). Sun 3/110 system users that use this option should use the -8bit_color_only option as well.

-k keyboard-device
    Accept keyboard input from keyboard-device, rather than /dev/kbd, the default keyboard device.

-m mouse-device
    Use mouse-device as the system pointing device (locator), rather than /dev/mouse, the default mouse device.

-n  Bypass startup processing by ignoring the /usr/lib/.sunview and ~/.sunview (and ~/.suntools) files.

-s startup-filename
    Read startup commands from startup-filename instead of /usr/lib/.sunview or ~/.sunview).

-background raster-filename
    Use the indicated raster file as the image in your background. The raster file can be created with screendump(1). Screen dumps produced on color monitors currently do not work as input to this option. Small images are centered on the screen.

-pattern on| off| gray| iconedit-filename
Use the indicated “pattern” to cover the background. on means to use the default desktop gray pattern. off means to not use the default desktop gray pattern. gray means to use a 50% gray color on color monitors. iconedit-filename is the name of a file produced with iconedit(1) which contains an image that is to be replicated over the background.

USAGE

  Windows

The SunView environment always has one window open, referred to as the background, which covers the whole screen. A solid color or pattern is its only content. Each application is given its own window which lies on top of some of the background (and possibly on top of other applications). A window obscures any part of another window which lies below it.

  Input to Windows

Mouse input is always directed to the window that the pointer is in at the time. Keyboard input can follow mouse input or, it can remain within a designated window using the Click-to-Type default setting. If you are not using Click-to-Type, and the pointer is on the background, keyboard input is discarded. Input actions (mouse motions, button clicks, and keystrokes) are synchronized, which means that you can “type-ahead” and “mouse-ahead,” even across windows.

  Mouse Buttons

LEFT mouse button
    Click to select or choose objects.

MIDDLE mouse button
    In text, click once to shorten or lengthen your selection. In graphic applications or on the desktop, press and hold to move objects.

RIGHT mouse button
    Press and hold down to invoke menus.

  Menus

sunview provides pop-up menus. There are two styles of pop-up menus: an early style, called “stacking menus,” and a newer style, called “walking menus” (also known as “pull-right menus”). In the current release, walking menus are the default; stacking menus are still available as a defaults option.

Usually, a menu is invoked by pressing and holding the RIGHT mouse button. The menu remains on the screen as long as you hold the RIGHT mouse button down. To choose a menu item, move the pointer onto it (it is then highlighted), then release the RIGHT mouse button.

Another available option is “stay-up menus.” A stay-up menu is invoked by pressing and releasing the RIGHT mouse button. The menu appears on the screen after you release the RIGHT mouse button. To choose a menu item, move the pointer onto it (it is then highlighted), then press and release the RIGHT mouse button a second time. Stay-up menus are an option in your defaults database; see SunView Defaults below.

With walking menus, any menu item can have an arrow pointing (☞) to the right. Moving the pointer onto this arrow pops up a “sub-menu,” with additional items. Choosing the item with an arrow (the “pull-right item”) invokes the first item on the sub-menu.

  The SunView Menu

You can use the default SunView menu to start SunView applications and perform some useful functions. To invoke it, hold down the RIGHT mouse button when the pointer is anywhere in the background.

The default SunView menu is defined in the file /usr/lib/.rootmenu. It consists of four sub-menus, labeled Shells, Editors, Tools, and Services, along with items for Remote Login, Redisplay All, Lock Screen and Exit Sunview. These sub-menus contain the following items:

    Shells

        Shell Tool
            Bring up a shelltool(1), an tty-based terminal emulator that supports a shell.

        Command Tool
            Bring up a cmdtool(1), a scrollable window-based terminal emulator that supports a shell.

        Graphics Tool
            Bring up a gfxtool(1), for running graphics programs.

        Console
            Bring up a Console window, a cmdtool with the -C flag, to act as the system console. Since many system messages can be directed to the console, there should always be a console window on the screen.

    Remote Login
        This will create a terminal emulator that prompts for a machine name and then starts a shell on that machine.

    Editors

        Text Editor
            Bring up a textedit(1), for reading and editing text files.

        Defaults Editor
            Bring up a defaultsedit(1), for browsing or changing your defaults settings.

        Icon Editor
            Bring up a new iconedit(1).

        Font Editor
            Bring up a fontedit(1).

    Tools

        Mail Tool
            Bring up a mailtool(1), for reading and sending mail.

        Dbx (Debug) Tool
            Bring up a dbxtool(1), a window-based source debugger.

        Performance Meter
            Bring up a perfmeter(1) to monitor system performance.

        Clock
            Bring up a new clock(1).

    Services

        Eject
            There are two items on this submenu, "cdrom" and "floppy". Use this to eject cdrom or floppy media from the drive.

        Printing
            There are two items on this submenu, Check Printer Queue and Print Selected Text. Check Printer Queue displays the printer queue in your console; Print Selected Text sends selected text to the standard printer.

        Save Layout
            Writes out a ~/.sunview file that sunview can then use when starting up again. An existing ~/.sunview file is saved as ~/.sunview-.

    Redisplay All
        Redraw the entire screen. Use this to repair damage done by processes that wrote to the screen without consulting the SunView system.

    Lock Screen
        Completely covers the screen with a graphics display, and “locks” the workstation until you type your password. When you “unlock” the workstation, the screen is restored as it was when you locked it. See lockscreen(1) for details.

    Exit SunView
        Exit from sunview, including all windows, and kill processes associated with them. You return to the shell from which you started sunview.

You can specify your own SunView menu; see SunView Defaults below for details.

  The Frame Menu

A small set of universal functions are available through the Frame menu. There are also accelerators for some of these functions, described under Frame Menu Accelerators, below.

You can invoke the Frame menu when the cursor is over a part of the application that does not provide an application-specific menu, such as the frame header (broad stripe holding the application's name), the border stripes of the window, and the icon.

Close
Open
    Toggle the application between closed (iconic) and open state. Icons are placed on the screen according to the icon policy in your defaults database; see SunView Defaults below. When a window is closed, its underlying processes continue to run.

Move
    Moves the application window to another spot on the screen. Move has a sub-menu with two items: Unconstrained and Constrained.

    Unconstrained
        Move the window both horizontally and vertically.

    Constrained
        Moves are either vertical or horizontal, but not both.

        Choosing Move invokes an Unconstrained move.

Resize
    Shrink or stretch the size of a window on the screen. Resize has a sub-menu containing:

    Unconstrained
        Resize the window both horizontally and vertically.

    Constrained
        Resize vertically or horizontally, but not both.

        Choosing Resize invokes an Unconstrained resize.

    UnZoom

    Zoom
        Zoom expands a window vertically to the full height of the screen. UnZoom undoes this.

    FullScreen
        Make a window the full height and width of the screen.

Front
    Bring the window to “the top of the pile.” The whole window becomes visible, and hides any window it happens to overlap on the screen.

Back
    Put the window on the “bottom of the pile”. The window is hidden by any window which overlaps it.

Props
    Display the property sheet. (Only active for applications that provide a property sheet.)

Redisplay
    Redraw the contents of the window.

Quit
    Notify the application to terminate gracefully. Requires confirmation.

  Frame Menu Accelerators

Accelerators are provided for some Frame menu functions. You can invoke these functions by pushing a single button in the window's frame header or outer border. See the SunView Beginner's Guide for more details.

Open
    Click the LEFT mouse button when the pointer is over the icon.

Move
    Press and hold the MIDDLE mouse button while the pointer is in the frame header or outer border. A bounding box that tracks the mouse is displayed while you hold the button down. When you release the button, the window is redisplayed within the bounding box. If the pointer is near a corner, the move is Unconstrained. If it is in the center third of an edge, the move is Constrained.

Resize
    Hold the CTRL key and press and hold the MIDDLE mouse button while the pointer is in the frame header or outer border. A bounding box is displayed, and one side or corner tracks the mouse. If the pointer is near a corner when you press the mouse button, the resize is Unconstrained; if in the middle third of an edge, the resize is Constrained.

Zoom
UnZoom
    Hold the CTRL key and click the LEFT mouse button while the pointer is in the frame header or outer border.

Front
    Click the LEFT mouse button while the pointer is on the frame header or outer border.

Back
    Hold the SHIFT key and click the LEFT mouse button while the pointer is on the frame header or outer border.

In addition, you can use two function keys as even faster accelerators. To expose a window that is partially hidden, press the Front function key (normally L5) while the pointer is anywhere in that window. Or, if the window is completely exposed, use the Front key to hide it. Similarly, to close an open window, press the Open key (normally L7) while the pointer is anywhere in that window. If the window is iconic, use the Open key to open it.

In applications with multiple windows, you can often adjust the border between two windows up or down, without changing the overall size of the application: hold the CTRL key, press the MIDDLE mouse button over the boundary between the two windows, and adjust the size of the (bounded) subwindow as with Resize.

  Startup Processing: The .sunview File

Unless you override it, sunview starts up with a predefined layout of windows. The default layout is specified in the file /usr/lib/.sunview. If there is a file called .sunview in your home directory, it is used instead. For compatibility with earlier releases, if there is no .sunview file in your home directory, but a .suntools file instead, the latter file is used.

  SunView Defaults

SunView allows you to customize the behavior of applications and packages by setting options in a defaults database (one for each user). Use defaultsedit(1) to browse and edit your defaults database. Select the “SunView” category to see the following items (and some others):

Walking_menus
    If enabled, the SunView menu, the Frame menu, and many applications will use walking menus. Applications that have not been converted will still use stacking menus. If disabled, applications will use stacking menus. The default value is “Enabled.”

Click_to_Type
    If enabled, keyboard input will stay in a window until you click the LEFT or MIDDLE mouse button in another window. If disabled, keyboard input will follow the mouse. The default value is “Disabled.”

Font
    You can change the SunView default font by giving the full pathname of the font you want to use. Some alternate fonts are in the directory /usr/lib/fonts/fixedwidthfonts. The default font from the SunOS 2.0 release was /usr/lib/fonts/fixedwidthfonts/screen.r.13. The default value is null, which has the same effect as specifying /usr/lib/fonts/fixedwidthfonts/screen.r.11.

Rootmenu_filename
    You can change the SunView menu by giving the full pathname of a file that specifies your own menu. See The SunView Menu File below for details. The default value is null, which gives you the menu found in /usr/lib/.rootmenu.

Icon_gravity
    Determine which edge of the screen (“North”, “South”, “East”, or “West”) icons will place themselves against. The default value is “North.”

Audible_bell
    If enabled, the “bell” command will produce a beep. The default value is “Enabled.”

Visible_bell
    If enabled, the “bell” command will cause the screen to flash. The default value is “Enabled.”

Root_Pattern
    Used to specify the “pattern” that covers the background. “on” means to use the default desktop gray pattern. “off” means to not use the default desktop gray pattern. “gray” means to use a 50% gray color on color monitors. Anything else is the name of a file produced with iconedit(1) which contains an image that is replicated all over the background. The default value is “on.”

After you have set the options you want in the “SunView” category, click on the Save button in defaultsedit; then exit sunview and restart it.

Select the “Menu” category to see the following items (and some others):

Stay_up
    If enabled, menus are invoked by pressing and releasing the RIGHT mouse button; the menu appears after you release the RIGHT mouse button. To choose a menu item, point at it, then press and release the RIGHT mouse button a second time. The default value is “False”.

Items_in_column_major
    If enabled, menus that have more than one column are presented in “column major” order (the way ls(1V) presents file names). This may make a large menu easier to read. The default value is “False.”

After you have set the options you want in the “Menu” category, click on the Save button in defaultsedit. Any applications you start after saving your changes will be affected by your new choices. For all defaults categories except for “SunView”, you do not need to exit sunview and restart it.

  The SunView Menu File

The file called /usr/lib/.rootmenu contains the specification of the default SunView menu. You can change the SunView menu by creating your own file and giving its name in the Rootmenu_filename item in the SunView Defaults.

Lines in the file have the following format: The left side is a menu item to be displayed, and the right side is a command to be executed when that menu item is chosen. You can also include comment lines (beginning with a `#') and blank lines.

The menu item can be a string, or the full pathname of an icon file delimited by angle brackets (unless Walking_menus is disabled in the SunView defaults). Strings with embedded blanks must be delimited by double quotes.

There are four reserved-word commands that can appear on the right side.

    EXIT
        Exit sunview (requires confirmation).

    REFRESH
        Redraw the entire screen.

    MENU
        This menu item is a pull-right item with a submenu. If a full pathname follows the MENU command, the submenu contents are taken from that file. Otherwise, all the lines between a MENU command and a matching END command are added to the submenu.

    END Mark the end of a nested submenu. The left side of this line should match the left side of a line with a MENU command.

If the command is not one of these four reserved-word commands, it is treated as a command line and executed. No shell interpretation is done, although you can run a shell as a command.

Here is a menu file that demonstrates some of these features:

    Quit
        EXIT

    "Mail reader"
        mailtool

    "My tools"
        MENU /home/me/mytools.menu

    "Click to type"
        swin -c

    "Follow mouse"
        swin -m

    "Print selection"
        sh -c get_selection | lpr

    "Nested menu"
        MENU

        "Command Tool"
            cmdtool

        "Shell Tool"
            shelltool

    "Nested menu"
        END

    "Icon menu"
        MENU

        <images/textedit.icon> textedit

        <images/dbxtool.icon> dbxtool

    "Icon menu"
        END

  Multiple Screens

The sunview program runs on either a monochrome or color screen. Each screen on a machine with multiple screens may have a separate sunview running. The keyboard and mouse input devices can be shared between screens. Using adjacentscreens(1) you can set up the pointer to slide from one screen to another when you move it off the edge of a screen.

To set up an instance of sunview on two screens:

•   Invoke sunview on the first display as you normally would. This starts an instance of sunview on the default frame buffer (/dev/fb).

•   In a shelltool, run:

        sunview -d device &

    This starts another device. A typical choice might be /dev/cgone.

•   In that same shelltool, run:

        adjacentscreens /dev/fb -r device

    This sets up the cursor to switch between screens as it crosses the right or left edge of the respective screens.

  Multiple Desktops on the Same Screen

Machines that support multiple plane groups, such as the Sun-3/110 system, can support independent sunview processes on each plane group. They can share keyboard and mouse input in a manner similar to that for multiple screens. To set up two plane groups:

•   Start sunview in the color plane group by running:

        sunview -8bit_color_only -toggle_enable

    This starts sunview on the default frame buffer named /dev/fb, but limits access to the color plane group.

•   In a shelltool, run:

        sunview -d /dev/bwtwo0 -toggle_enable -n &

    This starts sunview in the overlay plane accessed by /dev/bwtwo0.

•   Run:

        adjacentscreens -c /dev/fb -l /dev/bwtwo0

    This sets up the pointer to switch between desktops as it crosses the right or left edge of the respective desktops.

Pre-3.2 applications cannot be run on the -8bit_color_only desktop, because they do not write to the overlay plane.

switcher(1), another application for switching between desktops, uses some amusing video wipe animation. It can also be used to toggle the enable plane. See switcher(1) for details.

  Generic Tool Arguments

Most window-based tools take the following arguments in their command lines:
FLAG | (LONG FLAG) | ARGUMENTS | NOTES
-Ww | (-width) | columns
-Wh | (-height) | lines
-Ws | (-size) | x y | x and y are
 |  |  | in pixels
-Wp | (-position) | x y | x and y are
 |  |  | in pixels
-WP | (-icon_position) | x y | x and y
 |  |  | are in pixels
-Wl | (-label) | string
-Wi | (-iconic) |  | makes the
 |  |  | application start
 |  |  | iconic (closed)
-Wt | (-font) | filename
-Wn | (-no_name_stripe)
-Wf | (-foreground_color) | red green blue | 0-255 (no
 |  |  | color-full color)
-Wb | (-background_color) | red green blue | 0-255 (no
 |  |  | color-full color)
-Wg | (-set_default_color) |  | (apply color to
 |  |  | subwindows too)
-WI | (-icon_image) | filename | (for applications
 |  |  | with non-default
 |  |  | icons)
-WL | (-icon_label) | string | (for applications
 |  |  | with non-default
 |  |  | icons)
-WT | (-icon_font) | filename | (for applications
 |  |  | with non-default
 |  |  | icons)
-WH | (-help) |  | print this table

Each flag option may be specified in either its short form or its long form; the two are completely synonymous.

  SunView Applications
Some of the applications that run in the SunView environment:

    clock(1), cmdtool(1), dbxtool(1), defaultsedit(1), fontedit(1), gfxtool(1), iconedit(1),
    lockscreen(1), mailtool(1), overview(1), perfmeter(1), shelltool(1),
    tektool(1), textedit(1), traffic(1C)

Some of the utility programs that run in or with the SunView environment:

    adjacentscreens(1), clear_functions(1), get_selection(1), stty_from_defaults(1),
    swin(1), switcher(1), toolplaces(1)

ENVIRONMENT

DEFAULTS_FILE
    The value of this environment variable indicates the file from which SunView defaults are read. When it is undefined, defaults are read from the .defaults file in your home directory.

FILES
~/.sunview
/usr/lib/.sunview
/usr/lib/.rootmenu
/usr/lib/fonts/fixedwidthfonts/*
/dev/winx
/dev/ptypx
/dev/ttypx
/dev/fb
/dev/kbd
/dev/mouse
/etc/utmp

SEE ALSO
adjacentscreens(1), clear_functions(1), clock(1), cmdtool(1), dbxtool(1), defaultsedit(1), fontedit(1), get_selection(1), gfxtool(1), iconedit(1), lockscreen(1), mailtool(1), overview(1), perfmeter(1), screendump(1), shelltool(1), stty_from_defaults(1), swin(1), switcher(1), tektool(1), textedit(1), toolplaces(1), traffic(1C), fbtab(5), svdtab(5)

BUGS

Console messages ignore window boundaries unless redirected to a console window. This can disrupt the sunview desktop display. The display can be restored using the Redisplay All item on the SunView menu. To prevent this, use the Console item to start a console window.

With an optical mouse, sometimes the arrow-shaped cursor does not move at start-up; moving the mouse in large circles on its pad normally brings it to life.

sunview requires that the /etc/utmp file be given read and write permission for all users.

On a color display, colors may “go strange” when the cursor is in certain windows that request a large number of colors.

When running multiple desktops, only one console window can be used.

In Click-to-type mode, it is impossible to exit from sunview by typing CTRL-D CTRL-Q.