Nsync on Ubuntu exits when starting session exits

Even if I start insync under nohup it still exits when the session that I started it in closes. Version is 1.2.7.35123 on Ubuntu 14.04.

How can I get insync to remain online even when I am not?

Will be tagging our engineer @lpugoy and he will get back to you :slight_smile:

@ArtKagel: Could you tell me your use case? Are you using Insync on a headless machine?

No Headless machine? No. This is my main working machine. It runs Ubuntu 14.04. However, I am not logged into it constantly. I log in and out several times over the course of the day. When I log in I find that insync is not running so my files there (my main file server and primary storage) are not synced to my GoogleDrive account and does not contain changes I may have made on my laptop when offsite or otherwise not logged in.

I don’t always log into the machine from and work at the console. Often I am logged in from a laptop elsewhere in the building. Sometimes a power interruption causes a restart of the system, so even manually starting insync from the console is not a long term solution as it would involve going to the console after every reboot.

So, I start insync and it sync’s just fine. However, as soon as I close that window or the laptop I am logged in from goes to sleep breaking the connection, insync dies with the window despite having started it under nohup. I have tried using autostart etc. but no joy.

Help?

@ArtKagel: I see. You could try putting @reboot insync-headless start to your crontab so that Insync will be started for your user at boot. This conflicts with Insync’s entry in ~/.config/autostart though, resulting in an error message that Insync is already running when you log in.

You also won’t be use the app window in this setup after you login. A workaround is to stop Insync and restart it when you login. However this comes back to the original issue of Insync exiting when you log off.

Hope this helps.

Thanks Luis. I will try the crontab entry and see how that works.

On your comment about the autostart file in ~/.config … I do not have such a file in ~/.config/Insync. Should I? What must it contain? I do not see any documentation of this file and it is not mentioned in the insync man pages on my system.

@ArtKagel: The file I mean is ~/.config/autostart/insync.desktop. The ~/.config/autostart folder is used by most desktop environments to manage applications to start when the user logs in. You don’t necessarily need to have it if you don’t want to start Insync automatically when you log in.