Friday, 29 May 2009

Automatic Startup of uShare on Jaunty Jackalope (9.04)

Issue: Because I am running wireless the ushare would always fail to load because it was loading to quickly before the wireless had a chance to reconnect with the router.


Solution

Created a simple script with the following lines:

sleep 10
ushare -x -c /sharepath

This makes it so that it waits 10 seconds before running the command. Then make the script executable.

sudo chmod -x scriptname

Add the script to the Startup Applications list:

System >> Preferences >> Startup Applications

create a new entry and point the command to the script you created.

Now reboot and test if it works, if it doesnt you may need to add more time to the sleep command in the script.

1 comments:

Steven said...

An easyer way to do this is to add 'sh -c "sleep 10 && ushare -x -c /sharepath &"' (without the single quotes) to the startup applications. This bypasses the need for a bash script.
When using your method one should put an '&' after the command so that the bash instance closes after the command is executed.