View Single Post
Posts: 26 | Thanked: 97 times | Joined on Dec 2011
#59
Originally Posted by wolke View Post
Originally Posted by GuSec View Post
I've tried for hours now. It is impossible to get it to autostart. Seriously what should I do?
Code:
exec /usr/bin/aegis-exec -s -u user sh -c 'source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor'
#exec sh -c 'source /etc/profile; PATH=$PATH:/usr/local/bin; develsh -c n9-button-monitor'
#exec /usr/bin/aegis-exec -s -u user sh -c 'DISPLAY=:0 n9-button-monitor'
How can I debug it?

Now I can't start it at all from terminal. Can't get necessary permissions from develsh. How is this possible? Is aegis having fun giving permissions one day and blocking them the next?
sucks. i also had tons of trouble getting my autostart script to work, and that was on openmode.

my current hypothesis for your problem is that its running at startup with incorrect permissions, and then somehow mucking you up.
"You are holding it wrong."


Your approach won't work even with Inception. You have to do a proper debian package, which contains the needed _aegis and digsigsums files. Otherwise "root" will not be able to execute the scripts or python application as "user". Aegis-exec won't give you permissions, if those aren't requested in the first place (during installation).

Here is an example _aegis file:
Code:
<aegis>
        <request>
                <credential name="UID::user" />
                <credential name="GID::users" />
                <credential name="GRP::users" />
                <for path="/opt/n9-button-monitor/start.sh" />
                <for path="/opt/n9-button-monitor/stop.sh" />
                <for path="/opt/n9-button-monitor/n9-button-monitor.py" />
        </request>
</aegis>
You should find out, which credentials your application needs in addition to the listed above. There will be no need to use "develsh" in order to start the application, when you have included the needed credentials in the _aegis file.

The upstart script will work after installing a debian package with this file and correct digsigsums included. Digsigsums should be added for "n9-button-monitor.py", "start.sh" and "stop.sh". In order to autostart the application as "user", you need to execute it like this:
Code:
exec /usr/bin/aegis-exec -s -l -u user /opt/n9-button-monitor/start.sh
All third party upstart scripts must be in "/etc/init/apps" or they won't be executed during startup.
 

The Following User Says Thank You to Jare For This Useful Post: