Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dropbox killed itself by its daemon
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
joe6302413
n00b
n00b


Joined: 06 Dec 2014
Posts: 26
Location: Taipei, Taiwan

PostPosted: Wed Feb 24, 2016 5:01 am    Post subject: Dropbox killed itself by its daemon Reply with quote

hello guys

Recently I found my dropbox icon didn't show up in the system tray in KDE4. And it is not working at all.
I tried so many possibilities with reinstall and re-login to dropbox several times.
I found my dropbox stopped working when dropbox installed the ".dropbox-dist" folder itself.
Restarting dropbox in command line will give me a "killed" response only.
I guess it is the daemon which killed dropbox itself.
Now, I delete the rc-config of dropbox and start it by hand after reboot.
Also, I create a file with the same name to prevent it crashing.
Does anyone know what makes the problem?

P.S. Dropbox from jorgicio 3.12.6 and gentoo 2.10 are both suffer from this problem
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Thu Feb 25, 2016 2:47 am    Post subject: Reply with quote

I unmasked 3.12.6, the latest test version in the main Portage tree, and deleted ~/.dropbox-dist directory and it worked. Then it stopped working again because Dropbox tried to upgrade and re-created the ~/.dropbox-dist directory (see below). So I deleted it and restarted the daemon and the icon re-appears in the KDE 4 System Tray.

Code:
$ cat /etc/portage/package.accept_keywords/dropbox
=net-misc/dropbox-3.12.6 ~amd64
$ cat /etc/portage/package.use/dropbox
# required by dev-qt/qtcore-5.4.2::gentoo
# required by dev-qt/qtquick1-5.4.2::gentoo
# required by net-misc/dropbox-3.12.6::gentoo[X]
>=dev-libs/libpcre-8.38 pcre16
$ eix -I dropbox
[I] net-misc/dropbox
     Available versions:  2.10.2^ms ~3.6.8^ms (~)3.12.6^ms {X +librsync-bundled selinux}
     Installed versions:  3.12.6^ms(17:12:11 22/02/16)(X librsync-bundled -selinux)
     Homepage:            http://dropbox.com/
     Description:         Dropbox daemon (pretends to be GUI-less)

$ ls ~/.dropbox-dist
VERSION  dropbox-lnx.x86_64-3.14.7  dropboxd
$ rm -rf ~/.dropbox-dist
$ /opt/dropbox/dropboxd

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Mistwolf
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 121
Location: Edmonton, AB

PostPosted: Thu Feb 25, 2016 4:05 am    Post subject: Reply with quote

Check the Gentoo wiki.

You could be getting a conflict of opengl libraries.

https://wiki.gentoo.org/wiki/Dropbox#Step_3:_Dropbox_does_not_start_now
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Thu Feb 25, 2016 5:39 am    Post subject: Reply with quote

Thanks. The following hack fixed it in my case:

Code:
$ cat /etc/local.d/95-dropbox-hack.start
#!/bin/bash
# https://wiki.gentoo.org/wiki/Dropbox
rm /home/fitzcarraldo/.dropbox-dist/dropbox-lnx.x86_64-*/libGL.so*

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Thu Feb 25, 2016 8:43 am    Post subject: Reply with quote

Fitzcarraldo wrote:
The following hack fixed it in my case:

Code:
$ cat /etc/local.d/95-dropbox-hack.start
#!/bin/bash
# https://wiki.gentoo.org/wiki/Dropbox
rm /home/fitzcarraldo/.dropbox-dist/dropbox-lnx.x86_64-*/libGL.so*

I spoke too soon: Dropbox worked for a while but then overwrote ~/.dropbox-dist/dropbox-lnx.x86_64-*/libGL.so.1 and the Dropbox icon disappeared again from the System Tray.

So I deleted the above-mentioned script from /etc/local.d/ and did the following instead, which works so far (even after a few reboots):

1. Create a Bash script ~/.dropbox/dropbox.sh containing:

Code:
#!/bin/bash
rm -rf ~/.dropbox-dist
/opt/dropbox/dropboxd


2. In KDE, go to 'System Settings' > 'Startup and Shutdown' > 'Autostart' and remove the entry for script file /opt/dropbox/dropboxd then add script file ~/.dropbox/dropbox.sh to be launched automatically at Startup.

--------------------------
EDIT (12:00 UTC, 25 February 2016): Argghh, NVIDIA :roll: . In addition to the above, I had to add the following lines to a Bash script I use with a keyboard shortcut for toggling between my laptop's monitor and an external monitor, as the Dropbox icon disappears from the KDE System Tray when I toggle monitors, even though the Dropbox daemon is still running:

Code:
# Following is a hack because the Dropbox icon disappears from the KDE System Tray when I toggle displays:
# Kill dropbox.sh and dropbox
ps auxww | awk '$0~/dropbox/&&$0!~/awk/{print $2}' | xargs kill
# Restart Dropbox daemon
~/.dropbox/dropbox.sh

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 225

PostPosted: Thu Feb 25, 2016 1:04 pm    Post subject: Reply with quote

Is dmesg revealing anything?
Back to top
View user's profile Send private message
dabicho
n00b
n00b


Joined: 28 Mar 2004
Posts: 28
Location: México

PostPosted: Thu Feb 25, 2016 7:07 pm    Post subject: Reply with quote

A common solution is to set the variable DBUS_SESSION_BUS_ADDRESS to an empty value before (re-)starting dropbox, in case the problem is that there is no systray icon whatsoever.
This problem may affect other applications too.


Trying to find more info about what is going on, the value of the variable points to a file (presumably a unix socket) that does not exist.
Reading further, applications that use dbus run dbus-launch if such variable is not set or on some other conditions.
Setting this variable to empty for dropbox triggers one such condition and makes dropbox to run it fixing it.

Now, what I'd like to know is why is that variable pointing to a non-existent file or if that file is not being created for some reason, in orther to truly fix this problem.
Anyone has an idea?

In my case I use enlightenment and stalonetray and systemd, not sure if this has something to do with it.

This may not be your problem, however, if your problem is fixed by fiddling with the opengl libraries.

However, do not think that running it as root will fix anything.
su and then run only appears to fix it because when you switch user the DBUS variable is unset for the new environment.
I point this out because I have read in other forums post for which I have no account suggest a fix by running dropbox as root.


ref: https://dbus.freedesktop.org/doc/dbus-launch.1.html

Cont1... After runing dbus-launch on a terminal, I see this generates two variables, of which my environment had originally only one set DBUS_SESSION_BUS_ADDRESS. After setting both variables I could run dropbox and get my icon.
I don't know where this variable is set, but it looks to me like the other variable missing is the problem.


Last edited by dabicho on Thu Feb 25, 2016 8:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Thu Feb 25, 2016 8:34 pm    Post subject: Reply with quote

bstaletic wrote:
Is dmesg revealing anything?

I cannot see anything different to the dmesg output before this recent problem with Dropbox started.

It seems quite a few people using Linux, Windows and Mac OS are running into this or a similar issue with Dropbox in the last few months (see latest posts in the following):

Gentoo Bug 473888 - net-misc/dropbox automatically downloads new version

Dropbox Comminity - Disable automatic updates

Dropbox Community - Unnecessary Syncing in Windows/Linux shared Dropbox, since last update

Can I stop Dropbox from automatically updating itself on OS X?

openSUSE Forums - Dropbox system tray icon missing

PCLinuxOS Forums - Dropbox starts but system tray icon does not appear

Possible Solution to ‘Dropbox Missing Systray Icon’ under KDE
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
natrix
Guru
Guru


Joined: 23 Aug 2013
Posts: 532

PostPosted: Thu Feb 25, 2016 9:21 pm    Post subject: Reply with quote

I have the same problem.

I tried the above but it does not work for me.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Fri Feb 26, 2016 10:31 am    Post subject: Reply with quote

Another hack you can try, which works for me as an alternative to the ~/.dropbox/dropbox.sh hack I mentioned earlier, is something mentioned in the Gentoo Bug report and in the Dropbox Community thread (Disable Automatic Updates):

Code:
$ rm -rf ~/.dropbox-dist/
$ install -dm0 ~/.dropbox-dist

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
natrix
Guru
Guru


Joined: 23 Aug 2013
Posts: 532

PostPosted: Fri Feb 26, 2016 12:30 pm    Post subject: Reply with quote

Hi Fitzcarraldo:

Not work but change the output

Code:
$ dropbox
Couldn't start Dropbox.
This is usually because of a permissions error. Storing your home folder on a network share can also cause an error.

Get more help at https://www.dropbox.com/c/help/permissions_error

Please contact Dropbox support with the following info for help:

/tmp/dropbox_errorDLzhEM.txt


Code:
bn.BUILD_KEY: Dropbox
bn.VERSION: 3.12.6
bn.DROPBOXEXT_VERSION: failed
bn.is_frozen: True
pid: 10167
ppid: 10162
ppid exe: '/bin/bash'
uid: 1000
user_info: pwd.struct_passwd(pw_name='natrix', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='', pw_dir='/home/natrix', pw_shell='/bin/bash')
effective_user_info: pwd.struct_passwd(pw_name='natrix', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='', pw_dir='/home/natrix', pw_shell='/bin/bash')
euid: 1000
gid: 1000
egid: 1000
group_info: grp.struct_group(gr_name='natrix', gr_passwd='x', gr_gid=1000, gr_mem=[])
effective_group_info: grp.struct_group(gr_name='natrix', gr_passwd='x', gr_gid=1000, gr_mem=[])
LD_LIBRARY_PATH: None
cwd: '/home/natrix'
     real_path='/home/natrix'
              mode=040755   uid=1000   gid=1000
     parent   mode=040755   uid=0   gid=0
HOME: u'/home/natrix'
appdata: u'/home/natrix/.dropbox/instance1'
         real_path=u'/home/natrix/.dropbox/instance1'
                  mode=040700   uid=1000   gid=1000
         parent   mode=040700   uid=1000   gid=1000
dropbox_path: u'/home/natrix/Datos/Pablo/Disco_virtuales/Dropbox'
              real_path=u'/mnt/Datos/Pablo/Disco_virtuales/Dropbox'
                       mode=040777   uid=0   gid=0
              parent   mode=040777   uid=0   gid=0
sys_executable: '/opt/dropbox/dropbox'
                real_path='/opt/dropbox/dropbox'
                         mode=0100755   uid=0   gid=0
                parent   mode=040755   uid=0   gid=0
trace.__file__: '/opt/dropbox/library.zip/dropbox/client/ui/common/boot_error.pyc'
                real_path='/opt/dropbox/dropbox/dropbox/client/ui/common/boot_error.pyc'
                         not found
                parent   not found
tempdir: '/tmp'
         real_path='/tmp'
                  mode=041777   uid=0   gid=0
         parent   mode=040755   uid=0   gid=0
Traceback (most recent call last):
  File "dropbox/client/main.py", line 4065, in main_startup
  File "dropbox/client/main.py", line 1980, in run
  File "ui/common/uikit.py", line 383, in create_ui_kit
  File "dropbox/client/ui/qt/__init__.py", line 31, in <module>
  File "PyQt5/QtWidgets.py", line 14, in <module>
  File "PyQt5/QtGui.py", line 14, in <module>
ImportError: /opt/dropbox/PyQt5.QtGui.so: undefined symbol: _ZTI18QOpenGLTimeMonitor
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Fri Feb 26, 2016 12:42 pm    Post subject: Reply with quote

natrix, looks like you're suffering from Bug 573838 - net-misc/dropbox-3.12.6 - fails to start due to ImportError: /opt/dropbox/PyQt5.QtGui.so: undefined symbol: _ZTI18QOpenGLTimeMonitor. See Comments #5 to #7 in that bug report. I did all that too (basically I tried everything I could find, in the hope something would work), so perhaps the solution is a combination of things.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
JohnN
Apprentice
Apprentice


Joined: 05 Jul 2005
Posts: 158
Location: Claremont, CA

PostPosted: Sat Feb 27, 2016 1:36 am    Post subject: worked for me Reply with quote

Fitzcarraldo wrote:
Another hack you can try, which works for me as an alternative to the ~/.dropbox/dropbox.sh hack I mentioned earlier, is something mentioned in the Gentoo Bug report and in the Dropbox Community thread (Disable Automatic Updates):

Code:
$ rm -rf ~/.dropbox-dist/
$ install -dm0 ~/.dropbox-dist


This seems to work for me. Merely deleting the libGL file from ~/.dropbox-dist works initially, but then the system tray interface vanishes again. Only blocking the update from Dropbox works long term.

Thanks!
Back to top
View user's profile Send private message
jmg
n00b
n00b


Joined: 28 Feb 2016
Posts: 1

PostPosted: Sun Feb 28, 2016 4:28 pm    Post subject: Reply with quote

There are several workarounds for the not working or missing Dropbox tray icon bugs. Apart from going back to a bug free Dropbox version and preventing automatic updates by various ways, another faster and simpler workaround that is reported to work at least on the operating systems Fedora, Kubuntu, Linux Mint, openSUSE, Ubuntu... (and the desktop environments Cinnamon, KDE 4, KDE 5, Unity...), so probably also working on Gentoo, is the following command line:

Code:
dropbox stop && dbus-launch dropbox start
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Mon Feb 29, 2016 10:44 am    Post subject: Reply with quote

jmg wrote:
There are several workarounds for the not working or missing Dropbox tray icon bugs. Apart from going back to a bug free Dropbox version and preventing automatic updates by various ways, another faster and simpler workaround that is reported to work at least on the operating systems Fedora, Kubuntu, Linux Mint, openSUSE, Ubuntu... (and the desktop environments Cinnamon, KDE 4, KDE 5, Unity...), so probably also working on Gentoo, is the following command line:

Code:
dropbox stop && dbus-launch dropbox start

I would be interested to know if that command works for Gentoo users who have added the dropbox init script to the default runlevel in OpenRC. I, personally, don't use /etc/init.d/dropbox to launch Dropbox before the DE starts; instead I prefer to configure KDE so that it launches the daemon at the time of logging in to KDE ('System Settings' > 'Startup and Shutdown' > 'Autostart' > 'Add Script...' and specify /opt/dropbox/dropboxd as the Script File). In which case the command you quoted would not work:

Code:
$ dropbox stop && dbus-launch dropbox start
Another instance of Dropbox (9301) is running!

Code:
$ dropbox stop
Another instance of Dropbox (9301) is running!

When I switch between laptop monitor and external monitor using Bash scripts triggered by keyboard shortcuts I still need to use a hack in my scripts in order to get the Dropbox icon to reappear on the KDE System Tray (even though the Dropbox daemon is still running), which could be due to an NVIDIA closed-source driver issue:

Code:
# Following is a hack because the Dropbox icon disappears from the KDE System Tray when I toggle displays:
# Kill dropbox
ps auxww | awk '$0~/dropbox/&&$0!~/awk/{print $2}' | xargs kill
# Restart Dropbox daemon
nohup /opt/dropbox/dropboxd &> /dev/null



--------------------------
EDIT (12:25 UTC, 29 February 2016): I have just switched from the NVIDIA closed-source driver to the Intel driver for the Intel HD 4600 IGP in my Clevo W230SS Optimus laptop, to see if the Dropbox icon disappears when I toggle display monitors with my script. With the Intel driver the above-mentioned script hack of killing the Dropbox daemon and restarting it does not get the Dropbox icon to reappear on the KDE System Tray. However, if I issue the two commands manually in a Konsole window when using the Intel driver, the Dropbox icon does reappear on the System Tray. I'll need to investigate further.

--------------------------
EDIT (04:43 UTC, 1 March 2016): To answer my own question:

Code:
fitzcarraldo@clevow230ss ~ $ sudo rc-update show -v | grep drop
              dropbox |      default                 
fitzcarraldo@clevow230ss ~ $ dropbox stop
Another instance of Dropbox (4647) is running!

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
natrix
Guru
Guru


Joined: 23 Aug 2013
Posts: 532

PostPosted: Thu Mar 03, 2016 1:26 pm    Post subject: Reply with quote

Quote:
Another hack you can try, which works for me as an alternative to the ~/.dropbox/dropbox.sh hack I mentioned earlier, is something mentioned in the Gentoo Bug report and in the Dropbox Community thread (Disable Automatic Updates):

Código:
Code:
$ rm -rf ~/.dropbox-dist/
$ install -dm0 ~/.dropbox-dist



It work in KDE4 but not in KDE5. Some new idea?
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1630
Location: United Kingdom

PostPosted: Thu Mar 03, 2016 4:38 pm    Post subject: Reply with quote

KDE5? My commiserations! :wink: It's still unstable and incomplete, in my experience.

I have Plasma 5 installed on my other laptop but I am travelling at the moment so I cannot try Dropbox on that until I arrive home in a couple of days time. However, the Dropbox Community thread Systray icon not showing in KDE Plasma 5.2 has some suggestions you could try.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
natrix
Guru
Guru


Joined: 23 Aug 2013
Posts: 532

PostPosted: Mon Mar 07, 2016 3:55 pm    Post subject: Reply with quote

Fitzcarraldo

Thank you very much for the link and your help!!!
Back to top
View user's profile Send private message
urcindalo
Guru
Guru


Joined: 08 Feb 2005
Posts: 590
Location: Almeria, Spain

PostPosted: Thu Mar 10, 2016 9:31 am    Post subject: Reply with quote

This DropBox-missing-system-tray-icon thing was driving me crazy. In the past I had to update to the latest 3.12.6 dropbox version in the portage tree *and* prevent the daemon from updating dropbox by removing write permissions on the ~/.dropbox-dist folder. However, since KDE 5 was stabilised a few days ago, the system tray icon disappeared again.

After reading a lot, and to make a long story short, this is what I did to "solve" the problem and get the icon back:

1) Install dropbox-cli if you haven't done so.
2) Update to the latest ~3.12.6 dropbox version.
3) Remove write permissions on ~/.dropbox-dist and delete its content, if any.
4) Create a script with the following content and keep it somewhere, making sure it has +x permissions:
Code:
#!/bin/bash
dropbox-cli stop
dbus-launch dropbox start > /dev/null

5) Remove dropbox from the "default" run level if you have it (I never had it, but just in case), as well as any dropbox autostarting instance in KDE Preferences (autorun script or program).
6) Make sure no dropbox service is running with "dropbox-cli stop". If it moans telling you there is more than one service, find them with "ps aux | grep dropbox" and kill them.
7) Check no dropbox is running with "dropbox-cli status".
8] Once there is no dropbox running, run "dbus-launch dropbox start -i" and the system icon tray should reappear.
9) Once checked everything is OK, go to KDE preferences and add the previously created script as a start-up script (sorry, my system is in Spanish and I don't want to change the language just to check the exact translation :wink: )
10) Now log-out or restart and everything should be OK after logging-in again.

If the first time you log-in it still does not work, just issue the commands in the script once more in a terminal, one at a time: "dropbox-cli stop" followed by "dbus-launch dropbox start > /dev/null". Then log-out/in again and it should work.

I have followed this procedure in 3 Gentoo boxes and it just works.
Back to top
View user's profile Send private message
kurisu
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2011
Posts: 147
Location: Munich, Germany

PostPosted: Tue Apr 12, 2016 12:39 am    Post subject: Reply with quote

Issue persists with 3.18.1. Icon doesn't appear most of the time. Any good solution for people who don't want to install dropbox-cli?
Back to top
View user's profile Send private message
kurisu
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2011
Posts: 147
Location: Munich, Germany

PostPosted: Tue May 17, 2016 12:52 pm    Post subject: Reply with quote

Finally found a solution that works without dropbox-cli being installed.

Start dropbox like this:
Code:
env DBUS_SESSION_BUS_ADDRESS="" dropbox start -i

and the tray icon is reliably appearing again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum