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.

1

3 Answers 3

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.)

10
  • This unfortunately does not work. Unless I might try building a script file, and call the script from the rc.local rather then putting my terminal commands straight into the rc.local file.
    – Sean McCoy
    Nov 20, 2015 at 18:54
  • either should work, really. What are you trying to do?
    – Eddie Dunn
    Nov 20, 2015 at 19:09
  • I am trying to have synergy start up at boot up so I can log in using a keyboard and mouse not attached to the Ubuntu system.
    – Sean McCoy
    Nov 23, 2015 at 12:07
  • OK try this: edit /etc/lightdm/lightdm.conf and add a line at the end "greeter-setup-script=/usr/bin/synergyc <ip/host>"... then restart lightdm. From here:askubuntu.com/questions/15212/start-synergy-on-boot/…
    – Eddie Dunn
    Nov 23, 2015 at 15:27
  • Hi Eddie, no files reside under the /etc/lightdm folder only a users.conf file. There is no lightdm.conf.
    – Sean McCoy
    Nov 30, 2015 at 19:17
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.

3
  • 2
    15.10 has swiched to systemd, and doesn't use upstart anymore. Nov 20, 2015 at 15:15
  • @mikewhatever Fixing that.
    – Anxionos
    Nov 20, 2015 at 15:20
  • So will the reply Anxionos gave work? or is this now no longer in use.
    – Sean McCoy
    Nov 20, 2015 at 16:18
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .