Search code examples
postgresqlcookiespgadminpgadmin-4

Launch pgAdmin 4 as a standalone app using chrome browser commands


I have a serious problem with pgAdmin 4 being a web application right now which I have to use in my browser next to many other tabs. I want it to be a standalone application which I can pin to my taskbar and so on. With new Chrome versions it is possible to create a shortcut for the web application and finally pin it to a taskbar and run in its own window. But there is still a problem. When pgAdmin4 first launches, it seems to create a token which is passed by the ?key parameter to the browser:

http://127.0.0.1:12345/?key=6d2ed64a-a684-4503-beeb-06074d6263b3

When I now save this browser tab as an application I can add it in the pgAdmin 4 settings as a browser command:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=hfdebdmclblkieoihljjpjjamgmknckn

enter image description here

The problem is:

The chrome application/shortcut was, of course, saved without the ?key parameter and therefore can't create the cookie and is not autorized. Someone has an idea how I can pass the key with the browser command or any other workaround?

enter image description here


Solution

  • Just found out you have to add this command line to pass the key to the chrome app:

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