kozec / syncthing-gtk

GTK3 & python based GUI for Syncthing
GNU General Public License v2.0
1.3k stars 138 forks source link

Option to start up with syncthing Daemon disabled #94

Closed dreamcat4 closed 9 years ago

dreamcat4 commented 9 years ago

I have this as one of my deafult startup items in ubuntu. However I would prefer not to have syncthing running all the time as it consumes a lot of system resources. Especially during system startup. And instead manually toggle it on later on, at time when it is really needed.

So can we please have an option to start up syncthing-gtk (your tray icon), but not to start up the synthing daemon itself? And put new checkbox in Preferences Dialog window? Many thanks.

kozec commented 9 years ago

Well, that may be harder to do that it sounds, but it's definitely possible. I'll look into it.

dreamcat4 commented 9 years ago

Thanks!

On Sat, Feb 21, 2015 at 3:58 PM, kozec notifications@github.com wrote:

Well, that may be harder to do that it sounds, but it's definitely possible. I'll look into it.

— Reply to this email directly or view it on GitHub https://github.com/syncthing/syncthing-gtk/issues/94#issuecomment-75377744 .

kozec commented 9 years ago

Hi again. I just started adding new option to UI Settings when I realized something like it is already there...

If you enable "When starting and syncthing daemon is not running.... ask me what to do" option, optionally along with "Minimize to tray on start", it should do exactly what you want: ST-GTK will start with gray tray icon signalizing that Syncthing is not there and it will not start Syncthing until you bring up window and click "Start" button.

How about that?

dreamcat4 commented 9 years ago

@kozec OK. Have you tried it? Sorry - that does not seem to work for me.

I just followed all of your recent instructions. But then (after a system reboot) and with both the 'start minimised' and 'ask what to do' options enabled, then it did not start as minimised. I got a familiar dialog box. Which gave 2 options: 'Start' (meaning start syncthing daemon) or 'Quit' dialog. As previously explained - I do not wish for it to be doing either of those option at startup. And of course should be minimised (which isn't being respected).

kozec commented 9 years ago

Ok, that sounds like main issue here is ST-GTK not starting minimized. Do you have tray icon visible? Does ST-GTK starts minimized, when launched from app menu or from terminal? And if not, can you, please, attach terminal output?

dreamcat4 commented 9 years ago

Thank you. That is good instruction to follow.

I tried synching-gtk -v -d -m from command line (ubuntu terminal). And it seem to work (no dialog box). Then I removed the -m flag, just syncthing-gtk -v -d, and there was still no dialog box again. So either it didn't matter, or the earlier dismissal in previous session was remembered (like a 1 time setup question), or something else. Or the startup item command (which look to be the same program with no arguments) was somehow invoked differently. e.g. as a different user with different settings e.g. root user. Although when I try as root there is same kinds of textual debug log output printed to terminal, but no unity tray icon or any other GUI shows up.

I found 2x startup items so removed one of them and then just added -m flag to the remaining one. Unfortunately I cannot reboot my machine to try that yet. Or for many hours to come, as running testing on other software. Please assume it worked, unless after some few days you hear from me again about it. Many thanks.

kozec commented 9 years ago

I found 2x startup items so removed

Aaand we have winner here. Having two startup launchers is always bad idea and in this particular case, first one launches ST-GTK minimized and second one detects running instance and restores minimized window. That's not a bug, that's a feature ;)

dreamcat4 commented 9 years ago

Well it is possible then that could be an entirely different kind of a bug. If I enable 'start at system startup' checkbox in syncthing-gtk settings dialog screen. Then it should not be adding duplicate entries (more than 1 entry) to the Startup Items if one already existed.

Or I could be wrong about that! I am not sure at this later time how my Ubuntu Unity startup items got populated with the 2x identical duplicated items. No matter.

kozec commented 9 years ago

I'm 99% sure that ST-GTK will not generate duplicate entry, as even if it failed to detect existing one, it would simply overwrite it - path is hardcoded to ~/.config/autostart/Syncthing-GTK.desktop.

But it is possible that file was renamed by some startup apps editor. That shouldn't happen in general, but if it happens anyway, let me know and I'd find better way how to detect if startup entry already created.