Context
I've installed pgAdmin4 using the APT installation procedure on Ubuntu 18.04 (default package without this new apt repository ships pgAdmin in version 3, which is deprecated).
This is how my configuration panel looks like when I open in using the "Configure..." menu from the pgadmin server icon tray;
Which seems to match the content of the ~/.config/pgadmin/pgadmin4.conf
file:
$ cat ~/.config/pgadmin/pgadmin4.conf
[General]
ApplicationPath=
BrowserCommand=/usr/bin/brave-browser --private %URL%
FixedPort=true
OpenTabAtStartup=false
PortNumber=5433
PythonPath="/usr/local/lib/python3.6/dist-packages;/usr/lib/python3/dist-packages;/usr/local/lib/python3.6/dist-packages"
Error
Now, if I start pgadmin4
in a console, I got this (it takes some seconds to launch, hence the multiple same failure messages at the beginning):
$ pgadmin4
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
Semaphore name: "pgadmin4-<user>-3ed67051278d25124b2c63f6651290d1-sema"
Shared memory segment name: "pgadmin4-<user>-3ed67051278d25124b2c63f6651290d1-shmem"
Python path: "/usr/local/lib/python3.6/dist-packages:/usr/lib/python3/dist-packages:/usr/local/lib/python3.6/dist-packages"
Python Home: ""
Webapp path: "/usr/share/pgadmin4/web/pgAdmin4.py"
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Failed to connect to the server: "Connection refused" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
Server response: "PING" - request URL: "http://127.0.0.1:39931/misc/ping?key=28059bf0-430c-4759-a9c2-1b05e1b67a02" .
And it automatically opens a new Firefox tab, where I asked it to open a new Brave browser in private mode tab.
Question
What's wrong there and how can I fix it (i.e. force pgadmin4 to run in a Brave private tab)?
I also want to be able to start pgAdmin4 from an ubuntu TTY (Ctrl + F1, not a GUI console), hence telling it to start without starting any kind of browser, but I got plenty of QT errors).