tuxpoldo

Debian And Ubuntu Legacy Desktop Unofficial Packages For Bittorrent Sync

Recommended Posts

...

I guess this is a problem as the btsync-user agent runs with user privileges but the update is a root process. You might be able to solve this by running the agent in an endless loop as long as there is a running state file. If there is an updating state file in a global location, the loop will sleep for some time and then check again. This way, your update script could just create this updating state file and kill all agents. Afterwards that state file could be removed and the agents will automatically start again the new version.

...

Yes. This is the major problem in handling the update process and I still have not found a really good solution. I promise that I will work on this issue, but I need some tome since: tomorrow I have to attend my own marriage ;-) and in the next days I will go into holiday with my wife. Once there, I will have a great internet connection and a lot of time and I will find a solution.

Share this post


Link to post
Share on other sites

I've install btsycn-user on my Mint13 Cinamon PC, which worked perfectly finem, but I am having trouble with Mint13KDE.

The ~/.btsync.conf & ~/btsync.conf files are empty. A .btsync folder is also there but there's only a .directory file.

ps ax | grep btsync-agent gives me

USER 4457 0.0 0.0 9384 872 pts/1 S+ 19:22 0:00 \_ grep --colour=auto btsync-agent

The /etc/btsync folder is empty and usr/lib/btsync-user has four files Agent, Starter, Stopper & Tester

I've tried removing and reinstalling but just get the same results.

This instruction on your page 1 also doesn't look right to me:

cp ~/.btsync.conf ~/btsync.conf (Sorry. I didn't spot the dot. My apologies)

Can I also just use someone else's btc/btsync-user/btsync-user.conf ?

Thanks.

Share this post


Link to post
Share on other sites

Thanks for the packages. Will make rolling this out on other machines much easier for everyone! One comment, would you consider making the config and local btsync cache locations XDG based for the desktop package? ie ~/.config/ instead of ~/

Hi shizeon,

the biggest problem in changing the location now, is to move the already existing ~/.btsync storage path. This can be done in the update procedure, but the risk that something will go wrong is quite high... Also people using the custom ~/btsync.conf configuration file may get in trouble, if I change the location from one version to the next...

Any idea how to solve this?

Share this post


Link to post
Share on other sites

I've install btsycn-user on my Mint13 Cinamon PC, which worked perfectly finem, but I am having trouble with Mint13KDE.

The ~/.btsync.conf & ~/btsync.conf files are empty. A .btsync folder is also there but there's only a .directory file.

ps ax | grep btsync-agent gives me

USER 4457 0.0 0.0 9384 872 pts/1 S+ 19:22 0:00 \_ grep --colour=auto btsync-agent

The /etc/btsync folder is empty and usr/lib/btsync-user has four files Agent, Starter, Stopper & Tester

I've tried removing and reinstalling but just get the same results.

...

Can I also just use someone else's btc/btsync-user/btsync-user.conf ?

It seems that the autostart mechanism does not work under your environment. The autostart-upon-logon sequence is implemented by copying the btsync-agent.desktop file to /etc/xdg/autostart

Content of btsync-agent.desktop:


[Desktop Entry]
Name=BitTorrent Sync User Agent
Comment=BitTorrent Sync User Agent
Exec=/usr/lib/btsync-user/btsync-starter
Icon=btsync-user
Terminal=false
Type=Application
NoDisplay=true

Probably Mint13 Cinamon is not using XDG as the interactive logon process and this makes the packages incompatible with it. Does anybody here know how to implement autostart in this configuration? If someone tells me, I can try to improve the packages.

Share this post


Link to post
Share on other sites

I have problems with multiple users, but I am not certain if it is related to the way it was packaged or not.

My computer is shared by my family. In particular even my personal laptop is sometimes used by my wife. Yesterday she logged in for the first time after I had installed the desktop package of bitsync. Bitsync than started in her session and it started using 100% CPU.

It seems that the problem is that there is another bitsync instance running for my user and both are trying to add a simple web server to listen to the same port (9999). When the secondd btsync-agent tries to attach to the port that is already used the CPU gets maxed out. I checked this by manually modifiying my configuration to add the web server at port 10000 instead of 9999. With this configuration both instances can happily coexist.

Maybe bitsync could (or even should) use a different port for each user? Something like 8999+uid ? In this case the launcher for the bitsync web interface should also be modified.

Another problem is that one user can look at thee name of the directories being shared by the other users in the default configurartion as no password is required by default. This maybe considered a small privacy problem.

Obs: edited to fix some typos.

Share this post


Link to post
Share on other sites

Hi shizeon,

the biggest problem in changing the location now, is to move the already existing ~/.btsync storage path. This can be done in the update procedure, but the risk that something will go wrong is quite high... Also people using the custom ~/btsync.conf configuration file may get in trouble, if I change the location from one version to the next...

Any idea how to solve this?

Hi,

you should not move the users config files. Instead you could check for both locations and use the new one if it exists. Maybe you could even print a warning message if the file exists in the old location.

Should I have a look at the restart-on-update functionality?

BTW: Congratulations

Share this post


Link to post
Share on other sites

Hi dswd,

you should not move the users config files. Instead you could check for both locations and use the new one if it exists. Maybe you could even print a warning message if the file exists in the old location.

That was exactly what I thought about it. I think that tomorrow I will have some spare time to implement the change (since unfortunately the weather here in Timisoara has become very ugly).

Should I have a look at the restart-on-update functionality?

Good Idea! Since I have here only my Notebook with limited possibilities in testing all that stuff, it would be really helpful to get some help.

BTW: Congratulations

Thanks!

Share this post


Link to post
Share on other sites

Hi pjssilva,

I have problems with multiple users, but I am not certain if it is related to the way it was packaged or not.

...

Another problem is that one user can look at thee name of the directories being shared by the other users in the default configurartion as no password is required by default. This maybe considered a small privacy problem.

Obs: edited to fix some typos.

OK - I knew that this would have been happen but I hoped that it would not ;-)

