Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs80V-00064m-16 for pgadmin-hackers@arkaria.postgresql.org; Thu, 06 Oct 2016 12:42:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bs80U-0001M3-Ca for pgadmin-hackers@arkaria.postgresql.org; Thu, 06 Oct 2016 12:42:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bs80H-00017q-4Q for pgadmin-hackers@postgresql.org; Thu, 06 Oct 2016 12:42:25 +0000 Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bs80B-0005m7-Ir for pgadmin-hackers@postgresql.org; Thu, 06 Oct 2016 12:42:24 +0000 Received: by mail-it0-x232.google.com with SMTP id o19so28126961ito.1 for ; Thu, 06 Oct 2016 05:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sF6IOYIRpY+pvKeHwzXnTqkiJLtb59mKJ5S2ZVlY9sw=; b=BIQd+V4Pk8yzz1iNRc0uJtKWVzU90Rr64/IKHqDB0STPMcOKcV6NwaWEBtFoINloVw G2AZMJZQs5Umz95HKFeEQpLL++mF896Bsb/y1Xkn4waDTSvzITT5qApCH8tHd6xrVyyT zBNoOzKBp4CTFkm0RKUwsggO+2sPLPJvvcJ49RN0I9JSzypVLrBpOpXwdWiB61egafNk S1AcE9leFR6Y9AJPkTHOoGwyvWaeqc4eUjE8tFMiS9xIvw26/SJq+sNE34gqV60eSWQJ DppkI2+oq5oksgVyMUILg23P8ADs8jDoSV6DmKRva/Xb2qnWIn3csiTaFO9XjDZn/8gn 13IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sF6IOYIRpY+pvKeHwzXnTqkiJLtb59mKJ5S2ZVlY9sw=; b=JI2e+FZCUzI1lq2ZgsMm64GK5ubxAoPPMJOprFrI/VpsSBg/hP60y9vxxyruwr7kRP WIJthRbogVhoPaPmIzODpBMvhOoYsRCnJagVdouLocC3Q6d/Nv086fFntZTb3f8jnGok cQThhUSdUmA5WhbWHELNysxti5/E/KAwpPF0E9gsnS4PhFuJyVrUyLNDKUDA1ygvslFP MTv5xW7aSCBJzmYLrEKHcmGvd4Hodkou1txNocgO3t8iyDMH4Y7cdcQqd3Oqzi8xaX1D GBWW7Auv78CrN41/gjuK/WxMlJG9pfu/xQGEQWui7bAm+9z26Hl1oCL8LCuRzoRnzZRi 3wpw== X-Gm-Message-State: AA6/9Rk2nQOeZ8gyERvoqCe/KpAx9TS1Q/diEGymwbqycOU8qxPrPCBgVz81rzCYh+JKi8GLdHpkFuseNU+fLQ== X-Received: by 10.36.149.193 with SMTP id m184mr32150572itd.94.1475757737538; Thu, 06 Oct 2016 05:42:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.1.203 with HTTP; Thu, 6 Oct 2016 05:42:16 -0700 (PDT) In-Reply-To: <1475749506.3515.12.camel@gunduz.org> References: <1475749506.3515.12.camel@gunduz.org> From: Dave Page Date: Thu, 6 Oct 2016 13:42:16 +0100 Message-ID: Subject: Re: Running pgadmin4 as desktop application To: =?UTF-8?B?RGV2cmltIEfDvG5kw7x6?= Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Thu, Oct 6, 2016 at 11:25 AM, Devrim G=C3=BCnd=C3=BCz wrote: > > Hi, > > Can you please clarify how to start pgadmin4 in desktop application mode?= I > read > > https://www.pgadmin.org/docs4/dev/desktop_deployment.html > > but when I run > > /usr/pgadmin4-1.0/runtime/pgAdmin4 (installed via community RPMs), I get: > > " > An error occurred initialising the application server: > Failed to locate pgAdmin4.py, terminating server thread." > > (as reported 2 days ago on the list), followed by a segfault. There is an= ini > file at the same directory, with contents like this: > > $ cat /usr/pgadmin4-1.0/runtime/pgAdmin4.ini > > [General] > ApplicationPath=3D/usr/lib/python3.5/site-packages/pgadmin4-web > PythonPath=3D > > > Can you please give me a clue so that I can fix the packaging? The global config file that Qt will read by default seems to be "/etc/pgAdmin Development Team/pgAdmin 4.conf". I may change that for 1.1 to use a less obnoxious path. The contents of it seem to need to be: [General] ApplicationPath=3D../../../../usr/lib/python2.7/site-packages/pgadmin4-web/ PythonPath=3D"/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-p= ackages/" The ApplicationPath is the directory containing pgAdmin4.py. Due to a bugette in the way the runtime works, it needs to be relative to the location of the runtime, hence all the back-tracking. The PythonPath needs to include both the 32 and 64 bit directories, as it seems that some of the Python modules end up in each. That was enough to get it to start for me. Then, we run into the tricky issues, where you may have to deal with conflicts between web and desktop mode. In our other installers, we ship a blank config_local.py file, with a simple comment at the top telling the user they can customise any settings in that file. For web users, we don't want that, as it's used as a security mechanism (startup will fail if it's not present, and tell the user they must set some security-critical options). Those options don't matter in desktop mode, hence why we pre-write the file. Perhaps the way around that is to have the shortcut on the menu call a script that can create config_local.py if needed? Though, I see you already have config_distro.py forcing the user into desktop mode, which is a potential conflict. The other issue I see is with the docs: 1) The path in config_distro.py is /usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn't exist - if the docs are compiled in-situ, they'll end up in /usr/share/doc/pgadmin4-docs/en_US/html/_build/html 2) The docs aren't built, so there is no _build/html directory. 3) The docs are integrated into the application so really should be a dependency of the pgadmin4 RPM. --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers