Automatically initialize a symbol whenever a kernel is launched.

Check for existing initializations

List any initializations for the symbol $GeoLocation that might already exist. Unless an initialization has already been defined, there should not be any:

If the symbol has initializations, InitializationValue will return the value instead of Missing:

If any initializations exist, remove them for a clean start:

Set up the initialization

Specify the value to initialize $GeoLocation with:

Out[4]=

Verify the initialization value:

In[5]:=
Click for copyable input
Out[5]=

Verify that the initialization works

Quit and restart the kernel. Verify that $GeoLocation has been initialized to the value you specified:

Notes

Initialization values are stored in the persistence location given by $PersistenceBase:

In[8]:=
Click for copyable input
Out[8]=