# How to install dropbox or any other virtual disk?

## rado3105

Hi I would like to use virtual internet disk. I found dropbox, looks very interesting. I dont know how to install it, it is not in portage. Could you help or is any better free alternative?

----------

## Zepp

If you want to use it with nautilus there is an ebuild in bugzilla. if you just want the daemon you can install it manually from source, there are instructions on the dropbox website. http://www.getdropbox.com/downloading?os=lnx

----------

## rado3105

Is any alternative running on linux for free? I just find out that there are allowed only 2 computers to use it.

----------

## frenkel

Where did you find that? I use it with 3 and it works fine...

----------

## Zepp

 *frenkel wrote:*   

> Where did you find that? I use it with 3 and it works fine...

 Ya, I also use it with a bunch.

----------

## rado3105

sorry my mistake it is working, Is anything similar(open) you can trust, this is closed and you dont know what it is doing on your system and what it is doing with your data.

----------

## Zepp

Not unless you have access to some server. Sure, you could use vcs software like git or just something simple like rsync. But the big issue is where do you keep the files.

----------

## KaZeR

Following http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall it's very easy to install and use.

About the privacy of your datas, you could still gpg --encrypt your files before sync'ing them.

----------

## slackline

I've been using the nautilus-dropbox version for some time but am going to switch to the CLI dropboxd and after a bit of research it looks like using Jail should address any and all concerns with regards to closed-source code.

Simply a case of adapting the Wiki article to doing things with the CLI dropboxd.

----------

## slackline

Ok, as of  2011/07/02 =net-misc/dropbox-1.2.13 has been in portage, its had a couple of tweaks and is now on =net-mis/dropbox-1.2.13-r2.  Its missing an init script (but some are provided on the Dropbox Wiki and I've added a note to a bug that they should be available too, see 378719).

Anyway, I'm thinking its time to ditch nautilus-dropbox in favour of this headless approach.

Anyone done this yet, is it simply a case of 

```

emerge -C nautilus-dropbox && emerge --depclean
```

...and then installing and adding the initscript?

Insights/experiences appreciated,

Ta,

slack

----------

## slackline

Well to answer my own question I went ahead and switched to net-misc/dropbox...

```

emerge -C gnome-extra/nautilus-dropbox && emerge --depclean && emerge net-misc/dropbox

```

Create /etc/init.d/dropbox with the following content (tweaked slightly from that on the wiki as '-o' is deprecated and '-u' should be used instead of '-c').  You should also substitute 'will' in the below example to the list of users on your system who you wish to have access to dropbox

```

#!/sbin/runscript

# Copyright 1999-2004 Gentoo Foundation

# Distributed under the terms of the GNU General Public License, v2 or later

# $Header: /var/cvsroot/gentoo-x86/sys-fs/dropbox/files/dropbox.init-1.0,v 1.4 2007/04/04 13:35:25 cardoe Exp $

DROPBOX_USERS="will"

NICENESS=5

depend() {

    need localmount net

    after bootmisc

}

start() {

    ebegin "Starting dropbox..."

    for dbuser in $DROPBOX_USERS; do

        start-stop-daemon -S -b -m --pidfile /var/run/dropbox-$dbuser.pid  -N $NICENESS -u $dbuser -v -e HOME="/home/$dbuser" -x /home/$dbuser/.dropbox-dist/dropboxd

    done

    eend $?

}

stop() {

    ebegin "Stopping dropbox..."

    for dbuser in $DROPBOX_USERS; do

        start-stop-daemon --stop --pidfile /var/run/dropbox-$dbuser.pid

    done

    eend $?

}

status() {

    for dbuser in $DROPBOX_USERS; do

        if [ -e /var/run/dropbox-$dbuser.pid ] ; then

            echo "dropboxd for USER $dbuser: running."

        else

            echo "dropboxd for USER $dbuser: not running."

        fi

    done

    eend $?

}
```

Then make the script executable, start the daemon and optionally add to your default run level...

```

chmod 0755 /etc/init.d/dropbox

/etc/init.d/dropbox start

rc-update add default dropbox

```

That should do the trick   :Smile: 

slack

----------

## xenspidey

 *slack---line wrote:*   

> 
> 
> ```
> 
> start() {
> ...

 

----------

## undrwater

If you copy everything from /opt/dropbox into your user location, it will work.

----------

## andrewwalker27

That seems a bit of a drastic solution?

What should I have in /home/$dbuser/.dropbox-dist/ ?

Do I need dropbox, dropboxd or the whole contents of /opt/dropbox? Surely this can be achieved with a soft link but why is that even necessary?

I'm a bit confused to say the least!

By the way, I think you meant 

rc-update add dropbox default 

in case anyone is having problems.

----------

## anotherguy

 *andrewwalker27 wrote:*   

> That seems a bit of a drastic solution?
> 
> What should I have in /home/$dbuser/.dropbox-dist/ ?
> 
> Do I need dropbox, dropboxd or the whole contents of /opt/dropbox? Surely this can be achieved with a soft link but why is that even necessary?
> ...

 

```
$ man /usr/share/doc/dropbox-[version]/README.bz2
```

 *Quote:*   

> To install just place this directory (.dropbox-dist) in your home directory (~, $HOME)
> 
> To run simply run this command:
> 
> $ ~/.dropbox-dist/dropboxd

 

```
$ equery files dropbox
```

It basically looks like /opt/dropbox == the ".dropbox-dist" directory referenced in the manual page.

To *directly* answer your questions:

1. Yes, it is not a good solution.  If it is meant to be run as a service, there should be an /etc/init.d/dropbox file included.

2. The entire contents of /opt/dropbox CAN be copied to your home directory (so $ cp -r /opt/dropbox ~/.dropbox-dist) and this will work, but don't do this.

3. You will need to copy the entire contents of /opt/dropbox.  But again, don't do this.

4. Yes, you can create a soft-link (ln -s /opt/dropbox /home/[user]/.dropbox-dist).

5. I am too!  This was the last forum discussion I could find and I remember when I installed it 1.5 years ago, dropbox was not in portage yet.  The easiest way to install it still seems to forego portage and follow their linux instructions on their site.

Their site seems to be down, but you can access their pages via google with (the 2nd link is the script above without the changes made):

cache:http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall

cache:http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall/GentooStartup

----------

