2

This question already has an answer here:

I have installed Mendeley Desktop (https://www.mendeley.com/download-mendeley-desktop/ubuntu/instructions/) in my computer. It turns out that I can only run the program through the terminal, by sudo mendeleydesktop . If I try to run it from the dock, or even through the terminal without sudo, it doesn't run. It stars briefly (0.5 sec) but suddenly it closes.

When I try to run it in this last way, the next message is shown in the terminal:

/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/jbecerratg@alumnos.unex.es-5120/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

It would be extremely helpful if you could tell me how to fix this. I would like to run the program by clicking in the icon.

Thanks in advance.

marked as duplicate by muru command-line Nov 2 '16 at 1:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 6
    sudo chown $USER ~ -R, since files in your home directory now seem to be owned by root. – muru Nov 1 '16 at 16:46
  • @muru It simply worked. Thank you very much. Sorry about my ignorance, but I really would like to know what sudo chown $USER ~ -R exactally has done to make Mendeley work. Could you explain it in an answer, so that the question could be closed? Thanks again. – Minkowski Nov 1 '16 at 21:29
2

I do not think it is possible. That program must have superuser privileges. Because of the way the program was designed you must use sudo to run it.

The documentation is incorrect on version 16.x of Ubuntu and the software will likely be updated to suit your needs.

Edit: I belive that last line of code saying:

QObject::disconnect: Unexpected null parameter

Is the password being null (or not present)

  • Thank you for your answer. Anyway, could I create a icon in the launcher (or dock) changing the path, so that if I clicked the icon, I'd be able to write my password and the program would run ? Just like Synaptic works. – Minkowski Nov 1 '16 at 18:19
  • 1
    No, superuser privileges are encrypted (so viruses cannot get permissions) and can not be used out of command lines without a GUI (which cannot be used in your case). Until a future update comes out on Mendeley or Ubuntu that supports this, you will not be able to use this without sudo. – Hayden Stites Nov 1 '16 at 19:27
  • @HaydenStites, you are wrong I run Mendelay even with user outside of admin group :)... muri have already given the most probable solution to the problem in the comment section of the question... – Rostislav Kandilarov Nov 1 '16 at 20:03
2

You can get a sudo prompt from ubuntu using the gksudo command, instead of just sudo.

if you can edit the .desktop file, and modify the command from

Exec=[....]mendeleydesktop

to

Exec=/usr/bin/gksudo [...]mendeleydesktop

it should prompt for your password before running it as root.

the [...] represents any path that was already there, pointing to the mendeleydesktop file.

  • Thank you very much, but I am afraid Mendeley doesn't run still... . I have just done what you said. – Minkowski Nov 1 '16 at 19:52
  • Can you post the Exec line from the .desktop file? – Dave Smith Nov 2 '16 at 19:17
  • 1
    Sorry, just saw that you've already got it fixed by using chown. Great :-) – Dave Smith Nov 2 '16 at 19:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.