For what it's worth, I have also found that after a new executable is added to
one's existing path, it is often necessary to issue the command "rehash" (using
csh, tcsh, or zsh ... under bash, I believe the command is "hash -r" instead)
to force Linux to scan the path and refresh its inventory of the executables
found there. If the original poster was encountering difficulty that
"xmgrace" was not recognized immediately after it was installed, then there's a
chance that a "rehash" (or "hash -r" instead) might fix that problem. While
it does sound like the problem could be persistent, nevertheless it may be good
to keep in mind the need for "rehash" (or "hash -r" instead) in a terminal
session after new programs are installed (or moved) within the folder locations
in one's path.
Cheers,
-- Jim