All your suggestions are OK and I will start thinking about a solution for this. Changing the port number based on the UID is an interesting idea. As you said, the problem is to keep a functioning link to the web interface. At the moment, the .desktop file is shared by all users on the system. I have to find out, if there is a way to create user specific ones... Since I have no linux machine here at the hotel where I'm spending my honeymoon, can anybody help me giving the information how I can achieve this? Is there a possibility on Linux to store user specific .desktop files?

The second problem (the one that the web interfaces are not protected by password), can be solved by creating custom configuration files ( ~/btsync.conf instead of ~/.btsync.conf )

Regards

Leo

Share this post


Link to post
Share on other sites

Ok, I think it would be best to have some kind of repository (Github?) for the files then.

Yes - but give me time until tomorrow. Today we have a date with some friends and I have to leave in a few minutes. Since I have not changed anything from the last release, you can work on the files you have and send them to me without fear of creating conflicts...

Share this post


Link to post
Share on other sites

It seems that the autostart mechanism does not work under your environment. The autostart-upon-logon sequence is implemented by copying the btsync-agent.desktop file to /etc/xdg/autostart

Content of btsync-agent.desktop:


[Desktop Entry]
Name=BitTorrent Sync User Agent
Comment=BitTorrent Sync User Agent
Exec=/usr/lib/btsync-user/btsync-starter
Icon=btsync-user
Terminal=false
Type=Application
NoDisplay=true

Probably Mint13 Cinamon is not using XDG as the interactive logon process and this makes the packages incompatible with it. Does anybody here know how to implement autostart in this configuration? If someone tells me, I can try to improve the packages.

Thanks for the response. Yes, I see now that KDE doesn't use XDG. I don't know how to get it running myself, so hopefully someone will come along with a solution.

Share this post


Link to post
Share on other sites

Hi Orbal Dwine,

Thanks for the response. Yes, I see now that KDE doesn't use XDG. I don't know how to get it running myself, so hopefully someone will come along with a solution.

Can you please make some tests with the information supplied in the following two articles?

http://superuser.com/questions/158765/how-do-i-add-modify-remove-startup-programs-in-kde

This would be my favourite solution since it implements the autostart on a per-user base. Please check if there is a directory named ~/.kde4/Autostart on your machine. If yes, copy the btsync-agent.desktop file there and logoff and login again. You should the shell to do that, since the file manager probably would hide the .kde4 directory...

If this does not work, you could verify, if the solution described in this article works for you:

http://l10n.kde.org/docs/admin/autostart-and-runonce.html

Please let me know...

Share this post


Link to post
Share on other sites

I have to find out, if there is a way to create user specific ones... Since I have no linux machine here at the hotel where I'm spending my honeymoon, can anybody help me giving the information how I can achieve this? Is there a possibility on Linux to store user specific .desktop files?

First, please enjoy your honeymoon and don't bother with this until you come back :-) And congratulations!

I am not sure if this is what you want. But you can store specific user desktop files that will overide the default one by placing them at ~/.local/share/applications. So a possible solution to the problem would involve two ingredients:

1) Make the default/automatic configuration (~/.btsync.conf) point the web interface to port 8999+uid (or something along those lines).

2) Create custom .desktop files for each user (probably at login time) putting them in ~/.local/share/applications pointing the browser to the right port.

I will try today to write a simple Python script that will solve my problem statically by:

1) Copying the ~/.btsync.conf to ~/btsync.conf and chaging the port.

2) Copying the default .desktop file to ~/.local/share/applications and setting the right port.

I'll write back to say if this is a good workaround and attach the script for other to use in the mean time.

The second problem (the one that the web interfaces are not protected by password), can be solved by creating custom configuration files ( ~/btsync.conf instead of ~/.btsync.conf )

You are right, I forgot about that. Thanks.

Share this post


Link to post
Share on other sites

I will try today to write a simple Python script that will solve my problem statically by:

1) Copying the ~/.btsync.conf to ~/btsync.conf and chaging the port.

2) Copying the default .desktop file to ~/.local/share/applications and setting the right port.

