[Lazarus] lazarus as normal user

Mattias Gärtner nc-gaertnma at netcologne.de
Thu Feb 18 15:39:49 CET 2010


Zitat von Pino Zollo <pinozollo at gmail.com>:

> Hi to the list,
> I am just a beginner with lazarus....
>
> I have installed it on my Debian 5.01....first fpc an then I have compiled
> lazarus from sources copied in /usr/src/lazarus.

A note in general, not only for lazarus: this is uncommon. You can  
install software to /usr/... But you compile software as normal user  
in in your home directory, in any sub directory you like for example  
/home/username/lazarus.


> It happens that all goes fine if I run lazarus as root (deprecated by Debian)

You should not run lazarus as root. Lazarus is a development tool and  
therefore lets you run buggy/untested software.


> from /usr/src/lazarus...I can compile examples and run them.

If you want to compile an example, copy it to your home directory.


> I can even install new components and they appear into the IDE.

You can install components as normal user too.


> The problem rises if I run lazarus as normal user.
>
> Having made "make install" now I have /usr/local/bin/lazarus-ide
> available to all users .
>
> If I run /usr/local/bin/lazarus-ide I have a hell of problems:
>
> Units are not found anymore when compiling examples:
> For any subdir I have to add into fpc.cfg a new entry -uF ....

Please undo these modifications to fpc.cfg. Normally you don't need to  
edit fpc.cfg. I myself never touch fpc.cfg, except for linker  
tools/paths.


> When lazarus rebuilds for a new components it does it to the
> original /usr/src/lazarus but then it is /usr/local/bin/lazarus-ide
> that is restarted....so I do not see any change into the IDE.

The IDE is just a single binary. You can set the lazarus directory  
under environment / options / files / lazarus directory


> I have tried to compile lazarus as a normal user having the sources
> in /home/myuser/lazarus but this does not succeed.

This is the normal way.
Maybe you copied the directory /usr/share/lazarus to  
/home/myuser/lazarus? Then the permissions and ownerships were copied  
too. You can change the ownership with:

chown myuser.myuser -R /home/myuser/lazarus

1. Fix your fpc.cfg
2. Fix the ownership of /home/myuser/lazarus
3. remove the files in /home/myuser/.lazarus/
4. compile lazarus with
cd /home/myuser/lazarus
make clean all
5. start lazarus with
./lazarus

You can setup a desktop item with path
/home/myuser/lazarus/lazarus

Mattias







More information about the Lazarus mailing list