Ubuntu – How to fix missing dropbox panel icon with a startup script

dropboxscriptsstartupxfce-panelxubuntu

I use Xubuntu 16.10 and I want to run following command (this is the code for fixing dropbox icon) every time Linux session starts:

dropbox stop && env DBUS_SESSION_BUS_ADDRESS="" dropbox start -i

How can I do it?

I copied the code as a new command in session and start up -> Application autostart but it doesn't work.

Best Answer

  • Timing issue

    I am pretty sure it is because of the timing. The command most likely runs before its target is "in the field".

    Changing the command into:

    /bin/bash -c "sleep 15 && dropbox stop && env DBUS_SESSION_BUS_ADDRESS="" dropbox start -i" 
    

    ...will probably do the job.