Cool VL Viewer provides for this sort of functionality through the use of Lua (
Lua scripting and viewer automation feature). I have used it quite successfully to achieve things like 'dd', auto greeting, teleport favorites, auto environment and graphical settings, etc. It's quite a nice API for allowing the end user to do many things that are not 'baked' into the viewer source and they are custom tailored to said user.