MySQL Workbench Manual  /  Configuration  /  Tutorial: Add a Custom Link to the Home Page

3.4 Tutorial: Add a Custom Link to the Home Page

This tutorial introduces the concept of altering the MySQL Workbench home screen by adding your own Shortcut link. Here we will add a shortcut titled "Example" that opens "example.org" as its own browser tab inside MySQL Workbench.

Note

Although adding a link to the home screen is not a common need, this tutorial is an example that demonstrates the idea of customizing MySQL Workbench.

First, create an icon for your shortcut. This step is optional, and the table below compares the icon used in this tutorial and the default icon if a custom icon is not defined.

Table 3.3 MySQL Workbench Home Screen Icons

Default Icon Our Example Icon

Save your new 52x52 pixel image to a location accessible by MySQL Workbench. By default, source icons are stored here:

Table 3.4 Default Path for Home Screen Icons

Operating System File Path
Windows "C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.3.9\images\home\
OS X /Applications/MySQLWorkbench.app/Contents/Resources/
Linux /usr/share/mysql-workbench/images/

Next, open starters_settings.xml (this file is located under your user's MySQL Workbench directory) and add an entry for your new shortcut ID where the order determines the location on the home screen. Follow the standard convention by appending your value to "com.mysql.wb.starter.", this tutorial uses "example":

<link type="object">com.mysql.wb.starter.example</link>

Lastly, open predefined_starters.xml and add a new "app.Starter" entry.

Table 3.5 Default Path to predefined_starters.xml

Operating System File Path
Windows "C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.3.9\data\
OS X /Applications/MySQLWorkbench.app/Contents/Resources/data/
Linux /usr/share/mysql-workbench/data/

This tutorial does not describe this entry in detail, so consider it as a self-explanatory template for now. The important concepts include using the "id" you defined in the previous step, your own URL for the "command", and "smallIcon" as a 52x52 pixel image that is displayed on the MySQL Workbench home screen. Adjust these entries according to your needs, including the path to your icon.

<value type="object" struct-name="app.Starter" id="com.mysql.wb.starter.example">
 <value type="string" key="type">Website</value>
 <value type="string" key="title">Example</value>
 <value type="string" key="description">My wonderful example.org</value>
 <value type="string" key="publisher">Example Inc.</value>
 <value type="string" key="authorHome">http://www.example.org/about</value>
 <value type="string" key="smallIcon">/usr/local/share/wb-home-screen-example-icon.png</value>
 <value type="string" key="command">browse:http://example.org</value>
</value>
Note

Upgrading MySQL Workbench will overwrite these changes, because predefined_starters.xml is stored inside the MySQL Workbench installation directory, and starters_settings.xml is reset during installation. Consider saving copies of these changes for future reference.

Restart MySQL Workbench to see the new link on your MySQL Workbench home screen.

Figure 3.18 Home Screen with Custom Link

Home Screen with Custom Link

Additional "app.Starter" options include:

Require a specific edition of Workbench:
  Community:
    <value type="string" key="edition">ce</value>
  Commercial:
    <value type="string" key="edition">se</value>

Require a specific version (or higher) of Workbench:
  <value type="string" key="introduction">6.1.0</value>

User Comments
Sign Up Login You must be logged in to post a comment.