From mboxrd@z Thu Jan 1 00:00:00 1970 From: Meiyo Peng Subject: Re: Way to synchronize files like Dropbox Date: Sat, 13 Apr 2019 13:42:35 +0800 Message-ID: <87a7gu8nqs.fsf@riseup.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFBRS-00056A-Qt for help-guix@gnu.org; Sat, 13 Apr 2019 01:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFBRR-0003zM-Ir for help-guix@gnu.org; Sat, 13 Apr 2019 01:43:06 -0400 Received: from mx1.riseup.net ([198.252.153.129]:46912) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hFBRP-0003t4-08 for help-guix@gnu.org; Sat, 13 Apr 2019 01:43:04 -0400 In-reply-to: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Adam Mazurkiewicz Cc: help-guix@gnu.org Hi Adam, Adam Mazurkiewicz writes: > What is the way to synchronize files with a remote storage like > Dropbox? I work in several places and I need to get the same document > files in these places. On Debian I was using just Dropbox. I need a > free solution from Guixsd. I strongly suggest you to try syncthing! It's fantastic! #+begin_quote Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software. -- Wikipedia #+end_quote Rclone is another option. It can be used as a client for many online storage providers (including Dropbox), but it cannot be run as a daemon and cannot monitor file system events. So I don't like it. You should not run non free software on your computer. But if you have to use Dropbox for whatever reason, there is actually a way to run Dropbox on Guix. Disclaimer: I don't run Dropbox on my computer now. This is a generic method to run binary-distributed dynamically-linked foreign apps on Guix. THIS IS DEFINITELY NOT OFFICIALLY SUPPORTED BY THE GUIX MAINTAINERS TEAM. YOU SHALL FIX ANY BUGS BY YOURSELF WHILE DOING SO. Instructions for running Dropbox on Guix system x86_64: 0. Pray with me. #+BEGIN_QUOTE Forgive me Stallman for I have sinned. #+END_QUOTE 1. Download Dropbox for Linux from https://www.dropbox.com/install-linux. #+begin_src sh # Download and install the dropbox package cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - # Download the command line script wget -O dropbox.py "https://www.dropbox.com/download?dl=packages/dropbox.py" #+end_src 2. Make sure /lib64/ld-linux-x86-64.so.2 points to /gnu/store/*-glibc-*/lib/ld-linux-x86-64.so.2. You can achieve this by installing the glibc package into system profile and symlink "/lib64" to "/run/current-system/profile/lib" 3. Install these packages into your profile: #+begin_src scheme (define dropbox-dependencies (map (compose list specification->package+output) '("fontconfig" "freetype" "gcc:lib" "libice" "libsm" "libxcomposite" "libxkbcommon" "libxml2" "libxmu" "libxrender" "libxslt" "mesa" "python"))) #+end_src I get this list by `ldd .dropbox-dist/dropbox-lnx.*/*`. Please add extra dependencies into it if this list is incomplete. The python package is for the command line script. 4. Write a wrapper script to start Dropbox. Set the LD_LIBRARY_PATH environment variable so that foreign apps can find and load their dependencies. Only set LD_LIBRARY_PATH in this script and do not export LD_LIBRARY_PATH from your shell because you may break things. script: dropbox-wrapper #+begin_src sh #!/bin/sh export LD_LIBRARY_PATH="/run/current-system/profile/lib" export LD_LIBRARY_PATH="$HOME/.guix-profile/lib:$LD_LIBRARY_PATH" python3 path/to/dropbox.py "$@" #+end_src 5. Run the wrapper script. #+begin_src sh dropbox-wrapper start #+end_src AGAIN: YOU SHOULD NOT RUN NON FREE SOFTWARE ON YOU COMPUTER. YOU SHOULD ONLY DO THIS WHEN SOMEONE POINTS A GUN ON YOUR HEAD AND FORCES YOU DO IT. -- Meiyo Peng https://www.pengmeiyu.com/