Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 510F1476A22 for ; Fri, 6 Sep 2002 14:46:39 -0400 (EDT) Received: from dg.eisolution.com (dsl-232-15.speedsite.com [206.126.232.15]) by postgresql.org (Postfix) with ESMTP id 76FDD476F0C for ; Fri, 6 Sep 2002 14:46:23 -0400 (EDT) Received: from marcmdelltop (dg117.eisolution.com [10.5.1.117]) (authenticated) by dg.eisolution.com (8.11.6/8.11.6) with ESMTP id g86Iocj04388; Fri, 6 Sep 2002 13:50:38 -0500 Message-ID: <00e101c255d6$1c615ba0$7501050a@eisolution.com> From: "Marc Mitchell" To: "Bruce Momjian" Cc: "Ross J. Reedstrom" , References: <200209061823.g86INHP16111@candle.pha.pa.us> Subject: Re: Remote monitoring Date: Fri, 6 Sep 2002 13:49:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/80 X-Sequence-Number: 5619 Setting the DISPLAY on the remote machine works fine if the remote machine can directly access the local/client machine. It cannot in our case due to firewall and NAT issues. In this case we (thanks to Ross) use ssh (instead of the simpler slogin) from client to remote server. However, you set DISPLAY on the local machine, not the remote machine. The server side of ssh (sshd) sets up all the required settings to send the X11 traffic back over the established link. In fact, the ssh man page on our box explicitly states: "The user should not manually set DISPLAY." meaning on the remote side. One thing that was hampering this, at least within our install, was that the postgres home directory on the remote server was owned by root and not postgres. When ssh'ing into the box with the X11 forwarding enabled, the daemon wants to create a file (".Xauthority") in the home directory of the user on the remote machine. When this directory isn't writeable by the user, the creation of this file fails and the X11 forwarding doesn't work (and in fact screws up a lot of basic UI-rich apps like vi). Our solution was to make that directory writeable by everyone. We tried pre-creating just the file and chmod'ing but that didn't work apparently indicating the process wants to re-create the file as opposed to appending to it. Also, wasn't able to make this work in the situation where to ssh as user "X" and then on the remote machine su to user "postgres". But I didn't try very hard to figure it out once I got it working under the "postgres" account. I suspect it would be do-able. This might be important if ssh logins are restricted to certain accounts and those accounts don't include "postgres" which would be needed to enable the query view functionality as well as others. Marc ----- Original Message ----- From: "Bruce Momjian" To: "Marc Mitchell" Cc: "Ross J. Reedstrom" ; Sent: Friday, September 06, 2002 1:23 PM Subject: Re: [ADMIN] Remote monitoring > Marc Mitchell wrote: > > Ross, > > > > You rock! This works perfectly! Thank you very much! > > The pgmonitor README does have this paragraph: > > Pgmonitor only works when run on the database server machine. To use it > remotely, log into the remote machine, set the DISPLAY variable to point > to your local X server, and start pgmonitor. Pgmonitor will then run on > the remote machine, but will display on your local machine. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, Pennsylvania 19073