Re: [GNC] Locked out of gnucash

2019-11-25 Thread John Ralls


> On Nov 25, 2019, at 9:44 AM, Derek Atkins  wrote:
> 
> Adrien Monteleone  writes:
> 
>>> Again, if user A has a data file open, user B shouldn't also open
>>> the file. I don't see how a check for Gnucash instances could work
>>> to prevent precisely this problem, since my machine won't have any
>>> Gnucash instances running--but the file IS being used.
>> 
>> I agree, using the PID won’t work, because although GnuCash is not
>> (yet) a multi-user app, some people do use it from various machines
>> with the file stored on a network. A PID check won’t mean anything to
>> one machine when that PID belongs to a different machine.
> 
> Using a "machine-name + PID" will absolutely work, because:
> 1) If the machine-name is the local machine, you can check the PID and
>   if the PID is not gnucash, you know it was an unclean exist.
> 
> 2) If the machine-name is the local machine, you can check the PID and
>   if the PID IS gnucash, you know there is another running instance.
> 
> 3) If the machine-name is NOT the local machine, then you cannot
>   differentiate what's going on and should ask.  Most likely it IS open,
>   but there's no good way to tell.
> 
> The good news is that #1 and #2 ARE the most common use-cases today, so
> we should implement that.


Oh, goody! ;-)

"Patches Welcome!"

Regards,
John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-25 Thread Derek Atkins
HI,

On Mon, November 25, 2019 2:01 pm, David Carlson wrote:
> If I understand, Derek, you are proposing a change to GnuCash code to
> improve it's behavior.

Yes, I am proposing a small code change.  I'll note that even changing the
text of the message involves a code change, albeit a much smaller one.

> Going back to the original question, which was about the confusing wording
> of the warning, if the code is changed, should there be warnings tailored
> to each of the three cases?

I would think so, yes.

> Note: Case 1 might mean that some third party app such as a file editor
> may
> be mucking around.  Is this true?  Is it possible to test the PID to see
> if
> it is dead or alive?

I believe that there is a way to test if a process is alive by sending it
a kill(3) command and testing the return value.  Specifically (from the
kill(3) man page):

   The kill() function shall send a signal to a process or a group of
pro‐
   cesses specified by pid.  The signal to be sent is specified by sig
and
   is either one from the list given in  or 0. If sig is 0 
(the
   null  signal),  error  checking  is performed but no signal is
actually
   sent. The null signal can be used to check the validity of pid.

So we can just run the following code to test cases #1 and #2:

if (kill(old_pid, 0) == 0) {
// process is still running -- possibly duplicate gnucash?
} else {
// no process running -- crash/bad-shutdown?
}

-derek

-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-25 Thread Stephen M. Butler
On 11/25/19 11:01 AM, David Carlson wrote:
> If I understand, Derek, you are proposing a change to GnuCash code to
> improve it's behavior.
>
> Going back to the original question, which was about the confusing wording
> of the warning, if the code is changed, should there be warnings tailored
> to each of the three cases?
>
> Note: Case 1 might mean that some third party app such as a file editor may
> be mucking around.  Is this true?  Is it possible to test the PID to see if
> it is dead or alive?
>
> On Mon, Nov 25, 2019 at 11:47 AM Derek Atkins  wrote:
>
>> Adrien Monteleone  writes:
>>
 Again, if user A has a data file open, user B shouldn't also open
 the file. I don't see how a check for Gnucash instances could work
 to prevent precisely this problem, since my machine won't have any
 Gnucash instances running--but the file IS being used.
>>> I agree, using the PID won’t work, because although GnuCash is not
>>> (yet) a multi-user app, some people do use it from various machines
>>> with the file stored on a network. A PID check won’t mean anything to
>>> one machine when that PID belongs to a different machine.
>> Using a "machine-name + PID" will absolutely work, because:
>> 1) If the machine-name is the local machine, you can check the PID and
>>if the PID is not gnucash, you know it was an unclean exist.
>>
>> 2) If the machine-name is the local machine, you can check the PID and
>>if the PID IS gnucash, you know there is another running instance.
>>
>> 3) If the machine-name is NOT the local machine, then you cannot
>>differentiate what's going on and should ask.  Most likely it IS open,
>>but there's no good way to tell.
>>
>> The good news is that #1 and #2 ARE the most common use-cases today, so
>> we should implement that.
>>
>>> Regards,
>>> Adrien


You have one more case to consider for the local machine -- PID does not
exist (might be considered a special case of #1).

As for being dead/alive, on Linux as long as the PID exists, you need to
consider it might do something (unless it is marked to be killed).

Oh, for #2, it might be that the new process gets the old PID back
(weird but doable).  So you might want to check if the PID is yours! 
That would imply a crash of the prior process.  (or on a Quantum machine
that you have entered duality).

-- 
Stephen M Butler, PMP, PSM
stephen.m.butle...@gmail.com
kg...@arrl.net
253-350-0166
---
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-25 Thread David Carlson
If I understand, Derek, you are proposing a change to GnuCash code to
improve it's behavior.

Going back to the original question, which was about the confusing wording
of the warning, if the code is changed, should there be warnings tailored
to each of the three cases?

Note: Case 1 might mean that some third party app such as a file editor may
be mucking around.  Is this true?  Is it possible to test the PID to see if
it is dead or alive?

On Mon, Nov 25, 2019 at 11:47 AM Derek Atkins  wrote:

> Adrien Monteleone  writes:
>
> >> Again, if user A has a data file open, user B shouldn't also open
> >> the file. I don't see how a check for Gnucash instances could work
> >> to prevent precisely this problem, since my machine won't have any
> >> Gnucash instances running--but the file IS being used.
> >
> > I agree, using the PID won’t work, because although GnuCash is not
> > (yet) a multi-user app, some people do use it from various machines
> > with the file stored on a network. A PID check won’t mean anything to
> > one machine when that PID belongs to a different machine.
>
> Using a "machine-name + PID" will absolutely work, because:
> 1) If the machine-name is the local machine, you can check the PID and
>if the PID is not gnucash, you know it was an unclean exist.
>
> 2) If the machine-name is the local machine, you can check the PID and
>if the PID IS gnucash, you know there is another running instance.
>
> 3) If the machine-name is NOT the local machine, then you cannot
>differentiate what's going on and should ask.  Most likely it IS open,
>but there's no good way to tell.
>
> The good news is that #1 and #2 ARE the most common use-cases today, so
> we should implement that.
>
> > Regards,
> > Adrien
>
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> -derek
> --
>Derek Atkins 617-623-3745
>de...@ihtfp.com www.ihtfp.com
>Computer and Internet Security Consultant
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-25 Thread Derek Atkins
Adrien Monteleone  writes:

