How can I make a service run at startup (SOLVED)

Hi Guys

I use bittorrentsync to sync files between local and remote PC’s which works very well, however since installing Peppermint 5 I can’t get it to automatically run at startup as it did with Peppermint 4, to get it running I have to run

btsync start

Is there any way I can get it to automatically run at startup ?

Graeme

Not sure how it works in Peppermint but you could try this generic LXDE approach:
Automatically start at boot (replace LXDE with whatever peppermint uses) might need to use different text editor like Gedit or Leafpad…

sudo nano /etc/xdg/lxsession/LXDE/autostart

add
@btsync
or
@btsync start

SeZo’s suggesting (with a small “Peppermint” tweak) worked in Peppermint 4, but Ubuntu/Lubuntu seem to have done something weird with 14.04 and the autostart files in xdg are now completely empty, and if you put anything there, they’re ignored ::slight_smile:

So far the only way I can find is to create a .desktop file in ~/.config/autostart
so run:

gedit ~/.config/autostart/btsync-autostart.desktop

when a BLANK file opens, make it read:-

[Desktop Entry]
Type=Application
Name=BitTorrent Sync Autostart
Comment=Start btsync at login
Exec=bash -c "btsync start"
Terminal=false

SAVE the file, and log off/on (or reboot) to test

Yep that worked

Huge thanks to Mark and SeZo for your help

Graeme

For my part you’re welcome :slight_smile: