Yet another Syncthing Tray

Output of otool for syncthingctl:

$ /Library/Developer/CommandLineTools/usr/bin/otool -L ~/Downloads/syncthingctl

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57336.1.9)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 801.1.1)
/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1252.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.4.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1253.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Looks as if everything is there.


Output of otool -L for syncthingtray.app

$ /Library/Developer/CommandLineTools/usr/bin/otool -L ~/Downloads/syncthingtray.app/Contents/MacOS/syncthingtray

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libcups.2.dylib (compatibility version 2.0.0, current version 2.11.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 600.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57336.1.9)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 801.1.1)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1252.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.4.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1253.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Looks fine as well.


Starting syncthingctl directly as suggested:

$ ./syncthingctl status --url http://localhost:8090 --api-key blah

QFSFileEngine::open: No file name specified
Error: Unable to parse Syncthing config: illegal value

Hm. Why is it trying to parse the config if I don’t point it to a config…
And what exactly is the illegal value…


Starting syncthingtray.app/Contents/MacOS/syncthingtray binary:

~/Downloads/syncthingtray.app/Contents/MacOS $ ./syncthingtray --help

Syncthing Tray, version 0.6.3-242.c8b68bc
Linked against: C++ Utilities: 4.9.2-357.a40d6ca, Qt Utilities: 5.7.1-176.7c6483f, Connection backend of Syncthing Tray: 0.6.3-242.c8b68bc, Data models of Syncthing Tray: 0.6.3-242.c8b68bc, Widgets of Syncthing Tray: 0.6.3-242.c8b68bc, Qt Network: 5.9.1, Qt Widgets: 5.9.1, Qt Core: 5.9.1
Available arguments:
....

Works.

~/Downloads/syncthingtray.app/Contents/MacOS $ ./syncthingtray qt-widgets-gui --windowed

Unable to load translation file for Qt repository "" and language de_DE.
Unable to load translation file for "qtutilities" and the language "en_US".
Unable to load translation file for "syncthingconnector" and the language "en_US".
Unable to load translation file for "syncthingtray" and the language "en_US".

WORKS! At least a dialog is opened. Nothing happens much after that, but its a step in the right direction.


Testing Tag Editor

Starting it via Double-Klick does nothing.
But ~/Downloads/tageditor.app/Contents/MacOS $ ./tageditor

Unable to load translation file for Qt repository "" and language de_DE.
Unable to load translation file for "qtutilities" and the language "en_US".

Works! It brings up the mp3 Tag Editor. I would’ve tried it out, but my mp3s are on a different volume (mounted automatically unter /Volumes by macOS) which is not available. But looks good.


Things look very good. Still rough, but that was to be expected when developing for a foreign platform. :slight_smile:

Thanks for taking the time :slightly_smiling_face:

This error is not about parsing the XML configuration file of Syncthing. The application now actually tries to communicate with Syncthing. However, the config it has been received via the REST API is not valid JSON. Likely because the request was not done correctly. I should improve the error handling here to show the request and the response.

I assume that dialog looks similar to the screenshot in the first post of this thread? If not, which dialog do you get exactly?

So the tray icon does not work but the application itself would at least show up.

So you can not open the settings to let it connection to Syncthing?

So the bundle does not work. Maybe I can check how other CMake projects do it.

So including translations didn’t work too well.

BTW: The Tag Editor is not limited to MP3 (it also supports iTunes-style AAC/M4A, Matroska, …).

So the file system model provided by Qt behaves differently under Mac OS. And not even the “Open file dialog” accessible via “File → Open” in the menu allows you to pick select the file? That would be a problem for Syncthing Tray, too. Actually, the applications should show the native Mac OS X file dialog.

New release 0.6.3 is available.

  • Again some fixes and small improvements.
  • I also updated the static Windows binaries.
  • This version also should at least compile for MacOS X. So anyone interested in a Mac version could try to build it and investigate/debug run-time issues. The improved error logging might also help.
  • I also started to work on a Plasmoid (widget for Plasma 5 desktop). It is still incomplete and experimental.

Full list of changes: https://github.com/Martchus/syncthingtray/compare/v0.6.2...v0.6.3

2 Likes

Here a few more screenshots showing the Plasma 5 integration (Plasmoid and Dolphin menu):

2 Likes

New release 0.7.0 is available.

  • Fix some bugs (as always)
  • Improve the CLI syncthingctl, eg. Bash completion now also completes directory/device names
  • Allow re-ordering connection configurations
  • Plasmoid should be usable now
  • Other small improvements

Full list of changes: https://github.com/Martchus/syncthingtray/compare/v0.6.3...v0.7.0

2 Likes

New release 0.7.1 is available.

  • Fix some bugs (mostly concerning the Plasmoid)
  • Allow turning use of escape sequences off
  • Show native directory selection when double-clicking on directory input on web UI

Full list of changes: https://github.com/Martchus/syncthingtray/compare/v0.7.0...v0.7.1

1 Like

New release 0.7.2 is available.

Full list of changes: https://github.com/Martchus/syncthingtray/compare/v0.7.1...v0.7.2

New release 0.7.3 is available.

Full list of changes: https://github.com/Martchus/syncthingtray/compare/v0.7.2...v0.7.3

(Does not fix the problems mentioned in Proper way for "Sync complete" notification and actual idle detection yet.)

Hi

Can you also provide Debian debs? I wanted to try but it is a bit involved for my skills to get that going.

thanks

@totoba See https://github.com/Martchus/tageditor/issues/33#issuecomment-362812955

Note that “stable” Debian often provides very outdated packages. For Syncthing Tray I would recommend to use Qt 5.9 or newer and I’m not sure whether Qt < 5.8 is still sufficient.

No pressure, but why not provide an app image like Krita does?

https://krita.org/en/download/krita-desktop/

@totoba That is definitely worth a thought.

Look what Linus said about it :wink:

Linus Torvalds

This is just very cool.

Anyway I think it would be nice if it was more accessible. I would like to use it for sure.

Yes, I’m currently reading their README. This seems to involve packaging all dependencies, including Qt. The tool linuxdeployqt might be helpful.

I suppose the following features will not be possible, though:

  • Dolphin integration
  • Plasmoid for Plasma 5 desktop
  • using any Qt Widget theme provided by the distribution
  • further integration for desktop environments (eg. GTK or KDE file dialogs)
1 Like

I created an AppImage using OBS. It is actually not more than a few lines.

Due to an issue with OBS/AppImage the build currently fails.
I could fix this locally, though. My builds for the latest Git commit are available here: https://martchus.no-ip.biz/repo/AppImage/2018-02-10

Limitations:

  1. only x86_64 build available so far
  2. creating a menu entry is not implemented so far
  3. adding the tray to auto-start via settings does not work (it is currently trying to add the temporarily mounted executable rather than the AppImage path)
  4. The CLI syncthingctl is not available (creating an AppImage seems to require a *.desktop file)
  5. no Wayland platform plugin included so far
  6. Bash completion not possible
  7. Dolphin integration not possible
  8. Plasmoid not possible
  9. using custom Qt Widgets style not possible
  10. no further integration for desktop environments (eg. GTK or KDE file dialogs)
  11. the bundled Qt is quite old because those AppImages are supposed to be built under old distributions for better compatibility
  12. Despite 11., it might not work under very old distributions.

I think that only 1. to 5. could be implemented or worked around.

1 Like

The CLI developed as side-project of this tray will finally support changing the configuration in the next release.

Since it is hard to provide a nice CLI interface for modifying nested data structures like the Syncthing config, I decided just to open an editor like systemctl edit ... does. But this seemed a bit too boring, so I also implemented a options which allow to modify the configuration by running JavaScript code like this example.

syncthingctl --help:

cat
  prints the current Syncthing configuration

edit
  allows editing the Syncthing configuration using an external editor
  --editor [editor name] [editor option] ...
    specifies the editor to be opened
    default environment variable: EDITOR
  --script [path]
    runs the specified UTF-8 encoded ECMAScript on the configuration rather than opening an editor
  --js-lines [line] ...
    runs the specified ECMAScript lines on the configuration rather than opening an editor
  --dry-run
    writes the altered configuration to stdout instead of posting it to Syncthing

Like any other commands of the CLI, it works for remote instances as well (by specifying the --url argument).

New release 0.8.0 is available.

  • As already mentioned, syncthingctl can now modify the configuration.
  • There are notifications for new folders or devices.
  • Sync complete notification now uses FolderCompletion event.

Full list of changes since v0.7.3: https://github.com/Martchus/syncthingtray/compare/v0.7.3...v0.8.0

Hi, how do I go about building the latest version for windows?

There are statically linked Windows binaries attached on the latest GitHub release: https://github.com/Martchus/syncthingtray/releases

If you looked at my website for dynamically linked binaries: Yes, those are outdated. Since the statically linked ones should be sufficient I currently don’t put any effort into it.

1 Like

Ah, you want to build it yourself? Have a look at https://github.com/Martchus/PKGBUILDs/tree/master/syncthingtray. Those PKGBUILD files are for building the Windows version under Arch Linux, but they show required dependencies and commands to be executed quite clear. So you can use that information to build under other platforms as well. Of course there are also general build instructions.