[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Way to synchronize files like Dropbox
From: |
Meiyo Peng |
Subject: |
Re: Way to synchronize files like Dropbox |
Date: |
Sat, 13 Apr 2019 13:42:35 +0800 |
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/