pgAdmin 4 always open in browser not as a standalone desktop application

前端 未结 6 1633
梦毁少年i
梦毁少年i 2020-12-07 14:32

installed PSQL10 but when pgAdmin is run from start then always open in browser.There is no option to run as a Desktop Application

相关标签:
6条回答
  • 2020-12-07 14:59

    With new chrome versions it is possible to run pgAdmin 4 as "native" desktop app. While the pgAdmin v4 web server is running, right click the icon in the Windows System Tray and select Configure... In the Browser Command input add the following:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=%URL%

    Note that if you have Google Chrome installed in a different location, you will need to update the chrome.exe shortcut above accordingly.

    Now when you start pgAdmin 4 it has its own window which you can pin to taskbar/tab to and so on. Like before.

    0 讨论(0)
  • 2020-12-07 15:13

    I was facing the same issue.

    Download PgAdmin III - it's separate query editor
    official link v1.22.2/win32

    0 讨论(0)
  • 2020-12-07 15:14

    Release notes say it now utilizes the browser to fix bugs in QtWebKit/QtWebEngine:

    The desktop runtime now runs as a system tray application and utilises the browser on the system to display pgAdmin. This resolves numerous bugs and issues caused by QtWebKit/QtWebEngine.

    https://www.postgresql.org/about/news/1846/

    0 讨论(0)
  • 2020-12-07 15:15

    Yes, that seems like the new direction pgAdmin seems to be going and they have their reasons for that which is all stated in their documentation. Here's a link to the documentation for more information: https://www.postgresql.org/about/news/1846/

    0 讨论(0)
  • 2020-12-07 15:18

    As @Andrej mentioned, configuring the pgAdmin 4 Browser Command option of pgAdmin 4 gives you more control over how it is opened, and some browsers allow command-line arguments that can keep profiles, data, and dock icons separate. Some examples:

    Chrome has a --profile-directory option will use a specific "person" or profile in Chrome. If you want Chrome showing only once in your dock and switching profile/person within Chrome by clicking on the profile icon or changing the profile/person in the dock, then you could just use this.

    Chrome also has a --user-data-dir option which allows more separation of the data, perhaps less complexity in the interface, and allows Chrome to open as a different instance in the dock. It's also going to be a separate profile if you use this, but just in a different data directory.

    For either, using a different skin/theme for the pgAdmin profile may be a good idea. Something like the Simple Red Theme that might be distinct could be a good choice.

    For macOS and Chrome, you might use something like this Browser Command, as mentioned in https://apple.stackexchange.com/a/258760:

    open -na "Google Chrome" --args --user-data-dir="/Users/yourusername/somedirname" %URL%
    

    If you really want pgAdmin to run in the dock more similar to a regular desktop app, rather than having to use you could search for desktop webapp wrapper app and try one of those (e.g. Applicationize, Fluid, etc.).

    0 讨论(0)
  • 2020-12-07 15:24

    The solution I use on my MacBook (running Mojave) is based on @Andrej's answer and the associated comments. It's not perfect, but gets me most of what I need.

    First, install pgAdmin. I use Homebrew:

    $ brew cask install pgadmin4
    

    Start pgAdmin from the Applications menu.

    This gives you an elephant-looking icon in the top menu bar. In there, select Configure... and change the Browser Command to:

    "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --app %URL%
    

    Check the checkbox for Fixed Port Number and choose an arbitrary port (I used 20000), and click OK.

    Next, open a new browser window off the elephant menu using New pgAdmin 4 window. You may need to enter a passphrase to protect your database credentials.

    When the window has opened, go Chrome's 3-dots menu on the right-hand side of the window, and choose More Tools > Create Shortcut. Make sure you check the checkbox to use a separate window.

    Chrome will create a shortcut that pops up pgAdmin in a separate window with its own icon, and you can pin this window to the dock. If you forget to pin the shortcut to the dock, you can find it again at chrome://apps/.

    Unfortunately, this shortcut doesn't automatically start pgAdmin and doesn't inherit the security context that you get when you use the New pgAdmin 4 window from the elephant menu. So, after a reboot or after quitting Chrome, you'll get an error like this:

    Unauthorized The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.

    The fix is to start pgAdmin from the Applications menu and open a new window with New pgAdmin 4 window. After that, you can refresh your standalone window with ⌘-R, and then you can close the other browser window.

    This is a little annoying, but it at least gets me a separate icon and window, which is what I mostly care about.

    0 讨论(0)
提交回复
热议问题