LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2010, 06:18 AM   #1
ainsworth
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
Starting application on boot


I have Ubuntu 10.10 installed on my pc with XBMC installed. It's set to boot into xbmc on start up and works fine. I also have squeezebox server (a music server for my network) installed and again don't have any trouble. I'd now like to get squeezeslave running, a client for squeezebox server so I added the following lines to /etc/init.d/local:

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
squeezeslave -o0 -r3 192.168.1.3 &
exit 0

This fails to start the client on boot, however if I ssh into the machine and run /etc/init.d/local it runs fine.

Any idea what I'm doing wrong?
 
Old 12-11-2010, 06:43 AM   #2
smart_shell
Member
 
Registered: May 2009
Location: NYC
Distribution: Ubuntu 10.04 LTS
Posts: 52

Rep: Reputation: 0
Hi,try
1. add to /etc/init.d/myscript
2. update-rc.d myscript
3. chmod -x myscript

Last edited by smart_shell; 12-11-2010 at 06:46 AM.
 
Old 12-11-2010, 06:48 AM   #3
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,467

Rep: Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371
Remove the PATH line and add an absolute path to the squeezeslave executable e.g.
/usr/bin/squeezeslave -o0 -r3 192.168.1.3 &

Note: Check the absolute path with 'which squeezeslave'

The program is probably failing to start because is not in the path when /etc/init.d/local is run at boot, but when you ssh in, the program is now in the path.
 
Old 12-11-2010, 07:11 AM   #4
smart_shell
Member
 
Registered: May 2009
Location: NYC
Distribution: Ubuntu 10.04 LTS
Posts: 52

Rep: Reputation: 0
Quote:
Originally Posted by allend View Post
Remove the PATH line and add an absolute path to the squeezeslave executable e.g.
/usr/bin/squeezeslave -o0 -r3 192.168.1.3 &

Note: Check the absolute path with 'which squeezeslave'

The program is probably failing to start because is not in the path when /etc/init.d/local is run at boot, but when you ssh in, the program is now in the path.
yes, or add the path var in console
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
and try to run your program
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Gnome and starting an application on boot shaunom Linux - Software 1 04-14-2008 05:16 AM
Program starting other application Mart777 Linux - General 3 04-04-2008 03:02 PM
Vodafone Application not starting CrownAmbassador Linux - Software 5 02-18-2008 07:59 AM
starting application on boot shukla_chanchal Linux - General 6 11-14-2005 09:22 AM
Starting an application at boot ftwomey Linux - Newbie 3 04-25-2004 08:07 AM


All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration