2016-06-21 03:06:44 -05:00
|
|
|
.. _desktop_deployment:
|
|
|
|
|
2018-06-15 03:14:12 -05:00
|
|
|
***************************
|
|
|
|
`Desktop Deployment`:index:
|
|
|
|
***************************
|
2016-01-14 09:20:53 -06:00
|
|
|
|
|
|
|
pgAdmin may be deployed as a desktop application by configuring the application
|
2018-02-05 09:32:14 -06:00
|
|
|
to run in desktop mode and then utilising the desktop runtime to host the
|
|
|
|
program on a supported Windows, Mac OS X or Linux installation.
|
|
|
|
|
2021-01-29 02:08:27 -06:00
|
|
|
The desktop runtime is a standalone application that when launched, runs the
|
|
|
|
pgAdmin server and opens a window to render the user interface.
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2018-01-12 07:37:59 -06:00
|
|
|
.. note:: Pre-compiled and configured installation packages are available for
|
|
|
|
a number of platforms. These packages should be used by end-users whereever
|
|
|
|
possible - the following information is useful for the maintainers of those
|
|
|
|
packages and users interested in understanding how pgAdmin works.
|
|
|
|
|
|
|
|
.. seealso:: For detailed instructions on building and configuring pgAdmin from
|
|
|
|
scratch, please see the README file in the top level directory of the source code.
|
|
|
|
For convenience, you can find the latest version of the file
|
2022-09-21 04:56:03 -05:00
|
|
|
`here <https://github.com/pgadmin-org/pgadmin4/blob/master/README.md>`_,
|
2018-01-12 07:37:59 -06:00
|
|
|
but be aware that this may differ from the version included with the source code
|
|
|
|
for a specific version of pgAdmin.
|
2016-01-14 09:20:53 -06:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
*************
|
|
|
|
|
2017-08-25 06:13:03 -05:00
|
|
|
From pgAdmin 4 v2 onwards, the default configuration mode is server, however,
|
|
|
|
this is overridden by the desktop runtime at startup. In most environments, no
|
|
|
|
Python configuration is required unless you wish to override other default
|
|
|
|
settings.
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2019-08-22 09:24:04 -05:00
|
|
|
See :ref:`config_py` for more information on configuration settings.
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
Desktop Runtime Standalone Application
|
|
|
|
======================================
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2024-07-02 00:04:30 -05:00
|
|
|
The Desktop Runtime is based on `Electron <https://www.electronjs.org/>`_ which integrates a
|
2021-02-22 04:47:13 -06:00
|
|
|
browser and the Python server creating a standalone application.
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
.. image:: images/runtime_standalone.png
|
|
|
|
:alt: Runtime Standalone
|
|
|
|
:align: center
|
2016-01-14 09:20:53 -06:00
|
|
|
|
2024-11-04 02:17:30 -06:00
|
|
|
Runtime Menu Items
|
|
|
|
------------------
|
2021-01-29 03:26:18 -06:00
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
.. image:: images/runtime_menu.png
|
|
|
|
:alt: Runtime Menu
|
|
|
|
:align: center
|
2018-06-08 02:45:02 -05:00
|
|
|
|
2024-11-04 02:17:30 -06:00
|
|
|
Use the *File Menu* to access the runtime menu items:
|
2021-03-15 03:47:56 -05:00
|
|
|
|
|
|
|
+-------------------------+---------------------------------------------------------------------------------------------------------+
|
|
|
|
| Option | Action |
|
|
|
|
+=========================+=========================================================================================================+
|
2024-11-04 02:17:30 -06:00
|
|
|
| *View logs...* | Click to open the view log dialog to view the pgAdmin 4 logs. |
|
2021-03-15 03:47:56 -05:00
|
|
|
+-------------------------+---------------------------------------------------------------------------------------------------------+
|
2024-11-04 02:17:30 -06:00
|
|
|
| *Configure runtime...* | Click to open configuration dialog to configure fixed port, port number and connection timeout. |
|
2021-03-15 03:47:56 -05:00
|
|
|
+-------------------------+---------------------------------------------------------------------------------------------------------+
|
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
Configuration Dialog
|
|
|
|
--------------------
|
2021-01-29 02:08:27 -06:00
|
|
|
|
2024-11-04 02:17:30 -06:00
|
|
|
Use the *Configure runtime...* option to access the *Configuration* dialog:
|
2017-07-17 09:17:58 -05:00
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
.. image:: images/runtime_configuration.png
|
|
|
|
:alt: Runtime Configuration
|
|
|
|
:align: center
|
|
|
|
|
2022-02-04 04:35:30 -06:00
|
|
|
Following are the details of the *Fixed port number?*, *Port Number*, *Connection
|
|
|
|
Timeout*, and 'Open Documentation in Default Browser?' configuration parameters:
|
2017-07-17 09:17:58 -05:00
|
|
|
|
2019-03-21 06:38:34 -05:00
|
|
|
.. table::
|
|
|
|
:class: longtable
|
|
|
|
:widths: 2 1 4
|
|
|
|
|
2022-02-04 04:35:30 -06:00
|
|
|
+----------------------------------------+--------------------+---------------------------------------------------------------+
|
|
|
|
| Key | Type | Purpose |
|
|
|
|
+========================================+====================+===============================================================+
|
|
|
|
| FixedPort | Boolean | Use a fixed network port number rather than a random one. |
|
|
|
|
+----------------------------------------+--------------------+---------------------------------------------------------------+
|
|
|
|
| PortNumber | Integer | The port number to use, if using a fixed port. |
|
|
|
|
+----------------------------------------+--------------------+---------------------------------------------------------------+
|
|
|
|
| ConnectionTimeout | Integer | The number of seconds to wait for application server startup. |
|
|
|
|
+----------------------------------------+--------------------+---------------------------------------------------------------+
|
|
|
|
| Open Documentation in Default Browser | Boolean | By checking this option, all documentation links will open in |
|
|
|
|
| | | the default browser instead of in a new window. |
|
|
|
|
+----------------------------------------+--------------------+---------------------------------------------------------------+
|
2018-07-05 03:13:46 -05:00
|
|
|
|
2021-02-22 04:47:13 -06:00
|
|
|
Log dialog
|
|
|
|
----------
|
|
|
|
|
2024-11-04 02:17:30 -06:00
|
|
|
Use the *File Menu* to access the *View Logs* dialog:
|
2021-02-22 04:47:13 -06:00
|
|
|
|
|
|
|
.. image:: images/runtime_view_log.png
|
|
|
|
:alt: Runtime View Log
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
Click on the *Reload* button at the bottom to view the latest logs of pgAdmin 4
|
|
|
|
Server.
|
|
|
|
|
|
|
|
When executed, the runtime will automatically try to execute the pgAdmin Python
|
|
|
|
application. If execution fails, it will prompt you with error message
|
|
|
|
displaying a *Configure* button at the bottom. You can configure a fixed port
|
|
|
|
number to avoid clashes of the default random port number with other
|
|
|
|
applications and a connection timeout if desired.
|
|
|
|
|
|
|
|
.. image:: images/runtime_error.png
|
|
|
|
:alt: Runtime Error
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
If the error is related to Python Path or pgAdmin Python file then you need to
|
|
|
|
create a file named 'dev_config.json' and specify the following entries:
|
|
|
|
|
|
|
|
.. code-block:: json
|
|
|
|
|
|
|
|
{
|
|
|
|
"pythonPath": "/path/to/python.exe",
|
|
|
|
"pgadminFile": "/path/to/pgAdmin4.py"
|
|
|
|
}
|
|
|
|
|
|
|
|
Note that the *dev_config.py* file should only be required by developers who are
|
|
|
|
working outside of a standard installation.
|
|
|
|
|
|
|
|
The configuration settings are stored in *runtime_config.json* file, which
|
|
|
|
will be available on Unix systems (~/.local/share/pgadmin/),
|
|
|
|
on Mac OS X (~/Library/Preferences/pgadmin),
|
|
|
|
and on Windows (%APPDATA%/pgadmin).
|