Bug 18143 - No Dropbox icon in Systray
Summary: No Dropbox icon in Systray
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-06 19:24 CEST by Maurice Batey
Modified: 2019-02-19 13:21 CET (History)
2 users (show)

See Also:
Source RPM: nautilus-dropbox-2015.10.28-1.mga6.nonfree.src.rpm
CVE:
Status comment:


Attachments

Description Maurice Batey 2016-04-06 19:24:48 CEST
Description of problem:


Version-Release number of selected component (if applicable):

  See above

How reproducible:


Steps to Reproduce:

1.Install natilus-dropbox

2.Install Dropbox  

3.~/.dropbox-dist/dropboxd

4. dropbox start -i

    No Dropbox icon appears in Systray.

See also bug 18142 w.r.t. problem of Dropbox icon disappearing on Magereia-5
Comment 1 Marja Van Waes 2016-04-09 11:05:09 CEST
Assigning to all packagers collectively, since there is no maintainer for this package.

CC: (none) => marja11
Assignee: bugsquad => pkg-bugs

Comment 2 Maurice Batey 2016-04-18 19:02:31 CEST
Reliable workaround (e.g. in ~/.config/autostart) seems to be:

  sleep 5 && dropbox stop && dbus-launch dropbox i
Comment 3 Morgan Leijström 2016-10-19 12:11:24 CEST
Cauldron, Plasma: After a couple months not even trying to start dropbox, today i did and it works.  I also issued :

 dropbox autostart y

And now it autostarts when i log into Plasma, and it works.

The systray icon right click menu also works. (left click do nothing, but i do not know if it is supposed to)

Strange thing is that it do not use the dropbox styled icon, but instead it is identical to the OwnCloud systray icon.

So today Dropbox works and have a systray icon - but not the correct one...

CC: (none) => fri

Comment 4 Maurice Batey 2016-10-19 14:19:58 CEST
The situation on my Mageia-6 and Mageia-5 installs is that the Dropbox icon does appear in Systray, BUT there is a problem with the .desktop item I have in ~/.config/autostart to do ŧhe 'sleep 5 && dropbox stop && dbus-launch dropbox i'.

I earlier just had 'dropbox start -i' in there, but when I amended that to use the full sequence as above, although that appears to work, after the next boot the coding has reverted to 'dropbox start -i'!

I do not understand what is doing that...

I tried creating a new .desktop item, containing the full sequence, and deleting the other one, but the deleted (or altered) .desktop file re=appears later and I'm back at square 1.

(Tried dragging useless one into Wastebin and emptying wastebin, but it eventually returns into ~/.config/autostart.
  Also tried the deletion as Root, to no avail.)

How does one ensure the contents of ~/.config/autostart are left alone??
Comment 5 Morgan Leijström 2016-10-19 17:32:17 CEST
@Maurice : Ideas: 

1) drop the "i" from your
   sleep 5 && dropbox stop && dbus-launch dropbox i
( I think "i" makes Dropbox regenerate the .desktop icon! )

2) Maybe KDE/Plasma system settings have some automatics that interfere?
Then i think you can work around it by not having a dropbox.desktop item in ~/.config/autostart, but instead make a script that it starts and in script i think you can put whatever you want and it should not mangle it.
 - and dont ever issue "dropbox autostart y" nor "dropbox i" !



That said, for me the default start command
  dropbox start -i
as generated by 
  dropbox autostart y
do work here for me on Cauldron Plasma,
and KDE/Plasma system settings list it as autostarting.

... It works *currently* i must add, as Dropbox have been a recurring problem now and then for several years ...  :/
Comment 6 Maurice Batey 2016-10-19 18:01:28 CEST
> drop the "i" from your
   sleep 5 && dropbox stop && dbus-launch dropbox i

  OK - will try that!

  But the problem* is that SOMETHING restores the original from any change I make in  ~/,config/autostart .desktop files.

> Maybe KDE/Plasma system settings have some automatics that interfere?

  * I have the same '~/,config/autostart' .desktop files problem in both Cauldron  &  Mageia-5.

> Then i think you can work around it by not having a dropbox.desktop item in 
> ~/.config/autostart, but instead make a script that it starts and in script i > think you can put whatever you want and it should not mangle it.

   OK, so - in words of 1 syllable - what file do I need and where?!
When you "it starts", what is "it"?

[Or do you mean still have a ~/.config/autostart .desktop file, but in there just execute a script that does e.g. 'dropbox start'?
  if in a .desktop file in ~/.config/autostart, then there will be the problem I described above where something cancels any change I make in the .desktop file.

$50 question: What is the correct syntax in .desktop file for executing the file ~/scripts/dropbox-start?

> and dont ever issue "dropbox autostart y" nor "dropbox i" !

  OK!
Comment 7 Maurice Batey 2016-10-19 18:08:43 CEST
P.S. I have just deleted old dropbox .desktop file from ~/.config/autostart, logged out/in and see that the deleted file has been restored!!

(This is on Mageia-5)


  Question is: What is doing that and how to prevent it...
Comment 8 Morgan Leijström 2016-10-19 18:28:57 CEST
First: You are running KDE / Plasma?

Second: an idea on how to hinder mangling of dropbox.desktop : edit permissions on it to not be writable by *anyone* ?

If that for some reason is not working good, read on:

(In reply to Maurice Batey from comment #6)
> > drop the "i" from your
>    sleep 5 && dropbox stop && dbus-launch dropbox i
> 
>   OK - will try that!
> 
>   But the problem* is that SOMETHING restores the original from any change I
> make in  ~/,config/autostart .desktop files.

Even when dropbox is not started with "i" ?
 
> > Maybe KDE/Plasma system settings have some automatics that interfere?
> 
>   * I have the same '~/,config/autostart' .desktop files problem in both
> Cauldron  &  Mageia-5.
> 
> > Then i think you can work around it by not having a dropbox.desktop item in 
> > ~/.config/autostart, but instead make a script that it starts and in script i > think you can put whatever you want and it should not mangle it.
> 
>    OK, so - in words of 1 syllable - what file do I need and where?!

make a script file that only starts dropbox

> When you "it starts", what is "it"?

The DE (Desktop Environment) i think...

> 
> [Or do you mean still have a ~/.config/autostart .desktop file, but in there
> just execute a script that does e.g. 'dropbox start'?
>   if in a .desktop file in ~/.config/autostart, then there will be the
> problem I described above where something cancels any change I make in the
> .desktop file.
> 
> $50 question: What is the correct syntax in .desktop file for executing the
> file ~/scripts/dropbox-start?

just enter 
  ~/scripts/dropbox-start
in the program field?

 
> > and dont ever issue "dropbox autostart y" nor "dropbox i" !
> 
>   OK!

( because i *guess* that is what triggers (re)generation of dropbox start link )


(In reply to Maurice Batey from comment #7)
> P.S. I have just deleted old dropbox .desktop file from ~/.config/autostart,
> logged out/in and see that the deleted file has been restored!!
> 
> (This is on Mageia-5)
> 
> 
>   Question is: What is doing that and how to prevent it...

Hmmm.  Try 
 dropbox autostart n
and after that make a solution for autostarting (without using "dropbox autostart y" nor "dropbox i")

And then i am out of ideas...
Have you asked @ dropbox forum / support?
or another distro running KDE/Plasma
Comment 9 Maurice Batey 2016-10-19 18:46:32 CEST
Same problem with both Mageia-5 and Mageia-6.

Somebody somewhere must know why deleted files get restored in 
~/.config/autostart. :-)

Unless can solve that there's no point in designing specific contents of one of those files...

But the other £64 question is: 
  Why does install of Dropbox require the user to ensure it's systray icon starts at login?

Perhaps it's something that the Dropbox people are unable to do safely, rather like the requirement for VirtualBox users to add themselves to the 'vboxusers' group...

For the moment, on both Mageia-5 and -6 the icon IS appearing at login, with no "i" parameter on 'dropbox start'...
Comment 10 Morgan Leijström 2016-10-19 23:15:04 CEST
(In reply to Maurice Batey from comment #9)
> For the moment, on both Mageia-5 and -6 the icon IS appearing at login, with
> no "i" parameter on 'dropbox start'...

OK i can verify that... that problem seem to be hard-coded in dropbox then :/

I have now successfully tested:

1) issue "dropbox autostart n"
=> ~/.config/autostart/dropbox.desktop goes away
 => and so do that entry in kde system settings.

2) create an empty file named ~/.config/autostart/dropbox.desktop, and change owner to root:root  => blocks the original from reappearing :)

3) create ~/.config/autostart-scripts/start.sh with the following content:
#!/bin/bash
sleep 10
dropbox start

4) Make it executable: chmod +x start.sh

5) You still have not answered what DE you use, but here on KDE/Plasma5: go into KDE system settings > start and exit > automatic start, button [Add script...] and select the script you made above. Let it create it as link (default)

/!\ Also make sure it list no other start method for dropbox.


Sidenote: There are so much problem with Plasma session restore and also with handling desktop launch items in system settings, so i currently have session restore completely off and for autostarting only have this script file, but extended to start all i normally use:


#!/bin/bash
# This is a launcher called from ~/.config/autostart-scripts/
gkrellm & # launch ASAP
sleep 7  # wait... DE still in much work loading, and BOINC is chewing CPU...
dropbox start & # DropBox autolaunch is disabled by a dummy empty file i made:
# ~/.config/autostart/dropbox.desktop with owner root:root
# otherwise: dropbox stubbornly creates the original inferior way to start itself :(
sleep 3
ktorrent &
sleep 3
konsole &
sleep 2
firefox &
sleep 4
dolphin &
sleep 3
thunderbird &
sleep 3
owncloud &  # as it wants password entered within short timeout, nothing must pop up and disturb that, therefor launch at end and pause (but not too long) before it.
exit 0  # done
Comment 11 Morgan Leijström 2016-10-19 23:19:16 CEST
CORRECTION: at step 3 put your start.sh somewhere ELSE than i wrote;
the KDE system settings will create the link named
 ~/.config/autostart-scripts/start.sh
when you perform step 5.
Comment 12 Maurice Batey 2016-10-20 11:38:13 CEST
> You still have not answered what DE you use

  KDE/Plasma5 on Mageia-6.
  KDE4 on Mageia-5.
Comment 13 Maurice Batey 2016-10-20 15:01:56 CEST
>  KDE system settings will create the link named
>  ~/.config/autostart-scripts/start.sh

In both Mageia-5 and Mageia-6?   (KDE; Kde/Plama5)
Comment 14 Morgan Leijström 2016-10-20 15:26:58 CEST
I only tested in mga6 - in whole family we all use mga6 now...

You have to try yourself what works in mga5.
I dont remember if it had a script section.
If not, create a start.desktop in autostart, that launch start.sh
Comment 15 Maurice Batey 2016-10-20 19:13:55 CEST
 > at step 3 put your start.sh somewhere ELSE than i wrote;

Any suggestions where it could go?!  (On Mageia-6)
Comment 16 Maurice Batey 2016-10-20 19:46:50 CEST
> Any suggestions where it could go?!  (On Mageia-6)

  OK, I 'm going to try it in ~/$USER.
Comment 17 Maurice Batey 2016-10-20 20:49:20 CEST
Yes, that all worked nicely on Mageia-6 - many thanks!
  (But need to keep checking it keeps on working. :-) )

(Mageia-5's current dropbox icon setup keeps on working, but if it relapses I will try the start.sh route...)
Comment 18 Maurice Batey 2016-10-21 12:42:41 CEST
> (Mageia-5's current dropbox icon setup keeps on working, but if it relapses I > will try the start.sh route...)

This morning I bit the bullet and tried it.

  It did work, but only after changing: 
        "dropbox start" to:
        "dbus-launch dropbox start"

- otherwise the Dropbox icon failed to show up on Mageia-5.

I'm very happy with the new setup for autostarting. 
Many thanks!
Comment 19 Morgan Leijström 2016-10-21 14:34:40 CEST
Great, Maurice :)

So now we have new *workarounds* for running dropbox on both mga5 and mga6

( that works this week... ;) )

Regarding where to put the script, one idea is to have a place where you put all your scripts, like ~/Documents/MyScripts/
Comment 20 Maurice Batey 2019-02-19 13:21:30 CET
Since using the 'dbus-launch function there is no longer a probme here.

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.