I'm having some trouble getting pgadmin3 to run on a remote server. I'm logging in to the server using SSH with the -X option. When I first installed pgadmin3, I was able to launch it using the command "pgadmin3 &", and PG Admin would launch correctly using my local X server. Something has happened though, and now PG Admin will no longer launch. It bounces back with the message "Error: Unable to initialize gtk, is DISPLAY set properly?"

I'm using the same SSH command to log in to the server, and the same command to launch PG Admin, yet it is no longer working. I haven't made any changes to my SSH configuration, nor have I installed any new software, so I'm at a loss as to how this broke and how to go about fixing it. What could have happened to break this, and where do I start with fixing it?

  • So is DISPLAY set? (Check with echo $DISPLAY.) Can you run other X programs (e.g. xterm)? Can you run other GTK programs? Sep 20, 2010 at 23:30

3 Answers 3


The clue is in the error message: What is the DISPLAY environment variable set to?

It is probably incorrect or has changed.


Check that the xauth package is installed on the server, as it is needed for ssh X forwarding to work properly.


None of these address the problem - I have the same thing and no fault in the $DISPLAY value. Even if you avoid SSH and go direct it does not work.

So what changed? It worked before and then it just stopped working???

Running the xhost command (i.e., typing it in a terminal and pressing enter) fixed it for me - but I still am clueless why it worked before without this step.

Then do your su, run the program, etc.

  • 1
    Welcome to Ask Ubuntu! This seems like it is, at least in part, an answer to the question, but it's worded as though you're asking a separate, related question. To make this clearer for people searching for help (so they know this post might help them), and to decrease the likelihood that this post will be considered not-an-answer and deleted, I recommend rewording this, and also removing anything that is actually a question (rather than a proposed solution) and posting it as a new question. Aug 10, 2012 at 20:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.