Dropbox
Drop box is service that lets you share files easily between your laptop and the Demography Lab network. For 2GB or less, the service is free. The useful/cool thing about DropBox is that any changes you make to files in the special directory are automatically synchronized across all of the machines that you use it on.
To use Dropbox you must have a Dropbox account. Let's assume that you already have one, then all you need to do is configure the Dropbox client on the Demography Lab server.
New instructions for Dropbox on the Demography / Population Sciences network
The Dropbox setup has been a pain to maintain as the Linux development and Dropbox restrictions came into increasing conflict. The latest method for making use of Dropbox tries to workaround some of the restrictions, but there are no guarantees. If Dropbox is not working for you, then try some other way to move your data storage from place to place. Rclone is the lingua franca of copy utilities and is well worth your time in learning.
Dropbox and Selective Sync.
It is important that you use the Selective Sync feature of Dropbox in order to reduce what you store on our storage system. Selective Sync lets you pick and choose which folders you wish Dropbox to track and keep in sync on our system. We don't need to see your fine taste in movies and videos. Notify trouble@demog.berkeley.edu if you really need to have more than 100G of Dropbox content active on the system. Remember, you are sharing the network connection with all users of the system, so don't hog the bandwidth.
- On quigley/noMachine/nmx, bring up a terminal window.
- Run
ssh dropbox0
to connect to the virtual machine which now handles all things Dropbox. You will keep this terminal connection running...if you log out of the server your dropbox session will terminate, but it is easy to just resume. - On the dropbox server that you logged into, type
dropbox0 update
which will create and/or update the dropbox distribution. You may skip this step if you already have a working Dropbox and are just reconnecting to launch Dropbox again. - after the distribution downloads, type
dropbox0 start
At this point, you will get some stuff on the console window, but also should get the familiar dropbox icon on your screen up in the upper right. You will also get a browser window which pops up. - Use the browser to log into your dropbox account and activate the computer where you just started dropbox. If you have a free Dropbox account, you may have to drop one of the sites where you activated dropbox, as you can have a maximum of 3 locations with a free account.
- Choose the dropbox icon / Preferences/ Sync and choose a small selection of folders to sync. You can change your selection at any time and Dropbox will either populate a new selection into your Dropbox store, or delete a collection when you uncheck it from the list.
- You may monitor the status of the dropbox, recently updated files, etc. via the GUI icon. You can also choose to see the Dropbox folder, and if you do so a nautilus file explorer should popup. For me the file icons are huge, but you can reduce the size of those via the pull down menu and clicking the '-' sign.
- You can sign out of dropbox using the GUI or you can say 'dropbox0 stop' in the terminal console on the host
dropbox0
.
NB: you may ignore everything below the line
IT MIGHT BE USEFUL TO KNOW that Dropbox runs differently here
In order for Dropbox to work properly in a networked environment, it is necessary to trick it a little bit. We have written local software that handles all the required deception, so if you're not he curious type, you can skip this section,and come back to it when something goes wrong.
One thing that you do need to know is that the dropbox client runs on the noMachine host -- so if you are not logged in on noMachine, dropbox will not startup. Your dropbox folder is accessible from all the server and changes are synced regardless of which machine you are running on -- as long as you have a noMachine desktop going. Once you are logged in via noMachine, (after the one time setup) dropbox will do its magic even when you do your work on a different server.
Local Modifications
The principle difficulties with Dropbox in a networked environment are these:
- Dropbox does not start up until the user logs into the ONE machine on which dropbox runs.
- Dropbox only perceives that files have changed if those files live on a disk that is physically owned by the server.
- It is painful and pointless to backup Dropbox directories.
In order that Dropbox work as we would like: that is, it should start up when you log in AND it should update files to the cloud regardless of how you modify them... We do the following:
- we set up a special share for you called /data/Dropbox0/<userid> which is physically owned by the noMachine server, quigley, but is shared to all other machines
- we trick Dropbox into thinking that /data/Dropbox0/<userid> is your home directory.
- we wrote a local program implements all of this without you *having* to be aware...unless something goes wrong. That program is launched by the caja-dropbox menu item or by typing:
caja-dropbox start -i
on the command line.
Setting up DropBox on the Demography Lab server FOR THE FIRST TIME
These directions assume that you have NEVER tried to setup dropbox at the Demography Lab before BE honest -- if this is not you, this will not work. Instead you should start with the instructions for Removing Dropbox then come back here to install it fresh.
If you have not already done so, install DropBox on your personal computer and sign up for a Dropbox account at http://dropbox.com. The instructions below are for setting up Dropbox on the Demography Lab server. It does not make a lot of sense to do this unless you are already running it on you personal computer.
Important It is unwise, insecure and unhygienic to simply connect your entire Dropbox folder to the DemographyLab server. The directions below instruct you to share only a folders that you need in order to do science. Nothing good can come of storing your massive collection of pirated videos on the Demography server.
- ->Determine which of your Dropbox folder(s) you would like to sync to the DemogLab server. These folder(s) should already exist in your Dropbox cloud and on your personal laptop or whatever computer you own.
- ->Launch your noMachine client and connect to your remote deskton on nmx.demog.berkeley.edu (aka quigley). Quigley is the only demography lab server that runs Dropbox. From the desktop on quigley select the Applications -> Internet -> caja_Dropbox menu item... to launch the Dropbox client installer.
- -> give your email address and password that you use with Dropbox
- ->After signing in look carefully for the Avanced Settings option and select it. It's NOT the big obvious button.
- ->On the Advanced setup options panel leave everything as it is EXCEPT choose the selective sync option:
This should give you the opportunity to select a subset of your dropbox folders for syncing on the Demography Lab servers.
Soon you should be told that your computer is linked and the directories that you chose to sync will soon be copied into your Dropbox folder on the Demography Lab.
If you did everything correctly and the wind was at your back, then you should have a working Dropbox set up. The indications of this happy situation are the following:
- That dropbox did not emit any terrifying error messages.
- That the upper right corner of your desktop has one of these:
- That you have a symlink from ~/Dropbox --> /data/Dropbox0/userid/Dropbox
ls -l ~/Dropbox should show that there are at least a few files in it
- That you have a file called ~/.config/autostart/dropbox.desktop
ls -l ~/.config/autostart/dropbox.desktop
Oooops I screwed up my dropbox setup and now I am sad
If you failed to follow the detailed instructions above or if your the victim of conspiracy that always screws this sort of thing up for you or if you set up dropbox a long time ago and it just doesn't work right anymore... then here's how you start over:
Removing Dropbox so you can start over
Do this carefully and avoid catastrophic loss of data:
- Turn off Dropbox on the server by typing into a terminal:
caja-dropbox stop
- THE SECOND AND MOST IMPORTANT STEP is to unlink the demography server from the dropbox cloud:
sign in to http://dropbox.com look for your name in the upper right corner of the dropbox web site. It hides a menu that includes such things as "Add account photo", "Settings", "Install", "upgrade" ... choose Settings The screen should now have three tabs: "profile", "account" and "security" Choose Security Scroll down until you see the list of "devices" that are syncing: Attach:DropboxUnlink.png find the device that IS the demography server (probably quigley) then click on the corresponding 'X' way over to the right of this screen fragment. Dropbox will warn you and confirm that the server is no longer linked.
It would be unwise to proceed until you are sure that the above steps went correctly
- Remove all signs of Dropbox from your Demography Lab home directory:
This is pretty powerful command so type it very carefully or drag and drop -- if you screw it up you could delete your life's work. /bin/rm -rf ~/.dropbox ~/.dropbox-dist ~/Dropbox ~/.config/autostart/dropbox.desktop
In most cases you are now done deleting dropbox -- but if you set up your Dropbox a long time ago -- or if you are the sort of person who likes to do things differently you might have put your Dropbox folder somewhere other than your home directory (its default location) If so you will need to track it down and destroy it. The most likely nonstandard location is /data/commons. If this sounds like you, email trouble@demog.berkeley.edu.
Congratulations you have undone dropbox. To (re)install see Installing for the first time
Troubleshooting Dropbox
Dropbox only runs on the noMachine server (currently quigley/nmx). And it only works properly if the following are true -- so pretend you are talking to a call center in Bangalor and consider each possiblility below:
- you are logged into quigley via noMachine
- your Dropbox folder is stored in /data/Dropbox0/userid. ( ls -l /data/Dropbox0/${USER} )
- dropbox is running on your desktop:
look for this icon: Attach:DropboxIcon.png ( caja-dropbox status ) you can start dropbox from the Applications ->Internet menu or from the terminal: caja-dropbox start -i to make dropbox autostart whenever you login: cp /data/Dropbox0/dropbox.desktop ~/.config/autostart
- your dropbox account is setup to sync one or more folders with our noMachine server: click on this icon: and explore ... maybe visit dropbox.com
- you have not exceeded your dropbox account capacity (2GB for the free version)
If the above does not clear up the problem, then probably the best and fastest way forward is to start over. See Removing Dropbox for information on how to remove dropbox and Setup for instructions on re(installing)