Setup pgAdmin4 on Ubuntu in Desktop mode

July 22, 2017

In this tutorial we will be using Qt-5.5.1 with webkit and assuming you have setup pgAdmin4 in server mode by following tutorial

Step by step instructions:

Qt has dependency of few libraries which has to be installed first.

sudo apt-get install opengl-dev
sudo apt-get install mesa-common-dev
sudo apt-get install libgl1-mesa-dev

Check python installation directory and set PYTHONPATH

# which python (assuming virtual environment is activated)
output: /home/surinder/virtualenvs/p27/bin/python

# set PYTHONPATH on terminal
export PYTHONPATH=$PYTHONPATH:/home/surinder/virtualenvs/p27/lib/python2.7/site-packages/

# change directory to runtime folder
cd runtime

# compile and make pgAdmin4 binary
/home/surinder/Qt5.5.1/5.5/gcc_64/bin/qmake "DEFINES +=PGADMIN4_USE_WEBKIT"

# run make
make

# Now run pgAdmin4 in Desktop mode
./pgAdmin4

Follow the setps to enable inspector tools:

That’s it. Now enjoy pgAdmin4 in Desktop mode.


Discussion, links, and tweets

Hello My name is Surinder Kumar, I am Python and Javascript developer from India and work at EnterpriseDB as a software engineer.
I enjoy working on Python(primarily) and other latest technologies such as Node.js, React and like to contribute to open source projects.