Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-03

Lazarus Digest, Vol 121, Issue 49

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chavoux Luyt

Hi

I am feeling very stupid now, but not sure where exactly to look. I installed Lazarus using aptitude on Debian (under /use/libs/lazarus). However, I see that that whole directory tree belongs to root. So if I install a new package, how does it get added to the IDE (since I am running lazarus as a normal user)? Should the installation not give the lazarus directories to the users group instead of root? I suppose there is some kind of magic involved that makes it work when recompiling the IDE with the new packages, but I would like to understand what.

Thanks,
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180302/32e7b29c/attachment.html>

Reply by email

Mattias Gaertner
to Chavoux Luyt
Show quoted text 7 lines
Hi I am feeling very stupid now, but not sure where exactly to look. I installed Lazarus using aptitude on Debian (under /use/libs/lazarus). However, I see that that whole directory tree belongs to root. So if I install a new package, how does it get added to the IDE (since I am running lazarus as a normal user)?

The IDE notices that the default directories are read only and puts the files instead under ~/.lazarus/lib/.

Should the installation not give the lazarus directories to the users group instead of root?

No, that would be a security hazard.
Of course you can install Lazarus in your home directory as your user. The debian packages are not made for that. You can for example use svn.

I suppose there is some kind of magic involved that makes it work when recompiling the IDE with the new packages, but I would like to understand what.

Mattias

Reply by email

Giuliano Colla
to Chavoux Luyt: Hi I am feeling very stupid now, but not sure where exactly to look. I installed Lazarus…

Il 01/03/2018 23:44, Chavoux Luyt via Lazarus ha scritto:

I suppose there is some kind of magic involved that makes it work when recompiling the IDE with the new packages, but I would like to understand what.

The magic is performed by Lazarus IDE, and by startlazarus.

If Lazarus IDE detects that your installation directory is read-only, when recompiling it will put the new Lazarus copy in your home directory (~/.lazarus/...)

When you launch Lazarus via startlazarus, it will check if your home directory holds a Lazarus newer than the one in installation directory. If such is the case it will launch your personal copy.

If you happen to update Lazarus, then the system copy in /usr/lib will be newer than your personal copy. In that case startlazarus will ask you which one you want to start. If you choose to launch the newly installed copy, the IDE will detect that your additional packages are missing and will add them to the list of required packages. Recompiling the IDE will add those packages and create a new personal copy, which now becomes newer than the system one, and you are properly set.

Giuliano

Reply by email