$ pgadmin3
$ pcmanfm 
$ gksudo pcmanfm

Invoke the programs fine but:

$ gksudo --user postgres pgadmin3


19:38:10: Error: Unable to initialize GTK+, is DISPLAY set properly?



By default, another user does not have permission to use the X screen.

This works for me:

xhost SI:localuser:postgres

gksudo --user postgres pgadmin3

# or sudo -u postgres -H pgadmin3

Related answer: What does this `xhost ...` command do?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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