A number of special definitions are loaded from .tr files on Front End initialization and are accessible via FrontEndResource. These are used among other things for various menus and toolsbars, e.g.:
FrontEndResource["FEBitmaps", "HomeIconHot"] // ToExpression
FrontEndResource["FEExpressions", "HelpViewerToolbar"] // CellPrint
FrontEndResource["ContextMenus", "GraphicsBox"]
FrontEndResource["ColorSchemeSelector"] // CellPrint
The .tr resource files can be edited to change these as I proposed for Can you make the new "Choose color scheme" helper larger? and Is it possible to insert new colour schemes into ColorData? It would be much nicer to be able to edit these after they are loaded from within Mathematica. One can Unprotect FrontEndResource and modify the definition but this does not actually change what is displayed in the Front End.
As a simple example I would like to make the Color Scheme Selector a little wider so that it does not have a pointless horizontal scroll bar on my system. I attempt:
Unprotect[FrontEndResource];
With[{FER := FrontEndResource["ColorSchemeSelector"]},
FER = FER /. {180, Automatic} -> {195, Automatic};
]
The manually called resource is now wider:
FrontEndResource["ColorSchemeSelector"] // CellPrint
However the auto-complete popup for Color is not:
On examination this is not too surprising since the actual definition of FrontEndResource is:
FrontEndResource[name_] :=
MathLink`CallFrontEnd[FrontEnd`Value[FEPrivate`FrontEndResource[name]]];
FrontEndResource[name_, sub_] :=
MathLink`CallFrontEnd[FrontEnd`Value[FEPrivate`FrontEndResource[name, sub]]];
It seems logical that the Front End would make this lower level call directly, bypassing System`FrontEndResource. My problem is that I don't know how to redefine this FrontEnd`Value. Names finds a FrontEnd`SetValue which sounds promising but I haven't figured out how to use it.
How can I change this Front End Resource in a way that affects all appearances of the menu?


FrontEndExecute@FrontEnd`FlushTextResourceCaches[]for expressions' caches. – Kuba Jul 19 '16 at 21:01.trfile rather than directly editing things in memory. Perhaps these definitions are simply read only but I am hoping for authoritative confirmation of that before coming to a conclusion. – Mr.Wizard Jul 20 '16 at 07:13With[{FER :=? – Kuba Aug 01 '16 at 10:16FrontEnd`SetValue, if it actually does anything. – Mr.Wizard May 11 '17 at 21:47FrontEnd`SetValue[FEPrivate`Set[CurrentValue[spec],val]]. That works fine, but doesn't really help us here. Once I figure out how to make the packets work I'll post a solution editing at theDownValueslevel onFrontEnd`Value, but I have no experience with these WTSP packets so it's all very confusing. – b3m2a1 May 11 '17 at 21:50{PrivatePaths, "TextResources"}then by callingFrontEnd`FlushTextResourceCaches[]. It reloads everything as one would hope--as long as one uses a resource name already known to the system. – b3m2a1 May 11 '17 at 21:55KeyEventTranslations.tralthough I'm gonna keep playing with it. Reloading the menus works fine if you callResetMenusPacket[{Automatic,Automatic}](found in the PacletManager code) so I'm working on editing theMenuSetup.trright now. – b3m2a1 May 11 '17 at 21:57FrontEnd`FlushTextResourceCaches[]but I never figured out how to access those caches themselves. Maybe throughInternal`CheckCacheor something. – b3m2a1 Aug 18 '17 at 01:20