nstmenu — Script to manage menus on a NST system.
nstmenu
[
-m
TEXT
| --mode
TEXT
] [
-p
FILENAME
| --properties
FILENAME
] [
-s
TEXT
| --search-mode
TEXT
] [
-h
[true]|false
| --help
[true]|false
] [
-H
[true]|false
| --help-long
[true]|false
] [
-v
[true]|false
| --verbose
[true]|false
] [ --version
[true]|false
]
The nstmenu is used in a NST distribution to aid in menu management. It is used to perform the following tasks:
Generate the fluxbox menu for a individual user.
Update the system wide menus used by fluxbox and the Network Security Toolkit Web User Interface (NST WUI).
If you use fluxbox as your desktop manager, you can run this script to generate your fluxbox menu. You do not need to be logged in as root to perform this task. You should see the change in fluxbox immediately (the next time you pull up the menu by right-clicking on the desktop).
The following demonstrates how you use this script to generate a new "personal" fluxbox menu:
[jbob@probe ~]$
nstmenu -m fluxbox >| ~/.fluxbox/menu
[jbob@probe ~]$
When logged in as "root", you can use this script to update the system wide fluxbox menu and the JavaScript menus used by the Network Security Toolkit Web User Interface (NST WUI).
The following demonstrates how you run the nstmenu script to update the system menus:
[root@probe ~]#
nstmenu -m update
[root@probe ~]#
The following command line options are available:
-m TEXT
] | [--mode TEXT
]
The "mode" of operation may be:
"fluxbox
", "wui
", or
"update
". In "fluxbox
" mode,
a fluxbox menu will be generated to
stdout. In "wui
" mode, a JavaScript representation
of the menu will be generated to stdout (suitable for use in
the NST WUI). In
"update
" mode, the
system fluxbox menu will be updated as will
the JavaScript menus for
the NST WUI
and NST HTML pages. The "mode"
of operation defaults to: "fluxbox
" if
omitted.
-p FILENAME
] | [--properties FILENAME
]
This parameter allows one to specify the name of
the menu configuration file. If omitted, it defaults to the
value "AUTO
" in which case the appropriate
properties file from
the /usr/share/nstmenu/properties
directory will be chosen. This option is only useful if you are
experimenting with creating your own menu configuration
set.
-s TEXT
] | [--search-mode TEXT
]
This command line option is only intended for
developers which are designing and testing new menus. The "search
mode" may be: "firstDir
",
"omitPath
", or "removeEntry
". If
this option is omitted, it defaults to:
"removeEntry
". When set to
"removeEntry
", the script will try to locate the
executable associated with each application on the system and insert
the fully qualified path in the menu. If the application isn't found
on the system, its menu entry is removed (it will not show up in the
menu). When this option is set to "omitPath
", the
path to the executable will not be resolved or checked. All
applications defined in the menu will appear in the menu, but they may
be non-functional. When this option is set to
"firstDir
", the path to the executable will not be
resolved or checked, instead, the first directory will be prepended to
the application name and inserted into the menu. All applications
defined in the menu will appear in the menu, but they may be
non-functional.
-h [true]|false
] | [--help [true]|false
]
When this option is specified, nstmenu will display a short one line description of nstmenu, followed by a short description of each of the supported command line options. After displaying this information nstmenu will terminate.
-H [true]|false
] | [--help-long [true]|false
]
This option will attempt to pull up additional
nstmenu documentation within a text based
web browser. You can force which browser we use setting the
environment variable TEXTBROWSER
, otherwise,
we will search for some common ones.
-v [true]|false
] | [--verbose [true]|false
]
When you set this option to true, nstmenu will produce additional output. This is typically used for diagnostic purposes to help track down when things go wrong.
--version [true]|false
]
If this option is specified, the version number of the script is displayed.
/usr/share/nstmenu
Directory containing resource files used by nstmenu.
~/.fluxbox/menu
The user specific fluxbox menu which
is replaced when run with the: "--mode fluxbox
"
option.
/usr/share/fluxbox/menu
The main fluxbox menu which
is replaced when run with the: "--mode update
"
option.
/usr/share/nstweb/javascript/domMenuItems.js
The NST HTML JavaScript menu which
is replaced when run with the: "--mode update
"
option.
/usr/share/nstwui/javascript/domMenuItems.js
The NST WUI JavaScript menu which
is replaced when run with the: "--mode update
"
option.