>> Again, if user A has a data file open, user B shouldn't also open
>> the file. I don't see how a check for Gnucash instances could work
>> to prevent precisely this problem, since my machine won't have any
>> Gnucash instances running--but the file IS being used.
>
> I agree, using the PID won’t work, because although GnuCash is not
> (yet) a multi-user app, some people do use it from various machines
> with the file stored on a network. A PID check won’t mean anything to
> one machine when that PID belongs to a different machine.

Using a "machine-name + PID" will absolutely work, because:
1) If the machine-name is the local machine, you can check the PID and
   if the PID is not gnucash, you know it was an unclean exist.

2) If the machine-name is the local machine, you can check the PID and
   if the PID IS gnucash, you know there is another running instance.

3) If the machine-name is NOT the local machine, then you cannot
   differentiate what's going on and should ask.  Most likely it IS open,
   but there's no good way to tell.

The good news is that #1 and #2 ARE the most common use-cases today, so
we should implement that.

> Regards,
> Adrien

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek
-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Michael or Penny Novack
I think PART of this problem is confusion about "another user". Remember 
that need not be another human being. YOU perhaps have more than one log 
in << say one with administrator rights and then a another for regular 
use >>


Rather than "in use" the terminology MIGHT be "checked out but not yet 
checked back in".It might be more obvious to people that the situation 
might be "another user has it" OR "crash or other abnormal termination 
before was checked back in"


The "lock file" solution is common/standard to allow multiple SEQUENTIAL 
users (one at a time). Insufficient to control multiple CONCURRENT users 
(more than one at a time-- of course only one of those can WRITE at a 
time). If the SQL database were real SQL there would be a "database 
manager" to handle that << I came from the mainframe world where that 
was DB2 >>


Michael D Novack




On 11/18/2019 11:51 AM, Adrien Monteleone wrote:



On Nov 18, 2019 w47d322, at 9:17 AM, D via gnucash-user 
 wrote:



On November 18, 2019, at 8:02 PM, Derek Atkins  wrote:


Hi,
I think I have a suggestion for some better wording.  See below.
How about:
The data file is currently in use.  Most likely this means that the data
file was not cleanly closed (due to a crash) after it was last opened.
If you are sure that it is not currently in use by you or another user,
click "Open Anyway".  Otherwise, click one of the other options.

The problem with this wording is that the first sentence is directly 
contradicted by the second.

It would actually be more accurate to say:

There is a lock file in the system for the requested data file, which means 
either that you are running another instance of Gnucash with this file, or that 
the file was not properly closed previously (for example, due to a crash).

If you are sure that it is not currently in use by you or another user, click "Open 
Anyway".  Otherwise, cancel or open the file in read only mode.

[I am working from memory here. I don't recall the exact options. However, I really 
dislike the "click one of the other options" wording. Far better to list them 
IMHO]

But once we're this far into the weeds, I think you're going to lose most users 
anyways.


Note to devs: does it make sense to put the gnucash PID into the lock
file and then check to see if that PID is currently running?  That could
help detect whether there is a current process or a crash/unclean
shutdown?

Again, if user A has a data file open, user B shouldn't also open the file. I 
don't see how a check for Gnucash instances could work to prevent precisely 
this problem, since my machine won't have any Gnucash instances running--but 
the file IS being used.

I agree, using the PID won’t work, because although GnuCash is not (yet) a 
multi-user app, some people do use it from various machines with the file 
stored on a network. A PID check won’t mean anything to one machine when that 
PID belongs to a different machine.

Regards,
Adrien


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.



--
There is no possibility of social justice on a dead planet except the equality 
of the grave.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread D via gnucash-user
Clearly, I am in the minority here. I'll drop out of this conversation now. 

David T.

On November 18, 2019, at 10:26 PM, Stan Brown  
wrote:


On 2019-11-18 08:56, D wrote:
> Adding to the error message to account for when the software crashes
> seems like overkill (as does linking to the documentation from a
> dialog, BTW). The topic is covered both in the wiki and in the
> Tutorial, and a quick check online or in the documentation should
> resolve the problem.
Except that those resources exist now, and they have _not_ resolved the
problem. It seems to be one that every new user runs up against.

I don't understand the objection to a link to the documentation. Why
make it harder for users who read the message and say "that doesn't
cover my situation"? The GnuCash learning curve is steep enough; why not
do what we can to ease the burden?

And in a later message from the same writer:
> The author of "The Design of Everyday Things" said that signs 
> explaining things to users are evidence of a failed system, and that
> a properly-designed system has no need for them. I agree with that.
Well, it's a nice sound bite. But redesigning the system takes several
thousand times the effort of fixing the message (if not more). It seems
to me that we do what we can do now, and that's to fix the message. Then
years from now, when the system is redesigned not to need a lock file,
the message can be retired. But in the meantime it will have reduced
user frustration as well as repetitive traffic on the mailing list.

Derek Atkins suggested this wording:

> The data file is currently in use.  Most likely this means that the 
> data file was not cleanly closed (due to a crash) after it was last
> opened. If you are sure that it is not currently in use by you or
> another user, click "Open Anyway".  Otherwise, click one of the other
> options.
I think we could avoid mentioning technicalities of the lock file by
inserting "GnuCash thinks that" at the beginning of that message.

And perhaps, in response to those who worry (rightly, in my opinion)
about long messages, we might even omit the second sentence and a
redundant "currently". That gives us

"GnuCash thinks that the data file is in use. If you're sure that
neither you nor anyone else currently has it open, select Open Anyway.
Otherwise, choose one of the other options."

While it is nice to explain why a thing happened, most users really care
only about what they should do next.

-- 
Regards,
Stan Brown
Tompkins County, New York, USA
https://BrownMath.com
http://OakRoadSystems.com
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Maf. King
On Monday, 18 November 2019 16:51:14 GMT Adrien Monteleone wrote:

> I agree, using the PID won’t work, because although GnuCash is not (yet) a
> multi-user app, some people do use it from various machines with the file
> stored on a network. A PID check won’t mean anything to one machine when
> that PID belongs to a different machine.
> 

True, but if the LCK  is hostname_PID.LCK (in a presumably shared data dir),  
it is then easy to check if hostname is the current host, and if  PID is 
stale, clear LCK and start normally, else show Warning (can't tell if PID is 
stale on a remote host)

It will clear the lock for the _majority_ of newish users getting caught by a 
crash or power outage.

0.02
Maf.



___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Stan Brown


On 2019-11-18 08:56, D wrote:
> Adding to the error message to account for when the software crashes
> seems like overkill (as does linking to the documentation from a
> dialog, BTW). The topic is covered both in the wiki and in the
> Tutorial, and a quick check online or in the documentation should
> resolve the problem.
Except that those resources exist now, and they have _not_ resolved the
problem. It seems to be one that every new user runs up against.

I don't understand the objection to a link to the documentation. Why
make it harder for users who read the message and say "that doesn't
cover my situation"? The GnuCash learning curve is steep enough; why not
do what we can to ease the burden?

And in a later message from the same writer:
> The author of "The Design of Everyday Things" said that signs 
> explaining things to users are evidence of a failed system, and that
> a properly-designed system has no need for them. I agree with that.
Well, it's a nice sound bite. But redesigning the system takes several
thousand times the effort of fixing the message (if not more). It seems
to me that we do what we can do now, and that's to fix the message. Then
years from now, when the system is redesigned not to need a lock file,
the message can be retired. But in the meantime it will have reduced
user frustration as well as repetitive traffic on the mailing list.

Derek Atkins suggested this wording:

> The data file is currently in use.  Most likely this means that the 
> data file was not cleanly closed (due to a crash) after it was last
> opened. If you are sure that it is not currently in use by you or
> another user, click "Open Anyway".  Otherwise, click one of the other
> options.
I think we could avoid mentioning technicalities of the lock file by
inserting "GnuCash thinks that" at the beginning of that message.

And perhaps, in response to those who worry (rightly, in my opinion)
about long messages, we might even omit the second sentence and a
redundant "currently". That gives us

"GnuCash thinks that the data file is in use. If you're sure that
neither you nor anyone else currently has it open, select Open Anyway.
Otherwise, choose one of the other options."

While it is nice to explain why a thing happened, most users really care
only about what they should do next.

-- 
Regards,
Stan Brown
Tompkins County, New York, USA
https://BrownMath.com
http://OakRoadSystems.com
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Adrien Monteleone


> On Nov 18, 2019 w47d322, at 9:17 AM, D via gnucash-user 
>  wrote:
> 
> 
> 
> On November 18, 2019, at 8:02 PM, Derek Atkins  wrote:
> 
>> Hi,
>> I think I have a suggestion for some better wording.  See below.
>> How about:
>> The data file is currently in use.  Most likely this means that the data
>> file was not cleanly closed (due to a crash) after it was last opened.
>> If you are sure that it is not currently in use by you or another user,
>> click "Open Anyway".  Otherwise, click one of the other options.
> 
> The problem with this wording is that the first sentence is directly 
> contradicted by the second. 
> 
> It would actually be more accurate to say:
> 
> There is a lock file in the system for the requested data file, which means 
> either that you are running another instance of Gnucash with this file, or 
> that the file was not properly closed previously (for example, due to a 
> crash). 
> 
> If you are sure that it is not currently in use by you or another user, click 
> "Open Anyway".  Otherwise, cancel or open the file in read only mode. 
> 
> [I am working from memory here. I don't recall the exact options. However, I 
> really dislike the "click one of the other options" wording. Far better to 
> list them IMHO]
> 
> But once we're this far into the weeds, I think you're going to lose most 
> users anyways.
> 
>> Note to devs: does it make sense to put the gnucash PID into the lock
>> file and then check to see if that PID is currently running?  That could
>> help detect whether there is a current process or a crash/unclean
>> shutdown?
> 
> Again, if user A has a data file open, user B shouldn't also open the file. I 
> don't see how a check for Gnucash instances could work to prevent precisely 
> this problem, since my machine won't have any Gnucash instances running--but 
> the file IS being used. 

I agree, using the PID won’t work, because although GnuCash is not (yet) a 
multi-user app, some people do use it from various machines with the file 
stored on a network. A PID check won’t mean anything to one machine when that 
PID belongs to a different machine.

Regards,
Adrien


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Derek Atkins
David,

On Mon, November 18, 2019 10:27 am, David Carlson wrote:
> I like Derek 's suggestion  but I would see that and call with this
> suggestion:
>
> There is a lock on the selected data file.   Most likely this means that
> the data file was not cleanly closed (due to a crash) after it was last
> opened.
> If you are sure that it is not currently in use by you or another user,
> click
> "Open Anyway".  Otherwise, click "Open Read-Only" or one of the other
> options.

I was trying to avoid the word "lock".

> And my note to dev's would include the caveat that PID is useless when
> remote users have access.

I don't understand why you say this.  Perhaps I should have been more
explicit about what data to put in, which can include e.g. machine name,
to differentiate if you have a data file on an NFS/CIFS/etc shared
storage.  The point being that in the case where it is a crash/shutdown
event, the local PID will have changed and we can have a high probability
of detecting that condition.

> David Carlson

-derek

> On Mon, Nov 18, 2019, 8:30 AM Derek Atkins  wrote:
>
>> Hi,
>>
>> I think I have a suggestion for some better wording.  See below.
>>
>> David Carlson  writes:
>>
>> > I think a better and more accurate wording would be "The data file has
>> not
>> > been cleanly closed since it was last opened.  If you are sure that it
>> was
>> > not opened by another user, click 'Open Anyway'.  Otherwise click one
>> of
>> > the other options."
>>
>> How about:
>>
>> The data file is currently in use.  Most likely this means that the data
>> file was not cleanly closed (due to a crash) after it was last opened.
>> If you are sure that it is not currently in use by you or another user,
>> click "Open Anyway".  Otherwise, click one of the other options.
>>
>> Note to devs: does it make sense to put the gnucash PID into the lock
>> file and then check to see if that PID is currently running?  That could
>> help detect whether there is a current process or a crash/unclean
>> shutdown?
>>
>> > To me the important part is that the data file has not been cleanly
>> closed,
>> > which is the real reason that the lock file exists.  There may be
>> better
>> > words to use as long as this idea is incorporated.
>>
>> I suppose that is one way to interpret it, as "currently in use".
>>
>> > David Carlson
>>
>> > Please remember to CC this list on all your replies.
>> > You can do this by using Reply-To-List or Reply-All.
>>
>> -derek
>>
>> --
>>Derek Atkins 617-623-3745
>>de...@ihtfp.com www.ihtfp.com
>>Computer and Internet Security Consultant
>>
>


-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread David Carlson
On Mon, Nov 18, 2019 at 10:01 AM Frank H. Ellenberger <
frank.h.ellenber...@gmail.com> wrote:

> Am Mo., 18. Nov. 2019 um 16:28 Uhr schrieb David Carlson
> :
> >
> > I like Derek 's suggestion  but I would see that and call with this
> suggestion:
> >
> > There is a lock on the selected data file.   Most likely this means that
> the data file was not cleanly closed (due to a crash) after it was last
> opened.
>
> I believe a more common reason than a crash is turning the computer
> off without closing the program.
>

That's why so many users have flat foreheads [Oh S***]!


>
> > If you are sure that it is not currently in use by you or another user,
> click "Open Anyway".  Otherwise, click "Open Read-Only" or one of the other
> options.
> >
> > And my note to dev's would include the caveat that PID is useless when
> remote users have access.
> >
> > David Carlson
>
> ~Frank
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread D via gnucash-user



On November 18, 2019, at 9:12 PM, Colin Law  wrote:

>Perhaps a message saying "Error 5135 if you don't understand what this
>means then you should have read the wiki" would be a solution.
>Colin

Certainly, it could be. But it wouldn't be a good one, and I think you should 
know I wasn't suggesting that. 

