You are not logged in.

#1 2010-05-10 10:11:11

zwoggel
Member
Registered: 2010-05-09
Posts: 5

My new Arch - Dropbox problem

Hello Arch community,

I just spent the last 2-3 days installing, downloading, reading this forum and the wiki and configuring my new Arch installation on my Dell Studio 1557 and I now have a nice fast little gnome environment that fits my needs big_smile
First of all: Arch Linux is really great. I've been a pure Windows user for the last few years and I tried out some linux stuff on my notebook lately. Arch Linux was the only one that really gave me the chance to build my own system without hours of compiling and without having tons of crap installed that I don't use. I'm not totally finished yet, but that is another thing...

Now I have one problem that bugs me atm:
I installed Dropbox from the AUR (not the nautilus version) and it basically works... but only if i start it after networkmanager has established my wireless connection hmm
Right now it's like: Dropbox starts, tries to connect... wireless connection ist not established yet -> no connection possible; Then networkmanager is doing his work and connects to my wireless network -> connection ist there, but Dropbox resides in the "Connecting" state and it doesn't change -> no sync. I have to stop and restart it, then it instantly connects and syncs my folder.

Is there any (easy) way to make Dropbox start after connecting to the wireless network?

PS: Please excuse any grammatical mistakes, my native language is german tongue

Last edited by zwoggel (2010-05-10 10:30:46)

Offline

#2 2010-05-10 10:22:53

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: My new Arch - Dropbox problem

Here is a workaround: Open Startup Applications and edit "dropbox", change the command to something like

sh -c "sleep 15 && /opt/dropbox/dropboxd"

to delay Dropbox startup for 15 seconds. You can also use netcfg instead of networkmanager to have wireless up early.

However, dropbox reconnects fine for me after a connection drop, I have nautilus-dropbox installed (not sure why that should make a difference though).

edit: could you edit the thread title to something more specific? and: welcome to arch! smile

Last edited by hokasch (2010-05-10 10:25:08)

Offline

#3 2010-05-10 10:49:09

zwoggel
Member
Registered: 2010-05-09
Posts: 5

Re: My new Arch - Dropbox problem

Hm, maybe i should try that nautilus version...

THX for that hint, I will look into it when I get home smile

Edit: Does netcfg interfer with networkmanager in any way, because I want to use nm for a VPN connection I sometimes need.

Last edited by zwoggel (2010-05-10 10:58:45)

Offline

#4 2010-05-10 15:08:52

boulde
Member
Registered: 2009-10-05
Posts: 41

Re: My new Arch - Dropbox problem

I switched to wicd for that reason. No connection issue now.

Offline

#5 2010-05-10 17:37:35

zwoggel
Member
Registered: 2010-05-09
Posts: 5

Re: My new Arch - Dropbox problem

boulde wrote:

I switched to wicd for that reason. No connection issue now.

The problem is not the connection itself, but the way Dropbox behaves smile

Offline

#6 2010-05-10 17:41:57

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: My new Arch - Dropbox problem

Follow it Upstream!

i.e., http://forums.dropbox.com/topic.php?id= … ost-124423

Last edited by hokasch (2010-05-10 17:44:30)

Offline

#7 2010-05-10 17:50:19

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: My new Arch - Dropbox problem

Use netcfg instead of networkmanager.
Key word: POST_UP.


no place like /home
github

Offline

#8 2010-05-10 18:54:31

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: My new Arch - Dropbox problem

I agree about wicd. This is a Dropbox problem (I have the same issue actually) but since wicd seems to start the connection before I log in, I never really run into this problem anymore. I didn't use AUR, I just downloaded the client and put it in my home directory manually, and told KDE to autostart the daemon.

Offline

#9 2010-05-11 04:34:51

Diaz
Member
From: Lisbon, Portugal
Registered: 2008-04-16
Posts: 361
Website

Re: My new Arch - Dropbox problem

jlacroix wrote:

I agree about wicd. This is a Dropbox problem (I have the same issue actually) but since wicd seems to start the connection before I log in, I never really run into this problem anymore. I didn't use AUR, I just downloaded the client and put it in my home directory manually, and told KDE to autostart the daemon.

i use it like you, and with kde and same problem, i just got tired of it and removed from autostart. Now i just start it when i really need hmm


Owner of Asus 1215B :: User of Xfce :: Vasco Dias @blog

Offline

#10 2010-05-11 07:56:08

zwoggel
Member
Registered: 2010-05-09
Posts: 5

Re: My new Arch - Dropbox problem

I just downloaded the experimental version 0.8.57
Maybe that works...

Edit: Well, i installed that new version and now it resides on "Initializing..." hmm

Last edited by zwoggel (2010-05-11 18:05:25)

Offline

#11 2010-06-18 20:16:18

onemyndseye
Member
Registered: 2010-06-18
Posts: 4

Re: My new Arch - Dropbox problem

I was affected by this problem and wrote the follow bit of code as a workaround:

/usr/bin/dropboxd

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

kill -9 $(pidof dropbox) >/dev/null 2>&1
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but
      # last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ifconfig |grep "inet addr:" |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}
 
do_dropbox

Hope this helps someone

Last edited by onemyndseye (2010-06-18 20:17:22)

Offline

#12 2010-07-13 11:57:46

frabjous
Member
Registered: 2010-07-13
Posts: 318

Re: My new Arch - Dropbox problem

onemyndseye wrote:

I was affected by this problem and wrote the follow bit of code as a workaround:

...
Hope this helps someone

It helped me. Thanks a lot!

Offline

#13 2010-07-20 05:16:21

onemyndseye
Member
Registered: 2010-06-18
Posts: 4

Re: My new Arch - Dropbox problem

Very good!  glad it helped..

The script isnt perferct as there is no locking or error checking so sometimes it will glitch out and a 'kill -9 $(ps ax |grep dropbox)' is needed...  but it makes things run relative smooth.

Offline

#14 2010-09-03 14:17:36

Fatore
Member
From: Brazil, São Paulo
Registered: 2010-09-03
Posts: 2

Re: My new Arch - Dropbox problem

Very nice piece of code!
Helped a lot!

Thanks!

Offline

#15 2010-09-26 16:58:28

varg04444
Member
From: Colombia
Registered: 2009-09-26
Posts: 21

Re: My new Arch - Dropbox problem

Hi everybody,

I had same problem, and i solved it changing the session daemon. For this, quit the dropbox daemon (right clic on dropbox system tray icon and uncheck "Start Dropbox on system startup") and after add to session aplications the next script:

    #!/bin/sh
    #Script by Vialrogo:

    while [ `nm-tool|grep State|cut -f2 -d' '` != "connected" ]
        do
            sleep 10
        done

    dropboxd start &

With this Dropbox wait for state "connected" and after run the daemon. I hope that this help you.

PS: Please sorry for the bad english, i speak spanish smile


[EN] In the world there are 10 kinds of people, those who understand binary and those who not.
[ES] En el mundo hay 10 tipos de personas, las que entienden binario y las que no.

Offline

#16 2010-10-09 05:13:23

manzdagratiano
Member
From: New Jersey, USA
Registered: 2010-10-08
Posts: 137

Re: My new Arch - Dropbox problem

onemyndseye wrote:

I was affected by this problem and wrote the follow bit of code as a workaround:

/usr/bin/dropboxd

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

kill -9 $(pidof dropbox) >/dev/null 2>&1
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but
      # last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ifconfig |grep "inet addr:" |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}
 
do_dropbox

Hope this helps someone

Woohoo!!! Many many thanks! I was plagued by this issue, and this worked superbly for me.... I just modified the script a little for error checking like you mentioned - with a `ps ax' to check for whether dropbox is running before trying to kill it. I love the fact that the script would restart dropbox in the event of a connection loss/reconnection. The modified script is as follows:

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

TMP1=`ps ax|grep dropbox|grep -v grep`
if [ -n "$TMP1" ]; then
  kill -9 $(pidof dropbox) >/dev/null 2>&1
fi
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ifconfig |grep "inet addr:" |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}

do_dropbox

Many thanks also to varg04444 for suggesting his very simple script - I did not go with that only because it would not restart dropbox in the event of a reconnection.


Be formless, shapeless... like water. Now you put water into a cup, it becomes the cup; you put water into a bottle it becomes the bottle; if you put it in a teapot it becomes the teapot... Now water can flow, or it can crash... Be water my friend

Offline

#17 2010-10-09 05:16:15

manzdagratiano
Member
From: New Jersey, USA
Registered: 2010-10-08
Posts: 137

Re: My new Arch - Dropbox problem

Also, for some reason I find it quite an amazing coincidence that varg04444 would make a post describing the solution exactly one year after he registered on the Arch forum!


Be formless, shapeless... like water. Now you put water into a cup, it becomes the cup; you put water into a bottle it becomes the bottle; if you put it in a teapot it becomes the teapot... Now water can flow, or it can crash... Be water my friend

Offline

#18 2010-10-18 02:06:21

neimad
Member
Registered: 2007-11-28
Posts: 4

Re: My new Arch - Dropbox problem

I had the same problem and struggled with the dispatcher before I got here.
Thanks onemyndseye and manzdagratiano, the script is great and works perfectly smile

Offline

#19 2011-03-24 10:18:05

HappySam
Member
Registered: 2011-03-24
Posts: 1

Re: My new Arch - Dropbox problem

Hi all,

sorry for such an elementary question, and for reviving such an old thread, but i was wondering:

does the above script replace the existing /etc/rc.d/dropboxd, or is it placed somewhere within this text file?

sad it's all a little over my head...

Offline

#20 2011-07-24 14:32:52

Evilandi666
Member
Registered: 2010-10-28
Posts: 105

Re: My new Arch - Dropbox problem

Thx again for the script @manzdagratiano and @onemyndseye, dropbox changed a bit, so the script replaces now /opt/dropbox/dropboxed (/usr/bin/dropboxd is just a symlink to that).

Works nice!

Offline

#21 2011-11-30 12:28:01

efouladi
Member
Registered: 2011-11-30
Posts: 1

Re: My new Arch - Dropbox problem

manzdagratiano wrote:
onemyndseye wrote:

I was affected by this problem and wrote the follow bit of code as a workaround:

/usr/bin/dropboxd

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

kill -9 $(pidof dropbox) >/dev/null 2>&1
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but
      # last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ifconfig |grep "inet addr:" |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}
 
do_dropbox

Hope this helps someone

Woohoo!!! Many many thanks! I was plagued by this issue, and this worked superbly for me.... I just modified the script a little for error checking like you mentioned - with a `ps ax' to check for whether dropbox is running before trying to kill it. I love the fact that the script would restart dropbox in the event of a connection loss/reconnection. The modified script is as follows:

#!/bin/sh

# Copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

TMP1=`ps ax|grep dropbox|grep -v grep`
if [ -n "$TMP1" ]; then
  kill -9 $(pidof dropbox) >/dev/null 2>&1
fi
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ifconfig |grep "inet addr:" |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}

do_dropbox

Many thanks also to varg04444 for suggesting his very simple script - I did not go with that only because it would not restart dropbox in the event of a reconnection.

Since ifconfig is deprecated now, I made a small change in the script to use ip command instead:

#copyright 2008 Evenflow, Inc., 2010 Dropbox
#
# Environment script for the dropbox executable.

start_dropbox() {
PAR=$(dirname $(readlink -f $0))
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH

TMP1=`ps ax|grep dropbox|grep -v grep`
if [ -n "$TMP1" ]; then
  kill -9 $(pidof dropbox) >/dev/null 2>&1
fi
exec $PAR/dropbox $@ &
}

do_dropbox() {
start_dropbox >/dev/null 2>&1
while [ 1 ]; do
  sleep 5
  ERROR="$(net_test)"
  if [ -n "$ERROR" ]; then
    LAST_ERROR=1
  else
    if [ -n "$LAST_ERROR" ]; then
      # Connection seems to be up but last cycle was down
      LAST_ERROR=""
      start_dropbox >/dev/null 2>&1
    fi
  fi
done

}

net_test() {
TMP1="$(ip addr |grep "inet " |grep -v "127.0.0.1")"
[ -z "$TMP1" ] && echo "error"
}

do_dropbox

Offline

Board footer

Powered by FluxBB