Here is my Python script to workaround the discussed problem in machines with multiple users. It implements the work around described above. It must be run as root.

Disclaimer: I do not take any responsability for any damage made to your system by this script. I am giving away its code, anyone can read the code and verify what it does.

Obs: I had to zip the file to be allowed to upload it. The zip only has the Python scriipt.

btsync-workaround.zip

Share this post


Link to post
Share on other sites

Thank you for the Ubuntu PPA which has worked for me in Linux Mint 13 (which is based on Ubuntu 12.04 LTS)

I have a question though ... I understand that this starts the process once I boot up and log in but there are times when I do NOT want it running. Is there a terminal command to stop or pause it? I'm assuming there is then also a terminal command to unpause or restart it.

Please share this info! :)

*** EDIT ***

Okay so I admit I hadn't read the entire thread when I wrote this and now that I have mostly have it seems my answers are here but could someone confirm please?

STOP ---> Use this terminal command: /usr/lib/btsync-user/btsync-stopper

START ---> Use this terminal command: /usr/lib/btsync-user/btsync-starter

Is this the best way?

Is there a way to make a script for each one so I can just double click on it? I'm not very good at this kind of stuff lol

Share this post


Link to post
Share on other sites

STOP ---> Use this terminal command: /usr/lib/btsync-user/btsync-stopper

START ---> Use this terminal command: /usr/lib/btsync-user/btsync-starter

Is this the best way?

Is there a way to make a script for each one so I can just double click on it? I'm not very good at this kind of stuff lol

Yup that's the best way. if you want to be able to click on it make a symlink to where you want it.


ln -s /usr/lib/btsync-user/btsync-stopper /path/to/symlink

Remember to replace /path/to/symlink to where and what you want it to be like so


ln -s /usr/lib/btsync-user/btsync-stopper ~/btstop

Share this post


Link to post
Share on other sites

@TheDurtch

Thank you so much! That worked perfect for me!

Following your example I did:

ln -s /usr/lib/btsync-user/btsync-stopper ~/Desktop/BTSyncStop

This gave me a link right on my desktop (which is exactly what I wanted). I also did the same for starting the service (making the correct syntax change) so now both a START and STOP are on my desktop.

Thank you so much!

Share this post


Link to post
Share on other sites

First, please enjoy your honeymoon and don't bother with this until you come back :-) And congratulations!

Thanks a lot!

I am not sure if this is what you want. But you can store specific user desktop files that will overide the default one by placing them at ~/.local/share/applications. So a possible solution to the problem would involve two ingredients:

...

I like your approach and I have implemented it. Perhaps today I will release an improved version...

Share this post


Link to post
Share on other sites

Released new packages 1.1.70-2 with a few bugfixes and additions. All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours.

Changelog:


btsync (1.1.70-2~sid) sid; urgency=low

- Fixed: Restart on update will work in future versions on btsync-user
(Reported and fixed by dswd)
- Added multiuser support for btsync-user as suggested by user pjssilva
(See http://bit.ly/13dBmOP)
THIS MAY CHANGE THE PORT NUMBER FOR THE WEB UI
- Fixed: Sometime btsync is still not running when the startup sequence
checks if the process runs. Added sleep 1 (Suggested by raveur)

-- Leo Moll <leo.moll@yeasoft.com> Wed, 04 Sep 2013 16:07:28 +0200

Share this post


Link to post
Share on other sites

CAVEATS OF THE NEW VERSION:

The most substantial change in this version is multiuser support. In order to make it possible to have concurrent instances running (one for each user), each btsync instance is running its web UI on a different port number. In order to make sure, the user can access its personal web UI, the application shortcut is no more system global but user specific. But:

  • If you have saved other shortcuts to your web UI, they may not work any more, since the port number for the user specific web UI may have been changed
  • If you have created your own configuration file ~/btsync.conf you should check if your web UI port number is different from the port number btsync would have assigned to you (look at the default configuration file ~/.btsync.conf ). If they are different, the application shortcut will not work any more and there is the risk, that it may conflict with the port number of another user into the system. You should fix it.

Share this post


Link to post
Share on other sites

I had a BitTorrent Sync icon under INTERNET in my menu (Linux Mint 13 XFCE) and clicking on brought up the WebUI in my default browser.

 

However this icon is now gone and I suspect it is due to this most recent update.

 

I'm the only user on my system.

 

*** EDIT ***

It showed back up and I think it was due to the fact that I did reboot at some point and noticed it after that so sorry that I jumped the gun here.

Share this post


Link to post
Share on other sites

Released new packages 1.1.70-3 with an exiting addition. All Debian and Ubuntu builds are now online.

 

Changelog:

 

btsync (1.1.70-3~sid) sid; urgency=low  - Fixed: added autostart support for KDE SC (/usr/share/autostart/)    and OpenBox (/etc/xdg/openbox/autostart) in btsync-user  - Added status indicator for btsync-user (Thanks to Mark Johnson) -- Leo Moll <leo.moll@yeasoft.com>  Tue, 17 Sep 2013 13:25:09 +0200

Share this post


Link to post
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.