Thread: can't open file '/var/root/.pgpass' ?

can't open file '/var/root/.pgpass' ?

From
OpenMacNews
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi,

just built up a new instance of pgadmin3-head against wx262 on osx 10.4.4.

on connect to server, i now get a new error:

    can't open file '/var/root/.pgpass' (error 2: No such file or directory)

is i dismiss/"OK", the error goes away, and the server opens.

no other effect that i can tell ...

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iEYEAREDAAYFAkPNSmkACgkQlffdvTZxCMb19QCglW3jF1mas8A1ljmQNNj2v86S
L24AoIyUVTLXU/iVR0DEb1hHFawzdrmB
=p5VW
-----END PGP SIGNATURE-----


Re: can't open file '/var/root/.pgpass' ?

From
Dave Page
Date:


On 17/1/06 19:50, "OpenMacNews" <openmacnews@gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> hi,
>
> just built up a new instance of pgadmin3-head against wx262 on osx 10.4.4.

Oooh, 10.4.4? Updating, please stand by.... (yes, I did get a copy of Tiger
for Christmas :-) ).

> on connect to server, i now get a new error:
>
> can't open file '/var/root/.pgpass' (error 2: No such file or directory)
>
> is i dismiss/"OK", the error goes away, and the server opens.

You're logged into the GUI as root, or running from a command line?

Anyway, do you get this only when you opt to save the password?

Regards, Dave


Re: can't open file '/var/root/.pgpass' ?

From
OpenMacNews
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi dave,

> Oooh, 10.4.4? Updating, please stand by.... (yes, I did get a copy of Tiger
> for Christmas :-) ).

:-)

>> on connect to server, i now get a new error:
>>
>> can't open file '/var/root/.pgpass' (error 2: No such file or directory)
>>
>> is i dismiss/"OK", the error goes away, and the server opens.
>
> You're logged into the GUI as root, or running from a command line?

neither.  launching the GUI by dubl-click from my 'normal (non-root)' user desktop ...

> Anyway, do you get this only when you opt to save the password?

hrm ... this time, on server connect i get:

"Error connecting to the server: fe_sendauth: no password supplied"

and, yes, it only seems to happen if i "store password" ...

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iEYEAREDAAYFAkPNZPoACgkQlffdvTZxCMbz5wCgxhv2B0sFn86ReVMaPjeEGHuw
IU4An2crWXfGD3AVTh/JVrdflBs/bOnu
=VvTV
-----END PGP SIGNATURE-----


Re: can't open file '/var/root/.pgpass' ?

From
Dave Page
Date:


On 17/1/06 21:43, "OpenMacNews" <openmacnews@gmail.com> wrote:

> neither.  launching the GUI by dubl-click from my 'normal (non-root)' user
> desktop ...

OK, that's a little weird. What is $HOME set to? On my box it's
/Users/dpage.

>> Anyway, do you get this only when you opt to save the password?
>
> hrm ... this time, on server connect i get:
>
> "Error connecting to the server: fe_sendauth: no password supplied"
>
> and, yes, it only seems to happen if i "store password" ...

So it sounds like it's not writing the file properly. The function below is
the one that figures out the filename. It would appear that it would most
likely be wxStandardPaths that's getting it wrong if anything, but then it
works fine for me.

wxString pgServer::passwordFilename()
{
    wxStandardPaths stdp;
    wxString fname=stdp.GetUserConfigDir()
#ifdef WIN32
        + wxT("\\postgresql");
    mkdir(fname.ToAscii());
    fname += wxT("\\pgpass.conf");

#else
        + wxT("/.pgpass");
#endif

    wxLogInfo(wxT("Using password file %s"), fname.c_str());    return
fname;
}

Regards, Dave.


Re: can't open file '/var/root/.pgpass' ?

From
OpenMacNews
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi,

> OK, that's a little weird. What is $HOME set to? On my box it's
> /Users/dpage.

% echo $HOME
  /Users/devuser

i.e., my normal, non-root user's DIR ...

> So it sounds like it's not writing the file properly. The function below is
> the one that figures out the filename. It would appear that it would most
> likely be wxStandardPaths that's getting it wrong if anything, but then it
> works fine for me.
>
> wxString pgServer::passwordFilename()
> {
>     wxStandardPaths stdp;
>     wxString fname=stdp.GetUserConfigDir()
> #ifdef WIN32
>         + wxT("\\postgresql");
>     mkdir(fname.ToAscii());
>     fname += wxT("\\pgpass.conf");
>
> #else
>         + wxT("/.pgpass");
> #endif
>
>     wxLogInfo(wxT("Using password file %s"), fname.c_str());    return
> fname;
> }

hrm ... nothing above looks odd.  if wxStandardPaths was broken, there'd be lots of *other*
problems as well, i'd think.

it's something else ... :-/

richard


- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iEUEAREDAAYFAkPNayMACgkQlffdvTZxCMYZwQCYu3pC17exoeq4/tOe1uVaPmlG
+QCgpKl4YAfD/S+6So2zQsdOmQqLEk8=
=iFVe
-----END PGP SIGNATURE-----


Re: can't open file '/var/root/.pgpass' ?

From
Dave Page
Date:


On 17/1/06 22:09, "OpenMacNews" <openmacnews@gmail.com> wrote:

> hrm ... nothing above looks odd.  if wxStandardPaths was broken, there'd be
> lots of *other*
> problems as well, i'd think.
>
> it's something else ... :-/

Odd. Well, that's the code we use when writing the file. Reading it is
handled by libpq, which can be tested using psql of course. Please try
connecting to a password protected DB with an entry in .pgpass using psql.
Also, please try renaming the file, and trying it in /Users/devuser and
figuring our where exactly libpq is looking for it.

Cheers, Dave.


Re: uncopyable selection from hints window

From
OpenMacNews
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi dave,

it would seem that wx262 does, in fact, have some challenges w/ OSX's install_names:

http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?8:sss:86907:200601:ojcggikbjepjjjfmdnhf#b

which is why the samples/html/about/about.app was not launching ...

that said, in answer to your earlier question of whether the html samples run, exec'ing the
equiv "./about" from the command line *does* launch correctly, as do any/all of the other sample
apps i've tried.


now, of particular note, running the htmlctrl sample, selecting the text of the sample app is
possible, but *again* it can't be copied ...

i'll file this as well @ wx ...

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iEYEAREDAAYFAkPNpysACgkQlffdvTZxCMZXOACgvReulusRjOPrZKgUtSmyQgnv
QFIAoKopHpp7YrxUfzpOUSq4NiVDX4lO
=Jggt
-----END PGP SIGNATURE-----