Forum > Editor

Writing error when selection gets highlighted

(1/3) > >>

Rbart:
Hi,

I am getting this error all the time when writing in a unit of a form. It seems to appear when the IDE highlights the code on multiple line or when it want to autocomplete.
The error message is: "Unable to write "/usr/share/lazarus/2.2.6/docs/lcl/menus.xml"
This is annoying. It shows up when typing or selecting code. Why does the IDE want to go write to these xml files?
Am I alone to get this message? What did I do wrong?
How to solve this?
I am on Ubuntu 22.04 with Lazarus 2.2.6

Thank you for your help,
Rbart

Thaddy:
Make the folder writable or better, make the folder writable for the user.

Martin_fr:
Do you still have the "FPDoc Editor" window open? https://forum.lazarus.freepascal.org/index.php/topic,65430.msg498544.html#msg498544

Because, as indicated, it may be the one writing to that file.

Otherwise, if you rebuild your IDE with -gl (Tools > Configure build Lazarus), and start it from a console (so it can write to the console) then maybe (just maybe / hopefully) it will print more info (including a stacktrace).


dbannon:

--- Quote from: Thaddy on December 10, 2023, 11:30:49 am ---Make the folder writable or better, make the folder writable for the user.

--- End quote ---

No, absolutely NOT.  The directory that Lazarus (?) is trying to write to, as an ordinary user, is up in the /usr/share tree.  An ordinary user should not be trying to write there. Making that directory writable is only dealing with the symptom of the problem, the underlying problem will almost certainly manifest it self in some other way as well. (*)

RBart, is there a reason you have the FPDoc tool opening those files ?  Are you updating documentation as you go ?  Great if you are but don't work on a read only file. Make a copy of that file locally or, if you wish to jump around between them, remove your Package installed lazarus and build Lazarus from source, in your own home directory where you write to them all you like.

Very few people find a need to use FPDoc except to update documentation in my view.

Davo

(*) - Its a well know fact the the underlying cause of the fall of the Roman Empire was they started to play with read only permissions in certain file system.





TRon:

--- Quote from: dbannon on December 11, 2023, 12:13:45 am ---No, absolutely NOT.  The directory that Lazarus (?) is trying to write to, as an ordinary user, is up in the /usr/share tree.  An ordinary user should not be trying to write there. Making that directory writable is only dealing with the symptom of the problem, the underlying problem will almost certainly manifest it self in some other way as well. (*)

--- End quote ---
+1

And anyone reading this and attempting to solve it with running Lazarus as root or providing yourself root permissions in order to circumvent the issue: DON'T. Instead inform yourself on your choice of operating system and obey its rules instead of trying to work around the issue.  Never ever should you require any permission in order to develop software on whatever operating system. For the purists amongst us: the exceptions  to that strict rule is of no concern to/for ordinary users and in case you do not consider yourself an ordinary user then you (should) know what you should do to provide yourself the permissions that are required and doing so in a safe manner.

Navigation

[0] Message Index

[#] Next page

Go to full version