![Mendeley Desktop 只能使用 sudo 运行](https://linux22.com/image/888191/Mendeley%20Desktop%20%E5%8F%AA%E8%83%BD%E4%BD%BF%E7%94%A8%20sudo%20%E8%BF%90%E8%A1%8C.png)
我已经安装了 Mendeley Desktop (https://www.mendeley.com/download-mendeley-desktop/ubuntu/instructions/) 在我的计算机上。事实证明,我只能通过终端运行该程序sudo mendeleydesktop
。如果我尝试从 dock 运行它,或者甚至通过没有 的终端运行它sudo
,它都不会运行。它会短暂启动(0.5 秒),但突然关闭。
当我尝试以最后一种方式运行它时,终端中显示下一条消息:
/usr/bin/../../opt/mendeleydesktop/bin/install-mendeley-link-handler.sh: 56: /usr/bin/../../opt/mendeleydesktop/bin/install-mendeley-link-handler.sh: cannot create /home/jorge/.local/share/applications//mendeleydesktop.desktop: Permission denied
QIODevice::setTextModeEnabled (QFile, "/home/jorge/.local/share/data/Mendeley Ltd./Mendeley Desktop/log-2016-11-01.txt"): The device is not open
QIODevice::write (QFile, "/home/jorge/.local/share/data/Mendeley Ltd./Mendeley Desktop/log-2016-11-01.txt"): device not open
QSslSocket: cannot resolve SSLv2_client_method
QSslSocket: cannot resolve SSLv2_server_method
Error in finalize query "attempt to write a readonly database" : "BEGIN EXCLUSIVE"
Qt WebEngine Plugins directory not found. Trying fallback directory... Plugins as for example video codecs MAY NOT work.
Error in finalize query "attempt to write a readonly database" : "BEGIN EXCLUSIVE"
Error in open database "unable to open database file" : "/home/jorge/.local/share/data/Mendeley Ltd./Mendeley Desktop/www.mendeley.com/[email protected]/search-index.sqlite"
Failed to open search index
Error in prepare query "unable to open database file" : "SELECT value FROM UpdateTokens WHERE key = :key"
Error in bind value "no statement prepared"
Error in execute query "query not prepared"
Error in step query "query not active"
QObject::disconnect: Unexpected null parameter
如果您能告诉我如何修复此问题,那将非常有帮助。我想通过单击图标来运行该程序。
提前致谢。
答案1
我认为这是不可能的。该程序必须具有超级用户权限。由于该程序的设计方式,您必须使用 sudo 来运行它。
Ubuntu 16.x 版本上的文档不正确,并且软件可能会更新以满足您的需要。
编辑:我相信最后一行代码说:
QObject::disconnect: Unexpected null parameter
密码是否为空(或不存在)
答案2
您可以使用 gksudo 命令从 ubuntu 获取 sudo 提示,而不仅仅是 sudo。
如果你可以编辑 .desktop 文件,并修改命令
Exec=[....]mendeleydesktop
到
Exec=/usr/bin/gksudo [...]mendeleydesktop
在以 root 身份运行之前,它应该提示您输入密码。
[...] 代表任何已经存在的路径,指向 mendeleydesktop 文件。