Having worked in public institutions for most of my adult life, I have seen 
first hand how most people do not read the information placed in front of them, 
regardless. Moreover, the longer the message, the more likely it is that the 
reader checks out by the end. The author of "The Design of Everyday Things" 
said that signs explaining things to users are evidence of a failed system, and 
that a properly-designed system has no need for them. I agree with that.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Frank H. Ellenberger
Am Mo., 18. Nov. 2019 um 16:28 Uhr schrieb David Carlson
:
>
> I like Derek 's suggestion  but I would see that and call with this 
> suggestion:
>
> There is a lock on the selected data file.   Most likely this means that the 
> data file was not cleanly closed (due to a crash) after it was last opened.

I believe a more common reason than a crash is turning the computer
off without closing the program.

> If you are sure that it is not currently in use by you or another user, click 
> "Open Anyway".  Otherwise, click "Open Read-Only" or one of the other options.
>
> And my note to dev's would include the caveat that PID is useless when remote 
> users have access.
>
> David Carlson

~Frank
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Colin Law
On Mon, 18 Nov 2019 at 13:59, D via gnucash-user
 wrote:
> ...
> Remember that the lock file and this check exist firstly to prevent multiple 
> users from opening the file at one time--and that is still a possibility.

That may be reason for the test but it is not the most common cause.
In fact arguably it is a deficiency in the s/w that it is not able to
distinguish between the two situations.  The best solution would be
for the s/w to know whether it crashed or whether the db is actually
open, but I don't know whether this is possible.  If it isn't then the
message shown should be as helpful as possible to the user.

> Adding to the error message to account for when the software crashes seems 
> like overkill (as does linking to the documentation from a dialog, BTW). The 
> topic is covered both in the wiki and in the Tutorial, and a quick check 
> online or in the documentation should resolve the problem. Expanding messages 
> to cover all eventualities results in messages that are overly complex, 
> overwhelming, and still misunderstood.

Perhaps a message saying "Error 5135 if you don't understand what this
means then you should have read the wiki" would be a solution.

Colin
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread David Carlson
I like Derek 's suggestion  but I would see that and call with this
suggestion:

There is a lock on the selected data file.   Most likely this means that
the data file was not cleanly closed (due to a crash) after it was last
opened.
If you are sure that it is not currently in use by you or another user, click
"Open Anyway".  Otherwise, click "Open Read-Only" or one of the other
options.

And my note to dev's would include the caveat that PID is useless when
remote users have access.

David Carlson


On Mon, Nov 18, 2019, 8:30 AM Derek Atkins  wrote:

> Hi,
>
> I think I have a suggestion for some better wording.  See below.
>
> David Carlson  writes:
>
> > I think a better and more accurate wording would be "The data file has
> not
> > been cleanly closed since it was last opened.  If you are sure that it
> was
> > not opened by another user, click 'Open Anyway'.  Otherwise click one of
> > the other options."
>
> How about:
>
> The data file is currently in use.  Most likely this means that the data
> file was not cleanly closed (due to a crash) after it was last opened.
> If you are sure that it is not currently in use by you or another user,
> click "Open Anyway".  Otherwise, click one of the other options.
>
> Note to devs: does it make sense to put the gnucash PID into the lock
> file and then check to see if that PID is currently running?  That could
> help detect whether there is a current process or a crash/unclean
> shutdown?
>
> > To me the important part is that the data file has not been cleanly
> closed,
> > which is the real reason that the lock file exists.  There may be better
> > words to use as long as this idea is incorporated.
>
> I suppose that is one way to interpret it, as "currently in use".
>
> > David Carlson
>
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> -derek
>
> --
>Derek Atkins 617-623-3745
>de...@ihtfp.com www.ihtfp.com
>Computer and Internet Security Consultant
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread D via gnucash-user


On November 18, 2019, at 8:02 PM, Derek Atkins  wrote:

>Hi,
>I think I have a suggestion for some better wording.  See below.
>How about:
>The data file is currently in use.  Most likely this means that the data
>file was not cleanly closed (due to a crash) after it was last opened.
>If you are sure that it is not currently in use by you or another user,
>click "Open Anyway".  Otherwise, click one of the other options.

The problem with this wording is that the first sentence is directly 
contradicted by the second. 

It would actually be more accurate to say:

There is a lock file in the system for the requested data file, which means 
either that you are running another instance of Gnucash with this file, or that 
the file was not properly closed previously (for example, due to a crash). 

If you are sure that it is not currently in use by you or another user, click 
"Open Anyway".  Otherwise, cancel or open the file in read only mode. 

[I am working from memory here. I don't recall the exact options. However, I 
really dislike the "click one of the other options" wording. Far better to list 
them IMHO]

But once we're this far into the weeds, I think you're going to lose most users 
anyways.

>Note to devs: does it make sense to put the gnucash PID into the lock
>file and then check to see if that PID is currently running?  That could
>help detect whether there is a current process or a crash/unclean
>shutdown?

Again, if user A has a data file open, user B shouldn't also open the file. I 
don't see how a check for Gnucash instances could work to prevent precisely 
this problem, since my machine won't have any Gnucash instances running--but 
the file IS being used. 

Although I admit you're more knowledgeable on these points than I ever will be.

David T.

>> To me the important part is that the data file has not been cleanly closed,
>> which is the real reason that the lock file exists.  There may be better
>> words to use as long as this idea is incorporated.
>I suppose that is one way to interpret it, as "currently in use".
>> David Carlson
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>-derek
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread Derek Atkins
Hi,

I think I have a suggestion for some better wording.  See below.

David Carlson  writes:

> I think a better and more accurate wording would be "The data file has not
> been cleanly closed since it was last opened.  If you are sure that it was
> not opened by another user, click 'Open Anyway'.  Otherwise click one of
> the other options."

How about:

The data file is currently in use.  Most likely this means that the data
file was not cleanly closed (due to a crash) after it was last opened.
If you are sure that it is not currently in use by you or another user,
click "Open Anyway".  Otherwise, click one of the other options.

Note to devs: does it make sense to put the gnucash PID into the lock
file and then check to see if that PID is currently running?  That could
help detect whether there is a current process or a crash/unclean
shutdown?

> To me the important part is that the data file has not been cleanly closed,
> which is the real reason that the lock file exists.  There may be better
> words to use as long as this idea is incorporated.

I suppose that is one way to interpret it, as "currently in use".

> David Carlson

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-18 Thread D via gnucash-user
I don't really agree. David's wording identifies one situation for this dialog, 
and not even the primary reason for the lock file in the first place. 

Remember that the lock file and this check exist firstly to prevent multiple 
users from opening the file at one time--and that is still a possibility.

Adding to the error message to account for when the software crashes seems like 
overkill (as does linking to the documentation from a dialog, BTW). The topic 
is covered both in the wiki and in the Tutorial, and a quick check online or in 
the documentation should resolve the problem. Expanding messages to cover all 
eventualities results in messages that are overly complex, overwhelming, and 
still misunderstood.

