On Thu, Dec 1, 2016 at 12:14 PM, Peter Juhasz <pjuh...@uhusystems.com> wrote:
> On Wed, 2016-11-30 at 21:56 +0300, Devrim Gündüz wrote:
>> On Tue, 2016-11-29 at 10:42 +0100, Peter Juhasz wrote:
>> > I've removed the previous pgadmin4-* packages then installed the
>> > new
>> > ones.
>> That is not enough -- can you please also delete the directories that
>> mentioned here?
>> That error comes when these dirs are not removed. The previous
>> packages were
>> broken, and we need to get rid of all old stuff prior to installing
>> new ones.
> I've removed the package, deleted those directories, then reinstalled
> the package.
> It didn't solve the problem - as I expected it wouldn't.
> As I've explained in my previous email, the problem is that the runtime
> application never learns the location of the python server
> (pgAdmin4.py) in the first place because it doesn't load the config
> On Linux, the QSettings class searches for the application's config
> file in the following locations:
> in this order. For pgAdmin4, on my system, these translate to
> /home/pjuhasz/.config/pgAdmin Development Team/pgAdmin 4.conf
> /home/pjuhasz/.config/pgAdmin Development Team.conf
> /etc/xdg/pgAdmin Development Team/pgAdmin 4.conf
> /etc/xdg/pgAdmin Development Team.conf
We've found these locations seem to vary somewhat when testing with
strace. FYI, I tested the new RPMs on CentOS 7 before they were
published, and they work fine there - but I agree they're not working
on Fedora having since tested them there too.
> None of these exist so the application displays the error popup and
> crashes. (More precisely, it displays the popup at pgAdmin4.cpp:87, so
> it doesn't even get the chance to display the other popup where the
> user could give the correct application/python path.)
> At this point I'll reiterate more bluntly that application/directory
> names with spaces in them are ugly, look out of place and potential
> sources of error.
Agreed - blame Qt for that one. It builds the paths from the the
company and product names. I'm going to change what they are.
> The rpm package installs two files that could be candidates for config
That shouldn't be there.
> /etc/pgAdmin\ Development\ Team/pgAdmin4.conf
> The first one is never accessed at all, its contents are misleading, so
> it's apparently there to confuse the user.
> The second one is almost good, except it should go in /etc/xdg, not in
> Apparently the ApplicationPath setting must be a relative path,
> absolute paths don't work (because of a bug at Server.cpp:221 where the
> code just blindly concatenates the config's Application path to the
> runtime's own directory - if Application path is an absolute path, it
> should be used as is).
You're suggesting a fix such as this?
snake:pgadmin4 dpage$ git diff
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 3a4c660..e631872 100644
@@ -218,7 +218,13 @@ bool Server::Init()
for (int i = 0; i < paths.size(); ++i)
- QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
+ QDir dir;
+ if (paths[i].startsWith('/'))
+ dir = paths[i];
+ dir = QCoreApplication::applicationDirPath() + "/" + paths[i];
m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
> So after you copy the config file to its expected position under
> /etc/xdg, the contents must be modified as well:
> Note the five ..'s.
> Having done this, the pgadmin4 command finally works!
> I hope this helps.
> Best regards,
> Peter Juhasz
> Sent via pgadmin-support mailing list (email@example.com)
> To make changes to your subscription:
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Sent via pgadmin-support mailing list (firstname.lastname@example.org)
To make changes to your subscription: