PDA

View Full Version : [ubuntu] How to Create a start up service?



sai438
December 15th, 2008, 07:59 AM
Hi,
I'm a newbie,i wanted to create a service for STAF (Software Testing Automation Framework) which will start at the time of bootup. How can i create that. I actually created service of STAF in fedora which will start while booting. I want to do that for Ubuntu as i migrated to Ubuntu from fedora. can any one please help me out of this??


Thanks in advance,
sairam

xjcannonx
December 15th, 2008, 08:05 AM
Well, i don't really know about STAF but you can have programs you want to start by adding them in session preferences by going to System (on the gnome panel) and then go to preferences-->sessions, and add a new program to start up

sai438
December 15th, 2008, 08:08 AM
Well, i don't really know about STAF but you can have programs you want to start by adding them in session preferences by going to System (on the gnome panel) and then go to preferences-->sessions, and add a new program to start up
thanks for the reply, but i'm having minimal image which doesn't have GUI. how can i do that in console mode?

xjcannonx
December 15th, 2008, 08:31 AM
well i think you could edit the /etc/rc.local file. It loads at bootup and anything added to it should start as well. cd into /etc and edit the file by
sudo nano rc.local edit the file before the "exit 0" and save it by ctrl-x and y to save

sai438
December 15th, 2008, 08:37 AM
Actually i want to start it as service, not as a part of rc.local file. If i want to restart the service without restarting the machine, its not possible right? I guess you understood my problem.

--sairam

xjcannonx
December 15th, 2008, 09:50 AM
ok well see if you can edit your autostart file .config/autostart and create a file in there
nano filename and then put something alone these lines in the file
[Desktop Entry]
Encoding=UTF-8
Version=Beta2
Type=Application
Name=YOURFILENAME
Comment=
Exec=firefox
StartupNotify=false
Terminal=false
Hidden=falseI am not sure if all this is necessary or if it will work or not, but hopefully it does...

sai438
December 15th, 2008, 11:01 AM
Thanks for the reply, but i did it another way. I created a soft link of the startup script at /etc/init.d directory to /etc/rcS.d directory as S98stafd and rebooted my machine and it worked.