[Lazarus] Running and debugging application via gksu

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 8 23:04:34 CEST 2010


On Fri, 8 Oct 2010 15:53:42 -0500
Andrew Brunner <andrew.t.brunner at gmail.com> wrote:

> I'm needing to elevate my application and the easiest way to do it is
> to start off the program with gksu.  I've explored the Run menu with
> options but fail to get Lazarus to start my application via gksu when
> I hit "Run" inside the IDE.
> 
> Anyone know how to get Lazarus to pass all these options to the
> command line during "Run" but start off with gksu?  I really don't
> want to run Lazaruse IDE as root using gksu (but if i do, I get the
> desired effect).  The problem with running Lazarus as root is the
> units get assigned as root when they are saved :-)
> 
> Any help is greatly appreciated.

You can run the project via gksu with the 'launching application'.
But afaik the IDE debugger does not yet support this. So your project
is only executed but without debugger support.

You can of course debug via command line:

sudo gdb ./yourproject

Or run the IDE as root.

Mattias




More information about the Lazarus mailing list