Friday Nov 21, 2008

Update Center: Desktop Notifier Start Up

In my  entry last month I discussed some ways to manage the Update Center's desktop notifier.   In the upcoming release  of version 2.1 of the Update Center project  the team added some additional mechanism to launch the notifier.  The most noticeable change is the update preferences accessed via the updateool GUI:

Preferences Dialog

The "Automatically check for updates" check box is used to indicate whether the notifier should be started automatically when  you log in to your desktop.    If this check box is selected when this dialog is applied the notifier will be registered  as a log in start up task.   The notifier will also be started immediately at that point.   If the notifier is already running the newly started notifier will silently exit.

If the "Automatically check for updates" check box is not selected when the dialog is applied the notifier will be unregistered as a log in start up task.   Any currently running notifier instances will be shutdown when the dialog is  dismissed.    By selecting or deselecting (and applying) the check box the current notifier operation can be controlled.

In UC 2.0 the updatetool GUI would automatically (as a background task) register the notifier shortly after it is started if the update check frequency is set to daily, weekly or monthly.   This still occurs in UC 2.1 (if the "Automatically check for updates" check box is selected).  New in version 2.1, the updatetool GUI will also start the notifier automatically shortly after the GUI is launched.  This instance of the notifier will silently exit if another instance of the notifier is already executing.

We also added the ability to stop the notifier from the command line:

% updatetool --notifier --shutdown

This command has no output.   It simply sends a message to the running notifier to shutdown.    This command is useful on Windows in the scenario where a user wishes to move or delete an application folder but is blocked because the running notifier instance was started from within the folder.   Windows will not allow a folder to be deleted if files within the folder are still in use.  

 Current builds of Update Center can be accessed through our download site:

 These changes will appear in build 18.

Wednesday Oct 08, 2008

Update Center: Managing the Desktop Notifier

The Update Center desktop update notifier is a small application that resides in the system tray or task bar. It monitors registered application installations and package repositories periodically to see if any updates are available for the software installed by the user. When updates are available the notifier informs the user and subsequently allows the user to review and apply the updates.  You can see some of the screenshots for the notifier on the Update Center wiki

Generally the notifier is started when a user logs into their desktop. In order for the notifier to be started when a user logs in it must first be registered as a log in start up task.

There are a couple of paths that will result in a registered notifier. For example the GlassFish v3 Prelude installer allows the user to "Enable Update Tool".  By selecting this option the notifier will be registered and started as part of the GlassFish installation.  Here's an example of the GlassFish Update Configuration screen:

Some products may use the Update Center's bootstrap and stub scripts as a way to minimize the download size of the product as well as maintain platform neutral distributions .  When the user launches the updatetool bootstub (to install the actual Update Tool packages) it will register and start the notifier:

% updatetool

The software needed for this command (updatetool) is not installed.

If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

Once installation is complete you may re-run this command.

Would you like to install Update Tool now (y/n):

(package installation output deleted)

Registering notifier: Successful.
Starting notifier.
Initialization complete.

If the notifier was not registered during installation it can be registered post install.  The Update Tool GUI application will attempt to register and start the notifier (if it is not already registered and running) shortly after it is launched if the update check frequency preference is set to a value other than "Never".  You can check this preference via the Updates tab in the Update Tool Preferences dialog.

Finally the notifier can be started manually from the command line like this:

% updatetool --notifier

but only one instance of the notifier per user can be running simultaneously. So if the notifier was started as a log in start up task a second instance started manually might complain:

% updatetool --notifier
Update Tool Notifier: The tool is already running.

Is the Notifier Registered?

There is an easy way to determine if the notifier is registered as a start up task on your system.  Go to the directory where you installed Update Tool or Glassfish and navigate into the updatetool/bin directory.  The updatetoolconfig tool can be used to manage the notifier's registration.  To see if the notifier is already registered run updatetoolconfig like this:

% updatetoolconfig --list

If this doesn't display any output then the notifier is not registered.  The tool also returns an exit code of 1 if the notifier is not registered.

Registering/Unregistering the Notifier

You can also use the updatetoolconfig tool to manually register and unregister the notifier:

% updatetoolconfig --register


% updatetoolconfig --unregister

A couple of comments about these operations.  If a notifier is already registered then --register will not work.  To override the existing registration you can use the --register --force options.

If there are multiple installed product images that the notifier is monitoring on the system then a simple --unregister will not unregister the notifier.  The notifier can only be unregistered this way if there is only one monitored image remaining (more about this in a future blog entry).

To force the notifier to be unregistered when there are more than one installed product images on the system use the --force option along with --unregister.

You can alway verify the registration or unregistration was successful by using the --list option.

Registering the notifier with the updatetoolconfig tool will not cause the notifier to be started immediately.  You must log out and then log back in to trigger the start of the notifier.

Notifier Firewall Interaction

When the notifier is started it opens a port and listens for connections from the Update Tool.  If this is the first time the notifier is run it may trigger your firewall to display a security alert indicating that Python (the notifier is based on Python) is attempting to connect to the network.  You should allow this operation.


Chris Kasso-Oracle


« October 2016