Linux desktop Application Indicator


marxjohnson

Recommended Posts

I've written an Bittorrent Sync indicator for Linux Desktops (specifically Ubuntu, but may work on others too - let me know!). It basically displays the same information as the WebUI - which folders are syncing, and which peers they're syncing with.  It has an animated icon to show when something is syncing, and there's a function to copy secrets to the clipboard.

 

You can get it, find out how to use it, and report bugs at https://github.com/marxjohnson/btsyncindicator. Enjoy!

Link to comment
Share on other sites

Thank you marxjohnson and tuxpoldo.

Great team-job :rolleyes:

 

1) But my active syncs are not shown; I have only "Open web interface", "Enable debug logging" and "Quit" menu items. How can I fix this problem?

 

2) If you accept a wish: a pause/restart or start/stop menu item may be very helpful on my laptop.

 

Regarding 1), can you make sure you're using the latest version (either by checking out v0.9 from github or by installing the latest btsync-user package) and let me know if it's still happening?  If it is, can you report a bug on Github with as much info as you can about your linux distro and desktop environment with version numbers?

 

Regarding 2), I'd like to implement this, but I'm yet to find the API function to Pause/Resume sync since there's no function in the web interface that I can examine.  If you install the latest version of btsync-user you can shut down btsync from the indicator menu and restart it from the main menu entry.

Link to comment
Share on other sites

I have an Idea for implementing a fake-pause feature: (Fake-Pause: it looks like pause, if feels nearby like pause but it isn't pause...): the btsync executable (named btsync-agent in our context) is wrapped by a shell script in order to implement a smooth update during the user session. Normally when btsync is stopped (by sending a kill/quit signal to the btsync-agent process) also the wrapping script ends... But during an update, a special signal is given that prevents the script to be terminated: in this case, the script manages restarting the whole btsync thing as soon as the update has completed.

 

I think that we could at least implement a mechanism that allows the btsyncindicator to stop the background btsync-agent and signal to the wrapper script not to stop also the indicator and itself (this is the current behaviour) but to listen to the indicator for a next action, that could be either resume btsync (that means: restart the agent) or stop the whole thing.

 

@marxjohnson: what do you think about this?

Link to comment
Share on other sites

  • 2 weeks later...

My Debian Wheezy now also got this indicator at last update. That's good to see that btsync is working in the background. But the icon is permanently rotating. Shouldn't that only rotate when the client is syncing something (as Owncloud does)? It's very irritating when it is permanently rotating.

Link to comment
Share on other sites

I found the bug with the permanently rotating indicator icon. This is language dependent. In btsyncindicator.py method check_activity(), you compare with the english text:

if peer['status'].find('Synced') == -1:

But in a german installation the peer status is

u'status': u'Synchronisiert am 10/19/13 11:04:00'

So this is never matched.

Link to comment
Share on other sites

There is some other bug in the indicator: german umlauts in folder names are displayed wrong. 2-Byte UTF-8 characters in folder names are displayed as 2 separate ISO Latin-1 characters. Example: the german 'ü' (u umlaut) has a UTF-8 encoding of 0xC3 0xBC. These are displayed as Latin-1 "A with tilde" plus "fraction one quarter".

 

I think this bug is in the webserver. The code:

logging.info('Requesting status');params = {'token': self.token, 'action': 'getsyncfolders'}response = requests.get(self.urlroot, params=params, cookies=self.cookies)

returns umlauts as 2 unicode characters:

{ "iswritable": 1, "name": "\/Daten\/jochen\/B\u00c3\u00bccher", "peers": [ { "direct": 1, "name": "BTsync Server", "status": "Synchronisiert am 10\/19\/13 11:04:00" }
Link to comment
Share on other sites

I found the bug with the permanently rotating indicator icon. This is language dependent. In btsyncindicator.py method check_activity(), you compare with the english text:

...

So this is never matched.

This has already been reported in btsyncindicator as Issue #24. Since Mark is currently very busy, I suppose that it will take some days more than usual to have this bug fixed.

There is some other bug in the indicator: german umlauts in folder names are displayed wrong. 2-Byte UTF-8 characters in folder names are displayed as 2 separate ISO Latin-1 characters. Example: the german 'ü' (u umlaut) has a UTF-8 encoding of 0xC3 0xBC. These are displayed as Latin-1 "A with tilde" plus "fraction one quarter".

 

I think this bug is in the webserver. The code:

logging.info('Requesting status');params = {'token': self.token, 'action': 'getsyncfolders'}response = requests.get(self.urlroot, params=params, cookies=self.cookies)
returns umlauts as 2 unicode characters:

{ "iswritable": 1, "name": "\/Daten\/jochen\/B\u00c3\u00bccher", "peers": [ { "direct": 1, "name": "BTsync Server", "status": "Synchronisiert am 10\/19\/13 11:04:00" }

This one is quite serious. Probably it would make sense to report it directly to the btsync developers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.