You are not logged in.
Pages: 1
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
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
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
Last edited by zwoggel (2010-05-10 10:30:46)
Offline
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!
Last edited by hokasch (2010-05-10 10:25:08)
Offline
Hm, maybe i should try that nautilus version...
THX for that hint, I will look into it when I get home
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
I switched to wicd for that reason. No connection issue now.
Offline
I switched to wicd for that reason. No connection issue now.
The problem is not the connection itself, but the way Dropbox behaves
Offline
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
Use netcfg instead of networkmanager.
Key word: POST_UP.
no place like /home
github
Offline
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
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
Offline
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..."
Last edited by zwoggel (2010-05-11 18:05:25)
Offline
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
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
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
Very nice piece of code!
Helped a lot!
Thanks!
Offline
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
[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
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
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
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
Offline
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?
it's all a little over my head...
Offline
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
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
Pages: 1