LinuxQuestions.org
Visit Jeremy's Blog.
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 11-15-2008, 10:58 AM   #1
Suicidal9090
LQ Newbie
 
Registered: Apr 2007
Location: Hamilton, Ontario
Distribution: BSD 7.0 / BT 3.0
Posts: 28

Rep: Reputation: 15
run a script on Server Startup


Ok well my problem is that I need to start a script on startup AFTER Xserver has booted... the reason for this is because synergyc (Synergy Client) wont run unless Xserver has already booted. I tried like 100 things on google to get the client to start automatically before userlogin, but nothing worked so i made my own walk around:

I made a simple script that starts synergy and I just dont know where I can place the script to run once the server has booted.

This is what i did:

1. I created my script under init.d called synergy-client-startup.sh
2. Then I made the script executable: sudo chmod +x /etc/init.d/synergy-client-startup.sh
4. Then I made it run on system boot: sudo update-rc.d synergy-client-startup.sh defaults

But when ubuntu boots it seems to load before a lot of things.. is there anyway I can maybe get this script to run LAST after everything else had ran for bootup?

Thanks,

-Sean

p.s I tried to add a lot of detail. let me know if you need anything else to assist me!!
 
Old 11-15-2008, 11:22 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
if you are using GNOME put the script in the startup programs
system=>preferences=>sessions
 
Old 11-15-2008, 01:57 PM   #3
Suicidal9090
LQ Newbie
 
Registered: Apr 2007
Location: Hamilton, Ontario
Distribution: BSD 7.0 / BT 3.0
Posts: 28

Original Poster
Rep: Reputation: 15
But will that work on bootup? before I log in with a user? this way i can totally get rid of the mouse and kayboard from that machine - which overall is my goal.
 
Old 11-15-2008, 02:02 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
You an put the script in
/etc/rc.local

Quote:
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
depending on the distribution the filename and/or location can change
 
  


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
Run script at startup? HOW? Stephan_Craft Linux - Newbie 2 09-03-2008 07:24 PM
Run Script on Startup aneesali Linux - Newbie 2 06-23-2007 02:55 PM
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
Run Script at Startup?? usaf_sp SUSE / openSUSE 5 11-11-2005 02:43 PM
get a script to run on startup kram Debian 3 04-23-2005 03:23 PM


All times are GMT -5. The time now is 11:13 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