I'm running Debian 9 with separate root e home partitions, installed postgreSQL and pgAdmin4 following these steps:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-9.6 pgadmin4
From: https://wiki.postgresql.org/wiki/Apt
I had it installed previously, but while trying to update psycopg2 I accidentally uninstalled pgAdmin4. After the re-installation I was only able to run from the terminal, so decided to do a purge and start from scratch, now pgAdmin4 won't open as a standalone application, only opens on a browser.
If anyone has an idea how to fix it, I'd appreciate.
This is expected behavior, Now onwards pgAdmin4 will launch application using the default browser from the user system.