如何在 Lubuntu 启动时启用 Dropbox 面板图标?

Red*_*bob 3 icons lubuntu dropbox lxpanel

我在 Lubuntu 中安装了 Dropbox。它运行良好,但未显示面板图标,因为 Nautilus 不是 Lubuntu 中的默认文件管理器。

我一直在 Askubuntu、Ubuntuforums 和ArchLinux论坛上搜索几个论坛页面。它们并不完全在 Lubuntu 中工作。我得到的最好的是这个图标,如图所示,

在此处输入图片说明

但它根本不起作用。

所以我问:Lubuntu 中的 Dropbox 面板图标有什么解决方案吗?

Red*_*bob 5

我为此研究了一个解决方案。如果我运行这些命令:

#!/bin/bash
dropbox stop
sleep 5
dbus-launch dropbox start -i
Run Code Online (Sandbox Code Playgroud)

Dropbox 图标就像一个魅力,如下图:

在此处输入图片说明

所以我将一个 bash 脚本保存为 /opt/dropbox-start.sh

无聊的是必须打开一个终端来执行它。如果我输入~/.profile,它会锁定 lxsession 启动。更改~/.config/autostart/dropbox启动器中的 Exec 行不起作用,因为这个启动器是一个副本/usr/share/applications/dropbox.desktop,它将在系统启动时被这个启动器替换。

所以我决定直接在/usr/share/applications/dropbox.desktop启动器中更改 Exec 行,如下所示:

[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=bash /opt/dropbox-start.sh
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
Run Code Online (Sandbox Code Playgroud)

即使计算机中有多个帐户,此解决方案也有效,因为更改未保存在$HOME文件夹中。为确保 Dropbox 会自动启动,请查看

首选项 > LXSession 的默认应用程序

如果 Dropbox 被选中,如下所示:

在此处输入图片说明