*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Check out the new and improved 2010 Xtra Ordinary OS for the XO laptop!
Pages: [1]
Print
Author Topic: Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE  (Read 1763 times)

Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE

tor
Commenter

Posts: 7


November 20, 2009, 08:10:37 AM

I just thought I'd let everyone know that Dropbox works perfectly with teapot's Ubuntu 8.10. Dropbox is an excellent backup and file sync service; it will synchronize files between all your computers and store backups online. They also offer version history and undelete features.

Dropbox provides installation packages for Windows, OSX, Ubuntu and Fedora. The Ubuntu packages are unfortunately designed to integrate the Dropbox application with the GNOME desktop, which is less than optimal for users of teapot's Ubuntu and other XFCE users. On my computer, the official Ubuntu 8.10 package would have required the installation of 126 additional packages, mainly because of a Nautilus dependency.

Wanting to avoid this, I skipped the deb package and instead used these instructions from the CrunchBang wiki. Here's a summary of that article, with some very slight modifications for XFCE:
  • Download the Linux binary from the following link: http://www.getdropbox.com/download?plat=lnx.x86
  • Extract and move .dropbox-dist to ~/.dropbox-dist
    (This directory will be hidden, so you'll have to show hidden files (Ctrl-H in Thunar) in order to see it)

Execute the following in a terminal:
Code:
mkdir ~/bin && touch ~/bin/nautilus && chmod +x ~/bin/nautilus && gedit ~/bin/nautilus &
Paste the following text into the editor:
Code:
#!/bin/bash
exec thunar $@
exit 0
Save the file and exit.

Then execute this:
Code:
touch ~/bin/dropbox.sh && chmod +x ~/bin/dropbox.sh && gedit ~/bin/dropbox.sh &
Paste the following:
Code:
# Just in case some random app calls on Nautilus, lets set some safeguards to minimise the impact:
# Disable Nautilus desktop, because we really really do not want it!
gconftool-2 -s -t bool /apps/nautilus/preferences/show_desktop false &
# Do not let Nautilus set the background, because we really really do not want this either.
gconftool-2 -s -t bool /desktop/gnome/background/draw_background false &
# Make Nautilus use spatial mode, should start-up quicker.
gconftool-2 -s -t bool /apps/nautilus/preferences/always_use_browser false &
# Make Nautilus show the advanced permissions dialog -- if it has to start, lets at least make it usable :)
gconftool-2 -s -t bool /apps/nautilus/preferences/show_advanced_permissions true &
# And finally...
# ...start dropbox daemon, but give it a minute so we can establish a net connection.
# If this script is autostarted on login, comment out the last line and uncomment the second to last one:
# (sleep 60s && ~/.dropbox-dist/dropboxd) &
~/.dropbox-dist/dropboxd &
Save the file and exit.

You can now execute dropbox.sh whenever you want to use Dropbox. The application runs fairly unobtrusively in the system tray. For convenience, you may want to run it automatically on every login - I prefer not to as it uses about 40-50 MB of memory.

To enable autostart, first make a small change in dropbox.sh: Comment out the last line and uncomment the second to last one. Then open the XFCE menu and select Settings -> Settings Manager -> Autostarted apps. Add an entry here for ~/bin/dropbox.sh

Dropbox provides 2 GB of free storage, or paid plans of 50 or 100 GB. Feel free to use my referral link to get an extra 250 MB of free storage: https://www.dropbox.com/referrals/NTMwOTM5NjM5. (I will get 250 MB for every signup as well, up to a limit of 3 GB - but I'm far too altruistic to care about that of course... Tongue) If you complete the "getting started" guide after signing up you will get an additional 250 MB bonus.

Good luck!
« Last Edit: November 21, 2009, 05:38:04 AM by tor » Logged

#1 Re: Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE

mavrothal
Global Moderator
OLPC News Forum Expert
****
Posts: 793


November 20, 2009, 03:25:37 PM

Pretty nice!
However, the paths do not need the tidle (~) but plain /bin  and thus should be executed as sudo so sudo -s should be typed in the beginning of the process.

Pls edit so I can quote only one "solution" post Grin
Logged

XO: Is never going to run Flash, but is certainly flashy!

#2 Re: Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE

tor
Commenter

Posts: 7


November 20, 2009, 11:24:20 PM

Thanks for your reply. The tilde character refers to your home directory, i.e. /home/<username> for most distros, /home/olpc in teapot's Ubuntu. Whenever you type this character in the terminal it is automatically resolved to that path; so the full path of the extracted files will be /home/olpc/.dropbox-dist and the path names of the two executable files you create are /home/olpc/bin/nautilus and /home/olpc/bin/dropbox.sh. No sudo needed as all file operations are done in your home directory.

An effect of putting user-created executable files in /home/<username>/bin is that they then can be executed by just typing the file name, no matter what your current working directory is: Just press Alt-F2 and type dropbox.sh or type dropbox.sh in your terminal.
Logged

#3 Re: Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE

mavrothal
Global Moderator
OLPC News Forum Expert
****
Posts: 793


November 21, 2009, 02:59:55 AM

I guess what I'm saying is that if someone tries to execute the commands as given and since there is no ~/bin folder by default, gets  error messages and the commands are not executed. So (s)he needs to generate the ~/bin folder first. In contrast /bin, /usr/bin and /usr/local/bin are already there and in the path.
So either the instructions should get amended with mkdir bin (if not already there) or remove the tilde and execute as sudo (that makes them also available to other users).

 
Logged

XO: Is never going to run Flash, but is certainly flashy!

#4 Re: Using the Dropbox backup/file sync service in teapot's Ubuntu/XFCE

tor
Commenter

Posts: 7


November 21, 2009, 05:57:27 AM

My apologies, I misunderstood your first post. You are of course right about the commands failing - this never occurred to me as I already had a ~/bin directory before I read the CrunchBang wiki article. I have updated my post accordingly.

My personal preference is for keeping all my user-created executable files in the ~/bin directory because this makes them more accessible for modifications and backup. As you point out though, it would of course make more sense to keep them in one of the global directories when on a multi-user system.
Logged
Pages: [1]
Print
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2010, 10:27:23 AM

Login with username, password and session length
Recent Topics
[Today at 07:59:34 AM]

[Today at 04:59:41 AM]

[Today at 12:50:43 AM]

[February 08, 2010, 11:43:34 PM]

[February 06, 2010, 01:30:32 PM]

[February 05, 2010, 05:14:11 PM]

[February 04, 2010, 07:21:32 PM]

[February 04, 2010, 01:50:58 PM]

[February 02, 2010, 07:37:01 PM]

[February 02, 2010, 12:28:12 PM]
Members
Total Members: 4129
Latest: 405610907
Stats
Total Posts: 30205
Total Topics: 3648
Online Today: 82
Online Ever: 220
(February 05, 2009, 11:29:32 AM)
Users Online
Users: 0
Guests: 56
Total: 56