Custom build target require user input on build console...

General questions regarding the usage of CodeLite
zainka
CodeLite Curious
Posts: 7
Joined: Mon Mar 15, 2010 11:18 pm
Genuine User: Yes
IDE Question: C++
Contact:

Custom build target require user input on build console...

Post by zainka »

I try to create a custom build target which requires sudo rights. This new target will do a "sudo make install" into a root folder.
Creating the build target is simple and it works and is starting by asking for user credentials. However, I am not able to give any input to the build console thus the build will not continue. I need a way to give credentials. How can this be accomplished? Meantime I can do it from command line.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Custom build target require user input on build console...

Post by eranif »

You should do this:

Instead of using command like this:

Code: Select all

sudo make install
Change it to:

Code: Select all

sudo -A make install
Set this environment variable into codelite from the "Settings | Environment variables" menu:

Code: Select all

SUDO_ASKPASS=/usr/bin/ssh-askpass
Now when running the install target, a dialog will pop asking for the sudo password
Eran
Make sure you have read the HOW TO POST thread
zainka
CodeLite Curious
Posts: 7
Joined: Mon Mar 15, 2010 11:18 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Custom build target require user input on build console...

Post by zainka »

Greate, Thankyou
Post Reply