DragonFly On-Line Manual Pages
FLASH(1) DragonFly General Commands Manual FLASH(1)
NAME
flash - A menu shell with hotkeys and process group management
SYNOPSIS
flash [-hVl] [-b basedirectory] [-d delimiter] [-L rules file] [-e
escape] [-c comment] [menu file]
DESCRIPTION
flash loads menu file, interprets and displays it. The menu is made up
of a combination of token structures seperated by line breaks.
OPTIONS
-h Print a help message and usage information.
-V Print version information and compile-time defaults.
-b basedirectory
Set the directory that flash should expect to find its
configuration files.
-d filename
Set the debug file to filename.
-c command
An ordinary shell would run command, flash just logs the attempt
to the syslog.
-L rules file
Users will be prompted to agree to the contents of the rules
file before being allowed to enter the shell. Agreement is loged
to syslog.
menu file
Load menu from menu file.
FILE FORMAT
Note: I will be using `:' as the token delimiter, `\' as the escape
character, and `#' as the comment character throughout this document.
Directive matching is case insensitive.
Flash files are made up of a series of token structures and directives.
There is a limit of one token structure or directive per line.
Lines beginning with `#' will be ignored by flash. Characters preceded
by `\' will be treated literally by flin.
Directives
Directives tell flash how to interperet text.
Menu [menu options] name
Starts a menu named name, all following lines will be
interpereted as menu token structures until the EndMenu is read.
If a menu main is present in the file it is stared first,
otherwise the first menu encountered is used.
RCBlock [rc options]
Interperet the following lines as rc token structures until
EndRCBlock is read. These blocks allow configuration of flash or
execution of programs at run time.
RCFile [rc options] filename
Read filename and interperet its lines as rc token structures
until the end of the file.
Module [module name] [module options]
Include filename [filenames...]
Include further menu files.
MainMenuName name
Specify the name of the initial menu. Defaults to "Main".
NoBox Default to displaying menus without border boxes.
Menu [menu options] name
A number of menu options may be used to control the appearance of the
menu on the screen. Options are seperated by whitespaces.
NoBox The menu should be displayed without a border box.
Left The menu should be displayed on the left of the screen.
Right The menu should be displayed on the right of the screen.
Top The menu should be displayed at the top of the screen.
Bottom The menu should be displayed at the bottom of the screen.
Offset y x
Offset the menu y lines and x columns from the location
specified using the above options.
Password x
Set an access password for this menu. x is the access password
encrypted using SHA. Passwords can be generated using the
shacrypt program included with the distribution.
The menu is defined by token structures, which are enclosed within a
Menu directive, with one structure per line. A token structure is made
up of at least two fields separated by delimiters. The last field must
end with a delimiter. The format of the token structure is:
Token:Name:Options:Args:Prompt:
Where Token is the type of item to display. Name is the name of the
item as displayed on the menu. The Options sets flags which control the
display of the item and in some cases the response to selection of the
menu item. Args is an item dependent argument field. Prompt is a text
string which is used in some of the tokens. Every token line must at
least contain the Token and Name fields, the others are either optional
or present in only some of the tokens. For compatibility with menus
from flin the fields have the following precidence which determines in
what order they are interpreted Token, Name, Args, Prompt and Options.
Menu Tokens
Title Title inserts a non-selectable title line in the menu.
Title:Name:
or
Title:Name:Options:
Nop Nop inserts a non-selectable line in the menu. If the item text
is blank then a horizontal line will be displayed.
Nop:Name:
or
Nop:Name:Options:
or
Nop::
SubMenu
SubMenu creates a link to another menu named in the Args field.
SubMenu:Name:Args:
or
SubMenu:Name:Options:Args:
Exec Exec executes the command specified in the Args field. The
process is put into a seperate process group. Note that the
command is started using execvp which will search the PATH if
the command is not specified absolutely, this may not be what
you want for a secure setup.
Exec:Name:Args:
or
Exec:Name:Options:Args:
Args Args executes the command in the Args field with user inputted
command-line arguments. The optional Prompt field contains the
prompt for the dialog box. Use with care! If you use this
improperly, you could open up a big security whole on your
system.
Args:Name:Args:
or
Args:Name:Args:Prompt:
or
Args:Name:Options:Args:Prompt:
Exit Exit exits the current menu, returning to the previous menu. If
Exit is executed in the main menu flash will quit.
Exit:Name:
or
Exit:Name:Options:
Quit Exits flash.
Quit:Name:
or
Quit:Name:Options:
Menu Token Options
There are a number Options defined for all of the menu tokens. These
control the display of the item on the menu. These are
L Display the item flush left on the menu
C Display the item centred in the menu
R Display the item flushed right in the menu
Kx Define a hotkey x for this menu item.
In addition the following options are defined for the Exec and Args
tokens
P The output from the process should be paged using a
default pager
N flash should not pause for the user to press a key when
the process exits unless it returns an error.
& The process should be started in the background.
RCFile [rc options] filename
RCBlock [rc options]
A number of rc options may be used to select what scope the block has.
Login The RCBlock or RCFile should only be processed if the shell is a
login shell.
System This option is available in RCFile only. It specifies that the
file to be read will have system rc privilage. Commands can be
restricted so that they can only appear in system rc files. All
RCBlocks are system. System RCFiles are sought relative to the
baseaddress while non-system RCFiles are sought in users' home
directories.
EXAMPLE MENU
Here is an example menu (comment character is `#', delimiter is `:'):
#!./flash -b.
#
# test.menu - sample menu implementation for flash
# to try it out type:
# `./flash test.menu' or `./test.menu'
# Main menu
Menu NoBox NoColour Top Right Offset 1 -2 Main
SubMenu:Electronic Mail:C:Mail:
SubMenu:Network Facilities:C:Facilities:
SubMenu:Local Chat:C:Talk:
SubMenu:Who Else Is Online?:C:Else:
SubMenu:Other System Information:C:SysInfo:
SubMenu:Customise Your Account:C:Customise:
SubMenu:Send Comments to Netsoc:C:Comments:
SubMenu:Read Help Files:C:Help:
SubMenu:Administration Menu:C:Admin:
Title::
Quit:Logout:C:
EndMenu
Menu Mail
Title:Read, Send or Review your e-mail:
Nop::
Nop::
Exec:Elm:N:elm:
Nop:Powerful - built in encrypted mail support:
Exec:Pine:N:pine:
Nop:Very easy-to-use, excellent help facilities:
Exit:Exit this menu:
EndMenu
Menu Facilities
Title:Programs to do with Network Access:
Nop::
SubMenu:Network News:News:
SubMenu:World Wide Web:Web:
Nop::
Exit:Exit This Menu:
EndMenu
Menu News
Title:Read, Reply to and Barf at Network News:
Nop::
Exec:Tin:N:rtin:
Nop:Tin is an easy to use, menu based news reader.:
Nop:Type `h` for help within the program.:
Exit:Exit this menu:
EndMenu
Menu Web
Title:"Surf" the World Wide Web:
Nop::
Exec:Lynx:N:lynx -noprint -restrictions=editor,file_url,exec,shell:
Exit:Exit this menu:
EndMenu
Menu Top Left Offset 2 -1 Password "tY30PCrOhbICLLXA6z3pTVs" Admin
Title:Account Administration:
Nop::
Exec:Change Finger Information:/usr/bin/chfn:
Exec:Start up tcsh:/bin/tcsh:
Args:Run any command::Enter command to run:
Nop::
Exit:Exit This Menu:
EndMenu
Menu Bottom Left Offset 0 -1 HotKeys
Title:Global HotKeys:
Nop::
Exec:p Pine:NKp:pine:
Args:f Finger:PKf:finger:Who do you want to finger:
Args:w W:PKw:w:Who do want to look for:
Args:l Last:Kl:last -20:Enter optional username:
Exec:e Elm:NKe:elm:
Args:t Telnet:Kt:telnet:Enter host and optional port:
Exec:b rBash:NKb:bash -version:
Nop::
Exit:Back to last menu:
EndMenu
RCBlock System
restrict all except pause
# Turn on exec logging
set logging
# Set Mail notification with timeout 5 sec
set mailnotify 5
# System Backgrounds
set background system.bg.1:system.bg.2:system.bg.2a
# Turn on TOP_BAR clock
set barclock
# Pager to use when an exec/args menu item has a P flag
set execpager "less -E -P'Press Space to continue'"
# Lock screen - saver frame timeout (ms) and backdoor password
set lockscreensaver 80
set lockbackdoor "tY30PCrOhbICLLXA6z3pTVs"
EndRCBlock
RCFile System Login system.flashlogin
RCFile .
GRIPES
The way the menu token fields are handled is horrible. This man page is
even worse. Anyone want to volunteer a nicer one.
BUGS
The current release has some built in limits on line length etc.
AUTHOR
Stephen Fegan (steve@netsoc.ucd.ie)
CONTACT
The flash mailing list: flash@netsoc.ucd.ie.
18-May-97 FLASH(1)