And for those panicked new users who don't avail themselves of the existing 
resources, it should be a simple enough proposition to refer them to the same. 
A quick "Check the tutorial at section 2.5, or the FAQ, and see if that fixes 
your problem." should suffice.

David T.

On November 18, 2019, at 2:07 PM, Stan Brown  wrote:

I think David Carlson's suggestion is better than mine.

I had hoped to spark a discussion on this point, so I didn't expect my
version would be the final one. I'm delighted that it is being looked
at, and benefit to users will result.

-- 
Regards,
Stan Brown
Tompkins County, New York, USA
https://BrownMath.com
http://OakRoadSystems.com


On 2019-11-17 19:24, David Carlson wrote:
> A comment about Stan Brown's suggestion. 
> 
> I think a better and more accurate wording would be "The data file has
> not been cleanly closed since it was last opened.  If you are sure that
> it was not opened by another user, click 'Open Anyway'.  Otherwise click
> one of the other options."
> 
> To me the important part is that the data file has not been cleanly
> closed, which is the real reason that the lock file exists.  There may
> be better words to use as long as this idea is incorporated.
> 
> David Carlson
> 
> On Sun, Nov 17, 2019 at 4:35 PM Frank H. Ellenberger
> mailto:frank.h.ellenber...@gmail.com>>
> wrote:
> 
> Hello Stan et al.
> 
> I like the idea. A short grep delivers 5 occurrences of likewise
> texts: 4 at
> 
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
> and one further below:
> 
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
> I am not totally sure if the change can be applied on aloof them.
> 
> BTW. Splitting the first 4 strings like the last would reduce the
> burden for our translators.
> 
> Regards
> Frank
> 
> Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
> mailto:the_stan_br...@fastmail.fm>>:
> >
> > In the two years I've been reading this list, I think the single most
> > common question has been about this "could not obtain the lock"
> message.
> > Seems like someone asks about it at least once a week.
> >
> > The text "that database may be in use by another user," while
> literally
> > true, isn't helpful because it points to a less common case and
> gives no
> > guidance for the more common case. It's like hearing hoofbeats and
> > hypothesizing "zebra" instead of "horse".
> >
> > I suggest that improving the message would be a huge boon to less
> > experienced GC users, and very little effort for the developers.
> >
> > Why not replace the present text
> >
> >         That database may be in use by another user, in which case you
> >         should not open the database. What would you like to do?
> >
> > with this:
> >
> >         If your previous session crashed, select Open Anyway. If
> this is
> >         a shared database, wait for other users to finish using it or
> >         select Open Read-Only. For more information, see (link to sec
> >         2.5.3 of Tutorial).
> >
> > "What would you like to do?" can be omitted, in my opinion. Seeing
> > buttons, users will know that they need to pick one. What they
> _do_ need
> > is text that is relevant to their situation.
> >
> > (I question the tutorial's advice to delete the lock files manually.
> > David Cousens reports:
> > >  My experience on Linux is that when you select Open
> > > Anyway, the previous .LNK and .LCK files will be deleted and new
> ones
> > > created which should then be deleted when GNucash is closed
> properly.
> > The same happens for me in Windows. Is there any OS where this
> desirable
> > behavior doesn't happen? If there is, the tutorial's advice should
> > mention those specific systems, or at least it should say that in
> > Windows and Linux GC will do this automatically when you reopen a data
> > file after the "could not obtain the lock" message.)
_

Re: [GNC] Locked out of gnucash

2019-11-18 Thread Stan Brown
I think David Carlson's suggestion is better than mine.

I had hoped to spark a discussion on this point, so I didn't expect my
version would be the final one. I'm delighted that it is being looked
at, and benefit to users will result.

-- 
Regards,
Stan Brown
Tompkins County, New York, USA
https://BrownMath.com
http://OakRoadSystems.com


On 2019-11-17 19:24, David Carlson wrote:
> A comment about Stan Brown's suggestion. 
> 
> I think a better and more accurate wording would be "The data file has
> not been cleanly closed since it was last opened.  If you are sure that
> it was not opened by another user, click 'Open Anyway'.  Otherwise click
> one of the other options."
> 
> To me the important part is that the data file has not been cleanly
> closed, which is the real reason that the lock file exists.  There may
> be better words to use as long as this idea is incorporated.
> 
> David Carlson
> 
> On Sun, Nov 17, 2019 at 4:35 PM Frank H. Ellenberger
> mailto:frank.h.ellenber...@gmail.com>>
> wrote:
> 
> Hello Stan et al.
> 
> I like the idea. A short grep delivers 5 occurrences of likewise
> texts: 4 at
> 
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
> and one further below:
> 
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
> I am not totally sure if the change can be applied on aloof them.
> 
> BTW. Splitting the first 4 strings like the last would reduce the
> burden for our translators.
> 
> Regards
> Frank
> 
> Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
> mailto:the_stan_br...@fastmail.fm>>:
> >
> > In the two years I've been reading this list, I think the single most
> > common question has been about this "could not obtain the lock"
> message.
> > Seems like someone asks about it at least once a week.
> >
> > The text "that database may be in use by another user," while
> literally
> > true, isn't helpful because it points to a less common case and
> gives no
> > guidance for the more common case. It's like hearing hoofbeats and
> > hypothesizing "zebra" instead of "horse".
> >
> > I suggest that improving the message would be a huge boon to less
> > experienced GC users, and very little effort for the developers.
> >
> > Why not replace the present text
> >
> >         That database may be in use by another user, in which case you
> >         should not open the database. What would you like to do?
> >
> > with this:
> >
> >         If your previous session crashed, select Open Anyway. If
> this is
> >         a shared database, wait for other users to finish using it or
> >         select Open Read-Only. For more information, see (link to sec
> >         2.5.3 of Tutorial).
> >
> > "What would you like to do?" can be omitted, in my opinion. Seeing
> > buttons, users will know that they need to pick one. What they
> _do_ need
> > is text that is relevant to their situation.
> >
> > (I question the tutorial's advice to delete the lock files manually.
> > David Cousens reports:
> > >  My experience on Linux is that when you select Open
> > > Anyway, the previous .LNK and .LCK files will be deleted and new
> ones
> > > created which should then be deleted when GNucash is closed
> properly.
> > The same happens for me in Windows. Is there any OS where this
> desirable
> > behavior doesn't happen? If there is, the tutorial's advice should
> > mention those specific systems, or at least it should say that in
> > Windows and Linux GC will do this automatically when you reopen a data
> > file after the "could not obtain the lock" message.)
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-17 Thread David Carlson
Is there a simple way to reword the warning to say that a lock file is
present thus some instance of GnuCash has either abandoned it or is not
finished working with the data.   If you are sure that it was *not* opened
by another user or still opened by yourself on another screen  or computer
click 'Open Anyway'.  Otherwise click one of the other options."

