SyncTrayzor: Windows host for Syncthing. Installer, auto-start, built-in browser, tray icon, folder watcher, and more

Just to update you - running at a higher resolution plugged into a monitor (1920x1080) didn’t solve the issue. I’d like to see notifications when a device has connected/disconnected as well as file sync notifications. Possibly including the name/path of the file that has been synced?

How odd. Thanks for the report, I’ll try and figure out what Windows is doing. Pinning it brings up the higher resolution, so it’s there, somewhere.

Device connected/disconnected is fine. I can see when a file has been transferred from remote → local, but not from local → remote (I can tell that a file has changed locally, but I can’t distinguish between a file being uploaded to a device and the file being spontaneously changed on the device). I guess ‘Synced XXX from YYY’ would be helpful though?

I’ve opened an issue to track this here:

Yes but I’d like “XXX” to include the path i.e. Share Name\Folder\File.ext

Sure - sorry, I wasn’t clear on that point. “Synced \Folder\Dir\File.txt from FriendlyNameOfDevice”

1 Like

“On the flip side, running a service as a particular user kind of defeats the point of services, and doesn’t support multi-user computers (only the user the service is running as will be able to use Syncthing).”

Well, I’d have to agree and disagree with this point.

True, running services as specific users is tricky and potentially problematic…BUT it’s something that’s done nearly all the time in the Enterprise -generally speaking, all add-on services (anything that is third party or not shipped with windows) is quite often run with a unique user account, with explicit permissions applied.

Not fun, not easy to manage, but it can be done and it does work.

That said, to properly setup SyncThing as a service would require splitting it into a service and a user interface, with the UI storing config info either in the registry or config files accessible by the user, and the service able to read those locations.

Quite a bit more complex. Not being a dev, I’m not sure how to accomplish this kind of thing. Maybe this could be put on the “down the road a ways” list?

1 Like

@dback, take a look at

I think we’ve ended up aligned with where you’re coming from.

