Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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
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

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
I dont have access to the user interface. – karthick Nov 14 '11 at 10:33

Your Answer


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.