David Carlson

On Sun, Nov 17, 2019 at 9:57 PM John Ralls  wrote:

> Except that the file was closed immediately after completing the session
> load. GnuCash will rename it and write a new one if you have made changes
> to the book in memory and tell it to save those changes or let it
> auto-save, but you can certainly close the session and so delete the lock
> file without saving.
>
> It really is about the lock file, not the data file.
>
> Regards,
> John Ralls
>
>
> > On Nov 17, 2019, at 4:24 PM, David Carlson 
> wrote:
> >
> > A comment about Stan Brown's suggestion.
> >
> > I think a better and more accurate wording would be "The data file has
> not
> > been cleanly closed since it was last opened.  If you are sure that it
> was
> > not opened by another user, click 'Open Anyway'.  Otherwise click one of
> > the other options."
> >
> > To me the important part is that the data file has not been cleanly
> closed,
> > which is the real reason that the lock file exists.  There may be better
> > words to use as long as this idea is incorporated.
> >
> > David Carlson
> >
> > On Sun, Nov 17, 2019 at 4:35 PM Frank H. Ellenberger <
> > frank.h.ellenber...@gmail.com> wrote:
> >
> >> Hello Stan et al.
> >>
> >> I like the idea. A short grep delivers 5 occurrences of likewise texts:
> 4
> >> at
> >>
> >>
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
> >> and one further below:
> >>
> >>
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
> >> I am not totally sure if the change can be applied on aloof them.
> >>
> >> BTW. Splitting the first 4 strings like the last would reduce the
> >> burden for our translators.
> >>
> >> Regards
> >> Frank
> >>
> >> Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
> >> :
> >>>
> >>> In the two years I've been reading this list, I think the single most
> >>> common question has been about this "could not obtain the lock"
> message.
> >>> Seems like someone asks about it at least once a week.
> >>>
> >>> The text "that database may be in use by another user," while literally
> >>> true, isn't helpful because it points to a less common case and gives
> no
> >>> guidance for the more common case. It's like hearing hoofbeats and
> >>> hypothesizing "zebra" instead of "horse".
> >>>
> >>> I suggest that improving the message would be a huge boon to less
> >>> experienced GC users, and very little effort for the developers.
> >>>
> >>> Why not replace the present text
> >>>
> >>>That database may be in use by another user, in which case you
> >>>should not open the database. What would you like to do?
> >>>
> >>> with this:
> >>>
> >>>If your previous session crashed, select Open Anyway. If this is
> >>>a shared database, wait for other users to finish using it or
> >>>select Open Read-Only. For more information, see (link to sec
> >>>2.5.3 of Tutorial).
> >>>
> >>> "What would you like to do?" can be omitted, in my opinion. Seeing
> >>> buttons, users will know that they need to pick one. What they _do_
> need
> >>> is text that is relevant to their situation.
> >>>
> >>> (I question the tutorial's advice to delete the lock files manually.
> >>> David Cousens reports:
>  My experience on Linux is that when you select Open
>  Anyway, the previous .LNK and .LCK files will be deleted and new ones
>  created which should then be deleted when GNucash is closed properly.
> >>> The same happens for me in Windows. Is there any OS where this
> desirable
> >>> behavior doesn't happen? If there is, the tutorial's advice should
> >>> mention those specific systems, or at least it should say that in
> >>> Windows and Linux GC will do this automatically when you reopen a data
> >>> file after the "could not obtain the lock" message.)
> >>>
> >>> --
> >>> Regards,
> >>> Stan Brown
> >>> Tompkins County, New York, USA
> >>> https://BrownMath.com
> >>> http://OakRoadSystems.com
> >>>
> >>>
> >>> On 2019-11-16 20:27, David Cousens wrote:
>  Kay
> 
>  If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
>  created in your data directory prevent you from opening GnuCash.
> >> Section
>  2.5.3 of the Tutorial guide covers them.
> 
>  .LCK file extensions.  My experience on Linux is that when you select
> >> Open
>  Anyway, the previous .LNK and .LCK files will be deleted and new ones
>  created which should then be deleted when GNucash is closed properly.
> >>> __

Re: [GNC] Locked out of gnucash

2019-11-17 Thread John Ralls
Except that the file was closed immediately after completing the session load. 
GnuCash will rename it and write a new one if you have made changes to the book 
in memory and tell it to save those changes or let it auto-save, but you can 
certainly close the session and so delete the lock file without saving.

It really is about the lock file, not the data file.

Regards,
John Ralls


> On Nov 17, 2019, at 4:24 PM, David Carlson  
> wrote:
> 
> A comment about Stan Brown's suggestion.
> 
> I think a better and more accurate wording would be "The data file has not
> been cleanly closed since it was last opened.  If you are sure that it was
> not opened by another user, click 'Open Anyway'.  Otherwise click one of
> the other options."
> 
> To me the important part is that the data file has not been cleanly closed,
> which is the real reason that the lock file exists.  There may be better
> words to use as long as this idea is incorporated.
> 
> David Carlson
> 
> On Sun, Nov 17, 2019 at 4:35 PM Frank H. Ellenberger <
> frank.h.ellenber...@gmail.com> wrote:
> 
>> Hello Stan et al.
>> 
>> I like the idea. A short grep delivers 5 occurrences of likewise texts: 4
>> at
>> 
>> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
>> and one further below:
>> 
>> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
>> I am not totally sure if the change can be applied on aloof them.
>> 
>> BTW. Splitting the first 4 strings like the last would reduce the
>> burden for our translators.
>> 
>> Regards
>> Frank
>> 
>> Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
>> :
>>> 
>>> In the two years I've been reading this list, I think the single most
>>> common question has been about this "could not obtain the lock" message.
>>> Seems like someone asks about it at least once a week.
>>> 
>>> The text "that database may be in use by another user," while literally
>>> true, isn't helpful because it points to a less common case and gives no
>>> guidance for the more common case. It's like hearing hoofbeats and
>>> hypothesizing "zebra" instead of "horse".
>>> 
>>> I suggest that improving the message would be a huge boon to less
>>> experienced GC users, and very little effort for the developers.
>>> 
>>> Why not replace the present text
>>> 
>>>That database may be in use by another user, in which case you
>>>should not open the database. What would you like to do?
>>> 
>>> with this:
>>> 
>>>If your previous session crashed, select Open Anyway. If this is
>>>a shared database, wait for other users to finish using it or
>>>select Open Read-Only. For more information, see (link to sec
>>>2.5.3 of Tutorial).
>>> 
>>> "What would you like to do?" can be omitted, in my opinion. Seeing
>>> buttons, users will know that they need to pick one. What they _do_ need
>>> is text that is relevant to their situation.
>>> 
>>> (I question the tutorial's advice to delete the lock files manually.
>>> David Cousens reports:
 My experience on Linux is that when you select Open
 Anyway, the previous .LNK and .LCK files will be deleted and new ones
 created which should then be deleted when GNucash is closed properly.
>>> The same happens for me in Windows. Is there any OS where this desirable
>>> behavior doesn't happen? If there is, the tutorial's advice should
>>> mention those specific systems, or at least it should say that in
>>> Windows and Linux GC will do this automatically when you reopen a data
>>> file after the "could not obtain the lock" message.)
>>> 
>>> --
>>> Regards,
>>> Stan Brown
>>> Tompkins County, New York, USA
>>> https://BrownMath.com
>>> http://OakRoadSystems.com
>>> 
>>> 
>>> On 2019-11-16 20:27, David Cousens wrote:
 Kay
 
 If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
 created in your data directory prevent you from opening GnuCash.
>> Section
 2.5.3 of the Tutorial guide covers them.
 
 .LCK file extensions.  My experience on Linux is that when you select
>> Open
 Anyway, the previous .LNK and .LCK files will be deleted and new ones
 created which should then be deleted when GNucash is closed properly.
>>> ___
>>> gnucash-user mailing list
>>> gnucash-user@gnucash.org
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> If you are using Nabble or Gmane, please see
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>>> -
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash

Re: [GNC] Locked out of gnucash

2019-11-17 Thread Frank H. Ellenberger
Am Mo., 18. Nov. 2019 um 01:24 Uhr schrieb David Carlson
:
:
There are a few other reasons, where I already have run in:

> "The data file has not been cleanly closed since it was last opened.  If you 
> are sure that it was not opened by another user, click 'Open Anyway'.  
> Otherwise click one of the other options."

... by another user or yourself, probably on another screen  or computer, ...

> To me the important part is that the data file has not been cleanly closed, 
> which is the real reason that the lock file exists.  There may be better 
> words to use as long as this idea is incorporated.
>
> David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-17 Thread David Carlson
A comment about Stan Brown's suggestion.

I think a better and more accurate wording would be "The data file has not
been cleanly closed since it was last opened.  If you are sure that it was
not opened by another user, click 'Open Anyway'.  Otherwise click one of
the other options."

To me the important part is that the data file has not been cleanly closed,
which is the real reason that the lock file exists.  There may be better
words to use as long as this idea is incorporated.

David Carlson

On Sun, Nov 17, 2019 at 4:35 PM Frank H. Ellenberger <
frank.h.ellenber...@gmail.com> wrote:

> Hello Stan et al.
>
> I like the idea. A short grep delivers 5 occurrences of likewise texts: 4
> at
>
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
> and one further below:
>
> https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
> I am not totally sure if the change can be applied on aloof them.
>
> BTW. Splitting the first 4 strings like the last would reduce the
> burden for our translators.
>
> Regards
> Frank
>
> Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
> :
> >
> > In the two years I've been reading this list, I think the single most
> > common question has been about this "could not obtain the lock" message.
> > Seems like someone asks about it at least once a week.
> >
> > The text "that database may be in use by another user," while literally
> > true, isn't helpful because it points to a less common case and gives no
> > guidance for the more common case. It's like hearing hoofbeats and
> > hypothesizing "zebra" instead of "horse".
> >
> > I suggest that improving the message would be a huge boon to less
> > experienced GC users, and very little effort for the developers.
> >
> > Why not replace the present text
> >
> > That database may be in use by another user, in which case you
> > should not open the database. What would you like to do?
> >
> > with this:
> >
> > If your previous session crashed, select Open Anyway. If this is
> > a shared database, wait for other users to finish using it or
> > select Open Read-Only. For more information, see (link to sec
> > 2.5.3 of Tutorial).
> >
> > "What would you like to do?" can be omitted, in my opinion. Seeing
> > buttons, users will know that they need to pick one. What they _do_ need
> > is text that is relevant to their situation.
> >
> > (I question the tutorial's advice to delete the lock files manually.
> > David Cousens reports:
> > >  My experience on Linux is that when you select Open
> > > Anyway, the previous .LNK and .LCK files will be deleted and new ones
> > > created which should then be deleted when GNucash is closed properly.
> > The same happens for me in Windows. Is there any OS where this desirable
> > behavior doesn't happen? If there is, the tutorial's advice should
> > mention those specific systems, or at least it should say that in
> > Windows and Linux GC will do this automatically when you reopen a data
> > file after the "could not obtain the lock" message.)
> >
> > --
> > Regards,
> > Stan Brown
> > Tompkins County, New York, USA
> > https://BrownMath.com
> > http://OakRoadSystems.com
> >
> >
> > On 2019-11-16 20:27, David Cousens wrote:
> > > Kay
> > >
> > > If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
> > > created in your data directory prevent you from opening GnuCash.
> Section
> > > 2.5.3 of the Tutorial guide covers them.
> > >
> > > .LCK file extensions.  My experience on Linux is that when you select
> Open
> > > Anyway, the previous .LNK and .LCK files will be deleted and new ones
> > > created which should then be deleted when GNucash is closed properly.
> > ___
> > gnucash-user mailing list
> > gnucash-user@gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If 

Re: [GNC] Locked out of gnucash

2019-11-17 Thread Frank H. Ellenberger
Hello Stan et al.

I like the idea. A short grep delivers 5 occurrences of likewise texts: 4 at
https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L276
and one further below:
https://github.com/Gnucash/gnucash/blob/de09259f13e8e3d7f2e50f97a353bd22eb45a4b6/gnucash/gnome-utils/gnc-file.c#L768
I am not totally sure if the change can be applied on aloof them.

BTW. Splitting the first 4 strings like the last would reduce the
burden for our translators.

Regards
Frank

Am So., 17. Nov. 2019 um 08:22 Uhr schrieb Stan Brown
:
>
> In the two years I've been reading this list, I think the single most
> common question has been about this "could not obtain the lock" message.
> Seems like someone asks about it at least once a week.
>
> The text "that database may be in use by another user," while literally
> true, isn't helpful because it points to a less common case and gives no
> guidance for the more common case. It's like hearing hoofbeats and
> hypothesizing "zebra" instead of "horse".
>
> I suggest that improving the message would be a huge boon to less
> experienced GC users, and very little effort for the developers.
>
> Why not replace the present text
>
> That database may be in use by another user, in which case you
> should not open the database. What would you like to do?
>
> with this:
>
> If your previous session crashed, select Open Anyway. If this is
> a shared database, wait for other users to finish using it or
> select Open Read-Only. For more information, see (link to sec
> 2.5.3 of Tutorial).
>
> "What would you like to do?" can be omitted, in my opinion. Seeing
> buttons, users will know that they need to pick one. What they _do_ need
> is text that is relevant to their situation.
>
> (I question the tutorial's advice to delete the lock files manually.
> David Cousens reports:
> >  My experience on Linux is that when you select Open
> > Anyway, the previous .LNK and .LCK files will be deleted and new ones
> > created which should then be deleted when GNucash is closed properly.
> The same happens for me in Windows. Is there any OS where this desirable
> behavior doesn't happen? If there is, the tutorial's advice should
> mention those specific systems, or at least it should say that in
> Windows and Linux GC will do this automatically when you reopen a data
> file after the "could not obtain the lock" message.)
>
> --
> Regards,
> Stan Brown
> Tompkins County, New York, USA
> https://BrownMath.com
> http://OakRoadSystems.com
>
>
> On 2019-11-16 20:27, David Cousens wrote:
> > Kay
> >
> > If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
> > created in your data directory prevent you from opening GnuCash. Section
> > 2.5.3 of the Tutorial guide covers them.
> >
> > .LCK file extensions.  My experience on Linux is that when you select Open
> > Anyway, the previous .LNK and .LCK files will be deleted and new ones
> > created which should then be deleted when GNucash is closed properly.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-17 Thread Fred Bone
On 16 November 2019 at 19:17, Kay Robinson said:

