How to move lockfiles to OS temp directory?

I prefer that my document mutexes present in the operating system’s standard temporary file directory, rather than alongside the original document. It tends to clutter things there. Is there a setting for this?

There is no setting for this.

… and that doesn’t make sense anyway. The idea of lock files is inform another LibreOffice program, running on a different session/system, that the file is locked by someone. So where should that other program look for the lock file? How could it know who opened the file to try to look into that specific temp directory; and how would it access it there?

vim has such settings in .vimrc. Apparently, only libreoffice want access these files and libreoffice, like vim, should read some initial settings like .vimrc to know where the backupdir is located.

set directory=C:\tmp
set backupdir=C:\tmp
set undodir=C:\tmp

Vim’s backupdir setting controls where Vim stores backup files, which are copies of your edited files before you save. This helps prevent data loss if you make a mistake or Vim crashes. The backupdir is a comma-separated list of directories where Vim creates backup file.

It is not necessarily your LibreOffice. Think of a multi-user network. My LibreOffice will know nothing of other users .anyrc-files, and especially not being allowed to read another users files. (Ok,vas admin I could change this…)
.
PS:: This thread is nearly 5 years old. Do you really think, it is needing a continuation?

Hi

Thanks for your reply. I google searched to this thread. I just want to share my comment.

I wonder how Excel handle this? I don’t see a .lock.xxxx.xlsx# file when using Excel, which is also a multi-user application.

Can you lock the thread if you are seriously about not want people to reply to an old-thread 5 years old?

Excel 2010 uses a lock file in the form ~$filename.xlsx so precedes the filename with ~$

1 Like

No, we don’t want to lock threads. Any thread, even an old one like this, may get a useful addendum, a new solution - e.g., based on a new functionality or a smart hack.

But these old questions don’t need visionary suggestions like “libreoffice, like vim, should read some initial settings” (I don’t even talk about people making such suggestions reading the existing discussion first, and thinking about how LibreOffice would be able to use such lockfiles from different systems / user sessions - and if there’s no access from different systems, then lockfiles wouldn’t be needed, and may be disabled, which is already possible).

Sure. I am not familiar with the function of this forum. I should just click reply but not “suggest a solution”. I apologize for that.

Technically, it is feasible to implement such features but chosing not to do so is a different story to tell. Actually such trivial feature is not necessary if it is not available.

I think I didn’t ask anyone to do anything, do I? If my tone sounds like it, I apologize.

Strictly speaking, feature requests are off-topic here. And your idea definitely looks like one :slight_smile:

But again: it’s not “it is feasible to implement such features”, nor “such trivial feature is not necessary if it is not available”. Rather, what you are asking for is not a possible feature (or at least I don’t see how could it be of any use): having this idea implemented, it won’t improve anything. You either need to have the lockfile next to the main file; or you don’t need the lockfile at all. I don’t see any scenario, where you need a lockfile, but it should be in a different place.

1 Like

I think I’d better shut off my mouse to leave you alone here. It seems you need some emotional support. Whatever you said is correct. Ok?

I guess No one is paying anybody to implement any feature in libre office or open source software. So I think the only word I want to say is that your sense of charitable contributions is appreciated.

You seem to misunderstand me; I may of course express myself poorly (I’m not a native English speaker). But everything I wrote above didn’t discuss any “charitable contributions” (whatever that might mean). I wrote that there seem to be some misunderstanding - or maybe an XY problem - of people who want for some reason to move the lockfile to some directory - it seems to me that their real need is to get rid of lockfiles in the directory, and they actually don’t need the lockfiles at all (likely, they don’t use files in a shared fashion); but they don’t realize, that the lockfiles may be disabled completely (yes, there already is that option); and they imagine, that lockfiles are inevitable, but that it could be possible to decide where to keep them. They don’t realize the actual purpose of lockfiles → hence they don’t understand, that the lockfiles in any other directory wouldn’t make sense, thus this imagined feature of moving lockfiles wouldn’t make sense, either. But the XY problem results in some emotions of people who are told that their idea is not reasonable.

1 Like

And imho you are quite wrong on this…

1 Like