2

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?

Jorge Castro
  • 73,717
karthick
  • 131

2 Answers2

1

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.

sarnold
  • 1,966
  • 17
  • 20
0

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

htorque
  • 66,086
Denis
  • 1,013