2

Currently I am looking for a solution to run a script upon start up, not login, start up.

I have been researching this specifically for Synergy, but with the new version of Ubuntu (15.10) the documentation I have been following is different as folders and files do not exist where they specify. So for simple clarification, can someone please explain where I can add my Synergy start up script so that when the PC boots it runs the script before login?

I have referenced the many Synergy "how to's" on the Ubuntu forums and same thing, the files and folders they explain do not exist.

this was one of the main sources for me to follow and still was unable to get it running before login.

https://help.ubuntu.com/community/SynergyHowto

EDIT/UPDATE:

I have tried to modify the rc.local file and adding the line:

/usr/bin/synergyc -n MACHINE_NAME Server_IP

this unfortunately does not work, there was an error after logging into the machine stating that synergy crashed. Is there something wrong with my command? it works when entering it into terminal so i believe this command is fine.

3 Answers3

1

Take a look at:

/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

You need add this line at the end of the file:

greeter-setup-script=/usr/bin/synergyc IP/HOSTNAME
(Where is the name/IP of the server you are connecting to.)

0

You can try adding a cron task to run at STARTUP.

crontab -e

lets you edit the cron, and then if you add this to it, it'll run at any start of your system. Yes, the @reboot is quite deceiving.

@reboot /path/to/script

If you have questions you can visit it here, or shoot me another comment. Cron is only meant to run in a single profile, though.

 man crontab

This command should give you more documentation on cron.

The -l option causes the current crontab to be displayed on standard output. The -r option causes the current crontab to be removed. The -e option is used to edit the current crontab using the editor specified by the EDITOR environment variable.

0

On ubuntu 15.10 using Cron did not work. I had to modify the file: /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

and adding the line greeter-setup-script=/usr/bin/synergyc <ip/host>'

i was able to have Synergy start up and run BEFORE logging into the system. This was vrey important to me.

Thanks for the help Eddie!

EDIT: this was a default ubuntu 15.10 setup only updates were done to the system.