Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i want to start a java application at start up. I added the script file in init.d and the process got started .

But the owner of the process is root. So when the java process is trying to write a file in my home i am getting permission error.

How can i start the process from the user scope rather than the root scope?

share|improve this question
    
askubuntu.com/questions/106941/… –  ripper234 Mar 15 '12 at 13:36
add comment

2 Answers 2

I don't have the time to retype everything I had written to this question on Stack Overflow, but some pointers you may want:

First, @reboot specifier in the crontab(5) makes it easy to run a program as a user on boot.

Second, writing an upstart job specification to run a program as service is pretty straightforward. The documentation is poor, but there are many examples in /etc/init.d/. start-stop-daemon(8) is fantastic -- be sure to read its manpage before you try to re-invent the wheel.

share|improve this answer
2  
you could give a link to your answer on StackOverflow... –  xubuntix Nov 14 '11 at 10:23
    
@xubuntix: karthick deleted his question seconds before I clicked "submit answer" and I wound up re-using that browser tab for something else eventually. –  sarnold Nov 14 '11 at 10:26
add comment

You can make applications automatically start for your user by adding them to the "Startup Applications" in Ubuntu 11.10 (look for it in drush search)

for older Ubuntu versions: System > Preferences > Sessions

share|improve this answer
1  
I dont have access to the user interface. –  karthick Nov 14 '11 at 10:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.