You can use the FontForge application's scripting interface (in
python) which can run without a GUI.
There are a few scripts out there that do subsetting, the best known
of which is the one used by Google for it's web fonts project. Also
note that FontForge itself in curently undergoing some rapid
development and it is likely to support much more intelligent and
built-in font subsetting in the future.
You may want to read through the following email thread for more
information and/or tools...
And the Google subsetting script (which uses FontForge)...