> Hi
> 
> Whilst gnucash was minimised on my toolbar I had a short power outage.
> When I re-booted the system I couldn't open my accounts because 'another
> user was using them' I chose to open anyway, but couldn't save a change I
> made. 

What do you mean by "couldn't save"? What happened when you tried?
- "Save" greyed-out on the "File" menu?
- Error message when you ran "save"?
- No error indication but file not updated?
- ???

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-16 Thread Stan Brown
In the two years I've been reading this list, I think the single most
common question has been about this "could not obtain the lock" message.
Seems like someone asks about it at least once a week.

The text "that database may be in use by another user," while literally
true, isn't helpful because it points to a less common case and gives no
guidance for the more common case. It's like hearing hoofbeats and
hypothesizing "zebra" instead of "horse".

I suggest that improving the message would be a huge boon to less
experienced GC users, and very little effort for the developers.

Why not replace the present text

That database may be in use by another user, in which case you
should not open the database. What would you like to do?

with this:

If your previous session crashed, select Open Anyway. If this is
a shared database, wait for other users to finish using it or
select Open Read-Only. For more information, see (link to sec
2.5.3 of Tutorial).

"What would you like to do?" can be omitted, in my opinion. Seeing
buttons, users will know that they need to pick one. What they _do_ need
is text that is relevant to their situation.

(I question the tutorial's advice to delete the lock files manually.
David Cousens reports:
>  My experience on Linux is that when you select Open
> Anyway, the previous .LNK and .LCK files will be deleted and new ones
> created which should then be deleted when GNucash is closed properly.
The same happens for me in Windows. Is there any OS where this desirable
behavior doesn't happen? If there is, the tutorial's advice should
mention those specific systems, or at least it should say that in
Windows and Linux GC will do this automatically when you reopen a data
file after the "could not obtain the lock" message.)

-- 
Regards,
Stan Brown
Tompkins County, New York, USA
https://BrownMath.com
http://OakRoadSystems.com


On 2019-11-16 20:27, David Cousens wrote:
> Kay
> 
> If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
> created in your data directory prevent you from opening GnuCash. Section
> 2.5.3 of the Tutorial guide covers them.
> 
> .LCK file extensions.  My experience on Linux is that when you select Open
> Anyway, the previous .LNK and .LCK files will be deleted and new ones
> created which should then be deleted when GNucash is closed properly.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-16 Thread David Carlson
Kay,

If you happened to use the Open Read-Only option instead of the Open Anyway
option, you will not be able to use the Save option but will have to Save
As a different filename.  If you do use the Open Anyway option you should
be able to Save the file with the same filename.

David Carlson

On Sat, Nov 16, 2019 at 7:26 PM David Cousens 
wrote:

> Kay
>
> If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
> created in your data directory prevent you from opening GnuCash. Section
> 2.5.3 of the Tutorial guide covers them.
>
> 2.5.3. Lock files (.LNK and .LCK)
> You may occasionally see .LNK and .LCK files appear. These do not store any
> data, but they are created to prevent more than one user from opening the
> same file at the same time. These files are automatically created when you
> open the file, to lock it so no one else can access it. When you close your
> GnuCash session or open another file, GnuCash unlocks the first data file
> by
> deleting the .LCK and .LNK files.
>
> If GnuCash crashes while you have a data file open, the .LCK and .LNK files
> are not deleted. The next time you try to open GnuCash, you will get a
> warning message that the file is locked. The warning message appears
> because
> the .LNK and .LCK files are still in your directory. It is safe to choose
> Yes to open the file, but you should delete the .LNK and .LCK files (using
> a
> terminal window or your file manager). Once those files are deleted, you
> will not get the warning message again unless GnuCash crashes.
>
> You will need to use your file manager to delete the files with these
> extensions in the folder/directory in which your main file resides. They
> should have the same filename as your main data file but with the .LNK and
> .LCK file extensions.  My experience on Linux is that when you select Open
> Anyway, the previous .LNK and .LCK files will be deleted and new ones
> created which should then be deleted when GNucash is closed properly.
> There
> is no need to use a new file name unless you explicitly want to change the
> name of the data file.
>
> Many of GnuCash's operations automatically save data into the datafile so
> nothing may happen when you hit the Save button (it is usually greyed out
> in
> these circumstances) if you have not created data which is not saved
> implicitly.
>
> David Cousens.
>
>
>
>
>
> -
> David Cousens
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Locked out of gnucash

2019-11-16 Thread David Cousens
Kay

If GnuCash is not closed properly,e.g. a crash the .LNK and .LCK files
created in your data directory prevent you from opening GnuCash. Section
2.5.3 of the Tutorial guide covers them.

2.5.3. Lock files (.LNK and .LCK)
You may occasionally see .LNK and .LCK files appear. These do not store any
data, but they are created to prevent more than one user from opening the
same file at the same time. These files are automatically created when you
open the file, to lock it so no one else can access it. When you close your
GnuCash session or open another file, GnuCash unlocks the first data file by
deleting the .LCK and .LNK files.

If GnuCash crashes while you have a data file open, the .LCK and .LNK files
are not deleted. The next time you try to open GnuCash, you will get a
warning message that the file is locked. The warning message appears because
the .LNK and .LCK files are still in your directory. It is safe to choose
Yes to open the file, but you should delete the .LNK and .LCK files (using a
terminal window or your file manager). Once those files are deleted, you
will not get the warning message again unless GnuCash crashes.

You will need to use your file manager to delete the files with these
extensions in the folder/directory in which your main file resides. They
should have the same filename as your main data file but with the .LNK and
.LCK file extensions.  My experience on Linux is that when you select Open
Anyway, the previous .LNK and .LCK files will be deleted and new ones
created which should then be deleted when GNucash is closed properly.  There
is no need to use a new file name unless you explicitly want to change the
name of the data file.

Many of GnuCash's operations automatically save data into the datafile so
nothing may happen when you hit the Save button (it is usually greyed out in
these circumstances) if you have not created data which is not saved
implicitly.

David Cousens.





-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.