Wow, nice. Good work. Congrats on writing the first native Windows app for Syncthing. I know this must have been a lot of work, and I know all the developers on this project (whether in C#, C++, or Go have worked very hard, and it shows.

I really like how this particular app is in C# . That really enables alot of the suggestions and dreams for UX/UI happen on Windows. I love C# personally for Windows apps – it makes it really easy to get the native look and feel, and it’s fun to code C# apps.

You could even add the ability for Auto-Update in Visual Studio by adding it as a ‘ClickOnce’ deployment – then perhaps host the ClickOnce on syncthing.net or another server. I think all ClickOnce needs is a web server – and not necessarily IIS – you can actually serve up a ClickOnce deployment from a Linux server running Apache or nginx as long as you set the mimetypes.

if there are any open issues for SyncTrayzor or features that need to be added , let me know, as I think I can do these much faster than learning Go. (meaning I just started learning Go, but I have at least 5years of experience coding in C# for Windows).

Thanks!

To give credit where credit’s due, both Syncthing Tray and syncthing-gtk made native Windows clients before SyncTrayzor came along.

I toyed with the idea of making a native Window UI, and not displaying Syncthing’s web interface, but rejected it for 2 reasons:

  • It would be a lot of effort for not much gain
  • Syncthing’s UI is still evolving, and will continue to improve (there’s a new design proposal floating about on the forums). Continuously being behind, and playing catch-up, to Syncthing’s native UI just presents a worse user experience.

To be honest, I’m not a fan of ClickOnce. Using Inno Setup lets me have quite a lot of flexibility with the installer - I can insert custom screens, do custom logic, write registry keys, move things around, etc. There’s talk of rebranding SyncTrayzor - using Inno Setup lets me do this in a clean way without leaving unused guff all over the user’s filesystem. I’m also not sure how my requirements for separate 32-bit and 64-bit installers, with unmanaged components which aren’t referenced by the C# project, would work with ClickOnce.

Also, using GitHub as a distribution platform has a lot of advantages. It’s trusted by users, and they’re more likely to download something from GitHub’s releases pages than they are from a random website.

If you speak another langauge, then please help out with the translation effort! Details are in the README. If you want to take a snipe at any of the open issues please do! Start a discussion in the issue first, though, so we don’t duplicate work. Otherwise, feature requests and bug reports are always welcome.

Well absolutely. I think there’s some really strong developers here; it’s a good way to learn from others.

In terms of ClickOnce, it’s been about 4 years since I deployed it on a corporate LAN. If there’s better stuff out there, then by all means use the best. I’m not familiar with Inno , but it sounds like you are on top of all of that. So I’ve no idea what Inno Setup is but it sounds newer than ClickOnce, haha. I must be dating myself here

“So yeah I’m thinking we write a FORTRAN client next…it’s really blowing up on AIX systems these days…” :wink:

Currently I’m reverse-engineering the protocol with Wireshark. I got all the traffic decrypted thanks to some help from the main developers, and right now I’m writing a Wireshark plugin for the BEP protocol. I’d like to be able to see exactly what’s happening under the hood – perhaps there can be enhancements made… Or at the very least, for my own understanding, I’d like to contribute some additional documentation for BEP and the REST API, and open-source the Wireshark protocol decoder module. That way people can debug their own code over the network, and we can make some slick developer documentation.

I do really enjoy creating UIs in Windows (C#) or Java (cross-platform) … It’s more art than programming (for me anyway) to get a nice user experience… That said, since all development has moved to this whole Web2.0 world, there are fewer and fewer desktop apps. The only place where apps are blowing up is in mobile. I suppose the whole REST API will come in very useful for all of this.

I do know that I have been mulling over the BEP protocol for awhile . . . Just as a thought experiment to see where this can go.

One thing I am 100% confident in (besides the ability of the developers here) … I’m very confident in the desgn and structure of the Angular REST code and the control protocol. It’s absolutely fantastic. I’ve been very surprised and impressed. It’s not easy to write good Angular.js code, but this is really state of the art.

So my overall point is this: I get the reasoning for not bothing with a native GUI. It might be fun, and I’ve been toying with the idea as well, but the usefulness is questionable… HOWEVER… since the REST API is so robust, really we can make a GUI client in just about anything pretty quickly. Any language, more or less. And I’m sure the UX/UI will continue to evolve and improve, for all the clients.

Github is great – I agree. The only problem with Github is it can be confusing for the end user who doesn’t work in the indusry. I like the idea of dumping everything on github so developers can fork and issue pull requests , etc… And then for a ‘release’ cycle… You have a rolling weekly release that’s auto-built, and then you have official ‘stable’ releases linked off the main web site. I think that’s more or less how things are set up now, so that’s cool.

No no… I don’t speak another language besides conversational Spanish. “Dame más cerveza” . I meant I’m polylingual in everything except the more modern languages like Scala and Go. Mainly Python, Java, and C/C++/C#.

When I get the opportunity, I’d love to install and check out your code in detail. From the brief look I took at it, it seems really cool. I meant more if you get bugfixes or feature requests as open Github issues, I can probably knock those out pretty quickly since I know C#, then issue a pull request back to your repo with whatever issue is open.

But anyway, great job, and kudos to everyone who’s been coding on this project , whether for Syncthing Tray, Syncthing GTK, or the reference Go implementation. Not easy work, but certainly something to be proud of.

1 Like

Not sure if this is of interest, but here is a per-file updater that phones home to see if it needs to update any files: (In one project, I use it to supplement an Inno Setup installer)

I googled “don’t use clickonce” and came up with a couple interesting hits to provide some justification for my similar lack of affection for it:

Yes, the REST API seems very clean, and I’m currently trying to go a completely different approach: Create an GUI based instance manager that just uses the REST endpoints to control / manage them. There is so much more information available through it and I like to see the status of my “mesh”. Also it should make the flows much easier, like adding a folder to multiple instances does no longer need approval on every instance if you have access through the REST-API.

Preview can be seen on https://dl.dropboxusercontent.com/u/3963769/metrothing/preview_gui.png

It’s just the first iteration of a possible GUI. REST client is working great so far, next thing up is threading and state machines to keep the polling and flow under control. Right now it is just a proof-of-concept, but I like it so far.

1 Like

Thanks for those! I was wondering how best to do auto-update, given UAC etc. I’ll have a read through those over the weekend.

Hello all ! May I jump in a discussion between devs and rise a particular issue ? (hope this is the right place).

I’ve noticed that SyncTrayzor consumes a lot of memory. The initial scan is completed and nothing else is ongoing, apart from checking repositories as per the scan interval. It’s constantly around 300-400MB.

Is it normal ? Is there a particular setting I should check ? What’s the best option to address this ?

Thanks again for such a nice piece of software :sunglasses:

PS: I’m coming from SyncthingTray…

So I guess syncthing is using the memory (rather than SyncTrayzor). I suggest you create a separate thread about this in order to stay on topic.

Just want to mark my first issue with this. It does consume quite some memory, on mine I’ve seen it as high as 203MB just for SyncTrayzor’s process.

Also, opening it from the Notification Area and to open up the GUI takes up to 15 seconds, freezing the process. The same applies when I right click the icon and select exit.

i5 CPU with 6GB RAM (it’s a laptop)

@AudriusButkevicius In my process explorer, SyncTrayzor shows 300-400MB while syncthing shows ~30MB. same 10-15seconds freeze on opening in systray, as mentioned by @Rewt0r .

How can I or can someone move this post (and the following ones) to a new topic ?

Leave it here for the minute. I’m on GMT so it’s the end of the day here, but I’ll respond properly tomorrow.

Okay, so the memory thing might be off-topic depending on who is using the memory…

From my own experience: Windows code, even managed code in C# , can have horrible memory leaks You’d be astonished. Few are aware that certain types of managed C# code can leak memory like a sieve.

I only know this because of a robotics project I wrote years ago … The control system was on Windows in C# with a GUI… After running for 30mins to 60mins , the system would crash. I finally noticed my process (all managed code) was steadily growing in footprint as you used the app.

There’s a few ways this can happen… If memory serves me… (1) The Microsoft OCR library leaked memory. (2) The worst offendor was Image or Bitmap (and their classes and superclasses), (3) A few other libraries that are standard in C#

You can easily find out by running your app and checking it periodically with a memory profiler. http://memprofiler.com/screenshots.aspx

I don’t think this would apply to Go , as I seriously doubt Go leaks memory under normal circumstances

@kreischweide

Wow your GUI looks slick … That’s Windows 8 , right? What are you developing it in?

I like your post “There is so much more information available through it and I like to see the status of my “mesh”” … I agree with this … However, I don’t know if this will have ‘mass appeal’. But it certainly appeals to me, heh.

“t should make the flows much easier, like adding a folder to multiple instances does no longer need approval on every instance if you have access through the REST-API.”

That’s actualy a clever idea. Would definitely make creating larger meshed networks easier (rather than log into each one via ssh and port forwarding for 8080).

Whoever put the Angular web services into Syncthing made a really really smart decision.

The memory usage I’d expect from SyncTrayzor is < 100MB, normally around 60 to 80 (as shown in Task Manager - i.e. numbers refer to Private Working Set). A lot of this is down to the embedded browser component.

Are you running the 32-bit or 64-bit build? Did the memory increase slowly over time, or did it jump up? Have you been closing to tray / restoring from tray a lot? When you say there’s a freeze when opening from the tray, is that an actual freeze (i.e. window is unresponsive, can’t open any menus - move the window), or just the browser bit loading?

Thanks!

Note that easy, you’ll find :wink: Quite often managed memory leaks will be due to either unsubscribed event handlers or static caches (e.g. of RuntimeMethodInfo, String) down in the CLR. The former are reasonably easy to figure out, but the latter can be a complete nightmare, since there’s no indication of what’s ultimately populating the cache.