Thread: Re: Mac client - reconnecting to existing server (RESOLUTION)

Re: Mac client - reconnecting to existing server (RESOLUTION)

From
"Diggs, Asoka"
Date:

Success!  I’ve moved pgAdmin to a static port.  For other Mac users, here is what I did.

 

Open Terminal window and:

cd ~/Library/Preferences

plutil -convert xml1 org.pgadmin.pgadmin4.plist 

vi org.pgadmin.pgadmin4.plist 

 

In the text file, add (I think the area to add this is obvious):

       <key>FixedPort</key>

       <string>TRUE</string>

       <key>PortNumber</key>

       <integer>60000</integer>

 

Save and exit file.  Back at command line:

plutil -convert binary1 org.pgadmin.pgadmin4.plist 

 

Close the pgAdmin tab and kill the server using Activity Monitor.

 

Restart (I found that the updated .plist file wasn’t being seen without the Restart).

 

 

You can use any text editor where I used vi.  The problem I ran into is that the GUI editors wouldn’t let me edit something in the ~/Library folder, and I’m enough of a Mac noob to not know how to get around that.  So I used vi to get the job done.

 

These details might be valuable in the pgAdmin documentation.

 

Thanks for the help and pointers!

 

From: Jack Royal-Gordon <jackrg@pobox.com>
Date: Sunday, April 5, 2020 at 10:57 AM
To: "Diggs, Asoka" <asoka.diggs@intel.com>
Cc: Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>, "pgadmin-support lists.postgresql.org" <pgadmin-support@lists.postgresql.org>
Subject: Re: Mac client - reconnecting to existing server

 

FWIW, you can edit the .plitst file with any text editor. All you get with Xcode is syntax coloring and it’s a very heavy application for a Mac just for that. I stopped using Xcode for .plist editing several years ago.



On Apr 4, 2020, at 10:56 PM, Diggs, Asoka <asoka.diggs@intel.com> wrote:

 

Additional info.

 

I found the documentation on desktop deployment

 

For Mac, it indicates that configuration settings are saved in a .plist file. 

 

 

I’ll pursue editing that file next week.  In theory XCode is the easy way to do the edits.  I’ll have to upgrade my OS though to get it installed.

 

Thanks for the help Murtuza.

 

From: Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>
Date: Saturday, April 4, 2020 at 5:09 AM
To: "Diggs, Asoka" <asoka.diggs@intel.com>
Cc: "pgadmin-support lists.postgresql.org" <pgadmin-support@lists.postgresql.org>
Subject: Re: Mac client - reconnecting to existing server

 

Hi,  

 

By default pgAdmin4 opens port randomly, but there is an option to choose static port, once you set the port, you can bookmark the link.

 

1.    Click on the pgAdmin 4 tray-icon

2.    Click "Configure..."

3.    Check the box labeled "Fixed Port Number?"

4.    Enter the desired port number in the field next to it

5.    Restart pgadmin and try again.

 

 

 

 

On Sat, 4 Apr 2020, 03:28 Diggs, Asoka, <asoka.diggs@intel.com> wrote:

I think I’m missing something obvious and easy.  With the newer pgAdmins that make use of a service + web page for the application, is there a way to close the web page tab, and then reconnect to that existing server easily?  Such as a generic URL that doesn’t include the port #.

 

I’ve found that if I save the URL as a bookmark, then invariably the port saved in the URL is incorrect for the current server and I can’t reconnect.  So anytime I close the tab, next time I want pgAdmin, I go find the service and kill it, and then relaunch.

 

Or alternatively, is there an actual Mac App as there used to be, before the web page app? 

 

 



Re: Mac client - reconnecting to existing server (RESOLUTION)

From
Dave Page
Date:


On Mon, Apr 6, 2020 at 5:19 PM Diggs, Asoka <asoka.diggs@intel.com> wrote:

Success!  I’ve moved pgAdmin to a static port.  For other Mac users, here is what I did.

 

Open Terminal window and:

cd ~/Library/Preferences

plutil -convert xml1 org.pgadmin.pgadmin4.plist 

vi org.pgadmin.pgadmin4.plist 

 

In the text file, add (I think the area to add this is obvious):

       <key>FixedPort</key>

       <string>TRUE</string>

       <key>PortNumber</key>

       <integer>60000</integer>

 

Save and exit file.  Back at command line:

plutil -convert binary1 org.pgadmin.pgadmin4.plist 

 

Close the pgAdmin tab and kill the server using Activity Monitor.

 

Restart (I found that the updated .plist file wasn’t being seen without the Restart).

 

 

You can use any text editor where I used vi.  The problem I ran into is that the GUI editors wouldn’t let me edit something in the ~/Library folder, and I’m enough of a Mac noob to not know how to get around that.  So I used vi to get the job done.

 

These details might be valuable in the pgAdmin documentation.


Seems like a very long winded way of doing it. Why not just use the Configuration Dialogue (yes, I know the styling looks a little different to current releases - I'm hacking on that at the minute)?

Screenshot 2020-04-06 at 17.23.03.png
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment

Re: Mac client - reconnecting to existing server (RESOLUTION)

From
"Diggs, Asoka"
Date:

Good grief.  You’re right – I couldn’t find that Configure option until you provided that screen shot.  Still had to hunt for it, but now I have found it.  (First time I’ve done anything with that corner of my Mac GUI – Mac noob here).

 

Yes – much easier that!

 

From: Dave Page <dpage@pgadmin.org>
Date: Monday, April 6, 2020 at 9:26 AM
To: "Diggs, Asoka" <asoka.diggs@intel.com>
Cc: Jack Royal-Gordon <jackrg@pobox.com>, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>, "pgadmin-support lists.postgresql.org" <pgadmin-support@lists.postgresql.org>
Subject: Re: Mac client - reconnecting to existing server (RESOLUTION)

 

 

 

On Mon, Apr 6, 2020 at 5:19 PM Diggs, Asoka <asoka.diggs@intel.com> wrote:

Success!  I’ve moved pgAdmin to a static port.  For other Mac users, here is what I did.

 

Open Terminal window and:

cd ~/Library/Preferences

plutil -convert xml1 org.pgadmin.pgadmin4.plist 

vi org.pgadmin.pgadmin4.plist 

 

In the text file, add (I think the area to add this is obvious):

       <key>FixedPort</key>

       <string>TRUE</string>

       <key>PortNumber</key>

       <integer>60000</integer>

 

Save and exit file.  Back at command line:

plutil -convert binary1 org.pgadmin.pgadmin4.plist 

 

Close the pgAdmin tab and kill the server using Activity Monitor.

 

Restart (I found that the updated .plist file wasn’t being seen without the Restart).

 

 

You can use any text editor where I used vi.  The problem I ran into is that the GUI editors wouldn’t let me edit something in the ~/Library folder, and I’m enough of a Mac noob to not know how to get around that.  So I used vi to get the job done.

 

These details might be valuable in the pgAdmin documentation.

 

Seems like a very long winded way of doing it. Why not just use the Configuration Dialogue (yes, I know the styling looks a little different to current releases - I'm hacking on that at the minute)?

 

 

--

Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment