神刀安全网

Fix Dropbox Indicator Icon And Menu Not Working In Xubuntu, Lubuntu Or Ubuntu MATE

I recently stumbled on an issue with Dropbox and the Ubuntu flavors that support AppIndicators (except Unity), like Xubuntu and Lubuntu: the Dropbox AppIndicator icon shows up as broken and the menu doesn’t work. This isn’t a new issue though, and it seems to occur starting with Ubuntu 14.04.

The issue occurs with the Dropbox packages in the official Ubuntu repositories (called "nautilus-dropbox", which doesn’t depend on Nautilus and can be used to install Dropbox on any desktop environment) as well as the Dropbox package downloaded from its official website. 

It does not occur with the caja-dropbox package available in the official Ubuntu MATE 16.04  repository though (but it does occur in older Ubuntu MATE versions if you’ve enabled AppIndicators), because it was patched with a fix similar to the one in this article.

Below you’ll find a fix / workaround for this issue. Important: using the instructions below, Dropbox will use a tray (notification area) icon instead of an AppIndicator.

Here’s a screenshot with the issue (taken in Xubuntu 16.04):

Fix Dropbox Indicator Icon And Menu Not Working In Xubuntu, Lubuntu Or Ubuntu MATE

And another screenshot taken after using the fix below:

Fix Dropbox Indicator Icon And Menu Not Working In Xubuntu, Lubuntu Or Ubuntu MATE

Tested in Xubuntu 16.04, Xubuntu 14.04, Lubuntu 16.04, Ubuntu MATE 16.04 (the issue does not occur with the caja-dropbox package in this Ubuntu MATE version) and Ubuntu MATE 14.04.

To fix it, you need to add "dbus-launch" before the actual command for the "Exec" line in both the application autostart file and launcher. For Dropbox this is a bit tricky because it overwrites any modifications to its autostart file. So here’s what you need to do to fix this Dropbox issue:

  • if you’ve installed Dropbox by downloading the .deb from its website or by using the nautilus-dropbox package from the repositories:
    • rename the Dropbox autostart file, located in ~/.config/autostart/ , and edit the file, changing the "Exec" line to "Exec=dbus-launch dropbox start -i";
    • copy the Dropbox desktop file, located under /usr/share/applications/ , to  ~/.local/share/applications/, so it’s not overwritten when updating the package, and change the "Exec" line to "Exec=dbus-launch dropbox start -i"
    • disable the built-in Dropbox autostart (because it automatically creates an autostart file) using the "dropbox autostart n" command.
  • for the caja-dropbox package (except for Ubuntu MATE 16.04 which doesn’t have this issue):
    • rename the dropbox-caja autostart file, located in ~/.config/autostart/ , and edit the file, changing the "Exec" line to "Exec=dbus-launch caja-dropbox start -i";
    • copy the caja-dropbox desktop file, located under  /usr/share/applications/ , to  ~/.local/share/applications/,  so it’s not overwritten when updating the package, and change the "Exec" line to "Exec=dbus-launch caja-dropbox start -i";
    • disable the built-in Dropbox autostart (because it automatically creates an autostart file) using the "caja-dropbox autostart n" command.

This sounds a bit complicated on a first look, right? Well, it’s not, but to make it easier, you can use the following commands to apply the changes I mentioned above.

If you’ve installed Dropbox by downloading the .deb from its website or by using the nautilus-dropbox package, you can fix the broken Dropbox appindicator icon and menu by using the following commands:

cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/start_dropbox.desktop sed -i 's/^Exec=.*/Exec=dbus-launch dropbox start -i/' ~/.config/autostart/start_dropbox.desktop dropbox autostart n mkdir -p ~/.local/share/applications/ cp /usr/share/applications/dropbox.desktop ~/.local/share/applications/ sed -i 's/^Exec=.*/Exec=dbus-launch dropbox start -i/' ~/.local/share/applications/dropbox.desktop

For Ubuntu MATE (except 16.04), if you’ve used the dropbox-caja package to install Dropbox, you can fix the broken Dropbox appindicator icon and menu by using the following commands:

cp ~/.config/autostart/caja-dropbox.desktop ~/.config/autostart/start_caja-dropbox.desktop sed -i 's/^Exec=.*/Exec=dbus-launch caja-dropbox start -i/' ~/.config/autostart/start_caja-dropbox.desktop caja-dropbox autostart n mkdir -p ~/.local/share/applications/ cp /usr/share/applications/caja-dropbox.desktop ~/.local/share/applications/ sed -i 's/^Exec=.*/Exec=dbus-launch caja-dropbox start -i/' ~/.local/share/applications/caja-dropbox.desktop

Then restart the session (logout/login) and the Dropbox icon and menu should work correctly.

via / thanks to: T uxDiary and AskUbuntu

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Fix Dropbox Indicator Icon And Menu Not Working In Xubuntu, Lubuntu Or Ubuntu MATE

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址