1

My Mendeley-desktop application suddenly started crashing on Ubuntu 16.04. It says:

Another application has your Mendeley database open. Closing the other program or logging out of your computer may fix the problem.

It flashes for a second with this written on the login screen. I have another account 'Administrator' which I think has it opened since when I log in as 'Administrator', the application runs fine. Here is what I have tried:

  • reinstall in my account.

  • remove it from 'Administrator' account and install in mine.

I cannot get it to work on my account. How does it get it to stop capturing the said database?

Note: I can open it in my account using

sudo nautilus

But I want to be able to run it with my account.

ThunderBird
  • 1,915
  • 13
  • 19
  • 31
Zero
  • 135
  • 11
  • 1
    Possible duplicate of [Mendeley Desktop only runs with sudo](https://askubuntu.com/questions/844293/mendeley-desktop-only-runs-with-sudo) – found in the side bar while looking for further helpful material for my answer – David Foerster May 22 '18 at 19:40

2 Answers2

3

Looks like you broke the access permissions inside your user home directory by running applications as super-user within the same home directory. You can reset the ownership and thus regain access with:

sudo chown -R "$USER:" "$HOME"

See Why should users never use normal sudo to start graphical applications? for an explanation why you shouldn't use sudo to start graphical applications and How do I start Nautilus as root? for alternatives (applies to other graphical applications too).

David Foerster
  • 35,754
  • 55
  • 92
  • 145
  • perfect and thanks for the extra info...makes a lot sense – Zero May 23 '18 at 01:01
  • Dangerous advice. This resets ownership of all the files within home directory, recursively, and is not undo-able. The other answer makes more sense. – Mostafa Farzán Sep 06 '20 at 13:30
  • @MostafaFarzán: Technically yes, but I what the intersection of users who 1) can run `sudo`, 2) are unaware what `chown -R` does and 3) have files in their home directories that they should not own, is quite small. – David Foerster Sep 07 '20 at 01:39
1

Exactly that was the cause of the problem. Mendeley local database located in

~/.local/share/data/Mendeley Ltd./Mendeley Desktop/

Hence, one need to change the owner of this folder to the current user.

sudo chown -R $(whoami) ~/.local/share/data/Mendeley Ltd.
alshaboti
  • 121
  • 3