9 tricks with Dropbox
Who will surprise with cloud storage today? Many use such services daily. However, any data storage service can find very unexpected ways to use it: for synchronizing settings between computers, storing notes, remotely controlling a PC, hosting Git repositories and many other, sometimes completely unobvious things.
There are already several hundred services that allow you to store data on a cloud drive (for example, have you ever heard of Seafile?). However, in this article we will talk about the most popular and universal of them - Dropbox. It works everywhere and on everything; it is supported by thousands of applications and web app. And if you don’t have a Dropbox account, you have spent the last ten years in a cryogenic chamber.
Personal iTunes
Let's start with the simplest thing - storing music. For this purpose, Dropbox is simply perfect: just place the MP3 in the Dropbox folder on your computer and then listen to it on another machine or mobile device using the official application or on dropbox.com.
But this approach has its own problems. The mobile version of the Dropbox application for any platform simply does not have the function of automatically synchronizing the entire disk. Of course, you can mark the file for offline access, but you will have to do this for each track individually. And listening to music directly through the Dropbox client is not only strange but terribly inconvenient.
In this situation, a player with built-in Dropbox support will not interfere. There are many of those. If you have Android, install AirBeats or CloudPlayer. iOS? Your option is Jukebox. Windows Phone ... we will not criticize your choice, but there is an application for you, it is called Smart Player.
All of them are able to download music information from Dropbox, catalog, merge into albums and even listen offline (by downloading in advance). If you really value your favorite player and do not want to change it, then there is another way (at least if you are an Android user) - Dropsync application. This is a kind of desktop version of the Dropbox client for a smartphone. It automatically syncs the cloud disk or individual folders with the smartphone’s memory card.
Photo CloudPlayer
2. Synchronization of books and reading position
The same Dropsync is convenient to use to synchronize the archive of books between the computer and devices. A similar function is supported by many readers. For example, FBReader can save every open book on a device to Dropbox or Google Drive, so that it becomes available on all other devices.
Many readers, including the same FBReader and Moon Reader, use Dropbox to synchronize their reading position. So you can start reading a book on a tablet at home, and continue on your smartphone in the subway.
3. Synchronization of configs
Let's say you have several machines: a home computer, a laptop and a netbook. The same operating system is installed on all of them, and you would like the settings of installed applications to be automatically synchronized between all machines.
If you use macOS or Linux, then synchronization will be easy to organize with your bare hands. It is enough to transfer the application settings file to Dropbox, and then create a link to it inside Dropbox instead of the original file. For example, synchronizing Bash settings is done in three commands:
code -
$ mkdir ~/Dropbox/configs
$ mv ~/.bashrc ~/Dropbox/configs/
$ ln -s ~/Dropbox/configs/.bashrc ~/.bashrc
If you run these three commands on the donor machine, and the last on all other machines (deleting the original config if necessary), then any changes to Bash settings are automatically synchronized with the rest of the machines.
In order not to bother with the manual transfer of settings, you can use the Mackup script. It supports a huge number of applications, and all that needs to be done to synchronize settings is to install it.
code -
$ brew install mackup // macOS
$ pip install mackup // Linux
Now turn on synchronization.
$ mackup backup
It does the same as the described commands, that is, it simply transfers the settings to Dropbox. On a new, not yet synchronized machine, run the mackup restore command.
But what if you use Windows? In this case, everything is very sad. Here applications can store settings anywhere, starting from their own folder and ending with the registry, so it takes a long time to figure out where everything is and copy files by hand.
4. Notes
4. Notes
Dropbox can be a convenient place to store notes. Not only because it is accessible from any device, but also because you can edit notes in your favorite text editor. On your phone or tablet, you can, for example, use Plain.txt for Android or Drafts for iOS.
By the way, users of desktop Windows will not be amiss to save the “Documents” folder in Dropbox. To do this, right-click on the folder, select "Properties" and specify the path inside the Dropbox folder instead of the standard path.
5. Torrents
Any popular torrent client supports automatic pickup of torrent files from the specified folder. For example, in Transmission there is an option “Search torrent files”, which allows you to select a folder, torrent files from which will be queued for download. Naturally, no one forbids placing such a folder in Dropbox and adding torrents to it from a smartphone, while being on the other side of the city.
6. Passwords
Most of us use password managers. For some, the built-in function for saving passwords in the browser is enough, many prefer LastPass, others do not trust the clouds and choose 1password or KeePassX to store passwords on the disk without synchronization with other machines.
In any case, password managers are always a compromise. Either you give the passwords to the cloud storage and hope that its owners will not give you up, or you put up with the inconvenience of copying the password database to your devices. Dropbox allows you to combine the advantages of both solutions without losing anything. It is enough to use the local password manager, place its database in the Dropbox folder and put a complex password on it.
In the case of KeePassX, this can be done by selecting the menu "Storage -> Save Storage As ..." and specifying the file inside Dropbox. The database will be synchronized with all your machines, and thanks to AES encryption, Dropbox employees or those who gained access to your cloud drive are unlikely to be able to decrypt it.
7. Encrypted storage
Passwords are not the only thing that can and should be stored in Dropbox in encrypted form. The fact is that, despite the company’s statements about full encryption of user data, this encryption is implemented on the server side, which means that all keys for decryption are stored in the same place. If necessary, Dropbox employees can easily decrypt your drive and give this data to anyone you need (and you will be lucky if it is the FBI).
Therefore, it is better to store especially important information in a container encrypted using your key. There are plenty of ways to do this, but if you need a cross-platform solution, then you should pay attention to VeraCrypt - the heir to the well-known solution for creating encrypted TrueCrypt volumes.
Officially, VeraCrypt is available for Windows, Linux and macOS, but the data in the containers it created can be opened using many other applications, including mobile. Most importantly, the VeraCrypt volume is very easy to create and mount as a local drive. Just select Create new volume from the menu, set the Dropbox folder as a place to save the volume, specify the encryption algorithm and connect the volume.
8. Personal GitHub
Version control systems, originally invented to coordinate the work of large development teams, are also very suitable for managing personal projects (rollback of changes, merging branches, development of modular applications and other goodies). However, the most popular GitHub service, serving repositories in the format of the equally popular Git system, does not allow you to create private closed turnips for free, and its analogues can often simply not be trusted.
The way out is to create a Git repository in Dropbox. It is very easy to do this: create a folder in Dropbox to store repositories and initialize an empty repository for your project in it (on Windows, all these commands can be executed using git-bash):
code -
$ mkdir ~/Dropbox/git
$ cd ~/Dropbox/git
$ git init --bare project.git
In the project source folder, create a repository and add all the files to it:
code -
$ git init
$ git add .
$ git commit -m "first commit"
Specify the repository in Dropbox as the origin and push it into it:
code -
$ git remote add origin ~/Dropbox/git/project.git
$ git push -u origin master
It's all. The development environment will automatically pick up the repository settings and will push in ~ / Dropbox / git / project.git. To access the source from another machine, just clone the repository:
code-
$ git clone ~/Dropbox/git/project.git project
9. Remote shell
This may seem strange, but Dropbox can be used to execute remote commands on Linux. To do this, just write a small script that will wait for a change in a specific file, read a command from it, execute it, and write the result to another file. This script might look like this:
code -
while true; do
change=$(inotifywait -q -e close_write,create .)
change=${change#./ * }
if [ "$change" = "in" ]; then
$(cat in) > out
fi
done
The script enters an endless loop and waits for the files to change in the current folder (a good idea is to run it in the ~ / Dropbox / remote folder). If the in file has changed, the script reads it, executes the command contained in the file, and writes the result of its execution to out. While this script is running and Dropbox is running on the machine, any commands written to the in file will be executed, regardless of how you wrote them there - from your smartphone, via the website, or from another machine.
Commentaires