0

I installed mendeley desktop via this link. It installed properly and works fine when I open it from the gui menu.

However, I can't run it from terminal:

kp@kk:~$ mendeleydesktop
mendeleydesktop: command not found
kp@kk:~$

I located the software

kp@kk:~$ locate mendeleydesktop |grep /home
/home/kp/.local/share/mendeleydesktop
/home/kp/.local/share/applications/mendeleydesktop.desktop

The first item above seems like a link to a different directory, but I'm confused because I can't actually locate this file.

kp@kk:~/.local/share$ ls -al mendeleydesktop 
lrwxrwxrwx 1 kp kp 30 Nov 19 17:38 mendeleydesktop -> /app/extra/bin/mendeleydesktop

The second item is just a file:

kp@kk:~/.local/share/applications$ cat mendeleydesktop.desktop 
[Desktop Entry]
Name=Mendeley Desktop
GenericName=Research Paper Manager
Comment=Mendeley Desktop is software for managing and sharing research papers
Exec=/home/kp/.local/share/mendeleydesktop %f
Icon=mendeleydesktop
Terminal=false
Type=Application
Categories=Education;Literature;Qt;
X-SuSE-translate=false
MimeType=x-scheme-handler/mendeley;application/pdf;text/x-bibtex;
X-Mendeley-Version=1

Any idea where I can find the executable? I just want to be able to type mendeleydesktop and get mendeley to open. This is the only piece of my workflow I can't control from the terminal. I assume if I find the right object I can just make a link in my bashrc file.

  • 1
    please check! what the output of sudo apt-cache policy mendeleydesktop? and the data directory should be on /opt/mendeleydesktop !! – abu-ahmed al-khatiri Dec 21 '18 at 16:20
  • Hi @abu-ahmedal-khatiri -- sudo apt-cache policy mendeleydesktop returns N: Unable to locate package mendeleydesktop, and I find no data in /opt/mendeleydesktop. The data I find in /home/kp/.var/app/com.elsevier.MendeleyDesktop/data/data/Mendeley Ltd. – kevinkayaks Dec 21 '18 at 16:29
  • 1
    probably it not completely installed, that's mean you don't have the repository of mendeley, that's should be like http://paste.ubuntu.com/p/g23SCRyYMz/ ,try to add the repository – abu-ahmed al-khatiri Dec 21 '18 at 16:33
  • 1
    to fix it, try to run sudo dpkg-reconfigure mendeleydesktop for reconfigure mendeley package to include the repository and data directory. when you type locate mendeleydesktop should be like http://paste.ubuntu.com/p/cWJr5B8fsR/ – abu-ahmed al-khatiri Dec 21 '18 at 17:00
  • Doesn't work for me. dpgk doesn't know what mendeleydesktop means. I'm not sure exactly how to add the repository. I searched around but couldn't find much – kevinkayaks Dec 21 '18 at 20:41

2 Answers2

1

You have provided mendeleydesktop.desktop file, where it says that your executable is

/home/kp/.local/share/mendeleydesktop %f

%f is a parameter and stands for file (look here https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables). So typing

/home/kp/.local/share/mendeleydesktop

should work for you.

For me typing just

mendeleydesktop

works as it executes /usr/bin/mendeleydesktop, and /usr/bin is in PATH. I believe it should be in your path, too. Try to type

/usr/bin/mendeleydesktop

If that does not work, check, which files are installed with mendeleydesktop package. Type

dpkg -L mendeleydesktop

You will see all files that are installed, and find the one that is executed.

Kulfy
  • 17,696
nobody
  • 4,362
  • When I try running the the executable /home/kp/.local/share/mendeleydesktop I find bash: /home/kp/.local/share/mendeleydesktop: No such file or directory, however it's definitely there. I see it when I navigate to the directory – kevinkayaks Dec 21 '18 at 16:34
  • any idea why the terminal doesn't understand the executable? – kevinkayaks Dec 21 '18 at 21:24
  • Try ls -l /home/kp/.local/share/mendeleydesktop. lt should find the file and write permissions for it. See it file is executable. You try this in a terminal windows in you XWindows session, right? You are not doing this in text mode (tty) terminal or on another computer via ssh, telnet,..? – nobody Dec 23 '18 at 06:13
  • That's correct, I'm in the standard xwindows session. Same thing: in the /home/kp/.local/share directory I see mendeleydesktop, but when I type ./mendeleydesktop from that directory, I get no such file or directory in return. Oddly I also can't tab complete mendeleydesktop. – kevinkayaks Dec 23 '18 at 06:21
  • Check if the file has executable permission with ls -l. This is a wild guess, but try bash /home/kp/.local/share/mendeleydesktop or chmod 755 /home/kp/.local/share/mendeleydesktop, and then ./mendeleydesktop. – nobody Dec 23 '18 at 06:36
0

I think your issue is not about .desktop file, i also have

$ cat /home/praz/.local/share/applications/mendeleydesktop.desktop
[Desktop Entry]
Name=Mendeley Desktop
GenericName=Research Paper Manager
Comment=Mendeley Desktop is software for managing and sharing research papers
Exec=/home/praz/.local/share/mendeleydesktop %f
Icon=mendeleydesktop
Terminal=false
Type=Application
Categories=Education;Literature;Qt;
X-SuSE-translate=false
MimeType=x-scheme-handler/mendeley;application/pdf;text/x-bibtex;
X-Mendeley-Version=1

The problem's :

You need to switch from the standard text mode (tty) XWindows session to the default GNOME session (GDM)

try switch the gdm using CTRL+ALT+F2 to go back to GUI, or use a command chvt 1

after you switch back to GNOME, please check again the mendeley package using :

sudo apt-cache policy mendeleydesktop

and the output should be like :

$ sudo apt-cache policy mendeleydesktop
[sudo] password for praz: 
mendeleydesktop:
  Installed: 1.19.3
  Candidate: 1.19.3
  Version table:
 *** 1.19.3 500
        500 https://desktop-download.mendeley.com/download/apt stable/main amd64 Packages
        100 /var/lib/dpkg/status

IF you still don't have the mendeley Repository, try to run :

sudo dpkg-reconfigure mendeleydesktop

for reconfigure mendeley package to include the mendeley repository and data directory of mendeley package, and check your mendeley package with type :

sudo dpkg -L mendeleydesktop

the output should be like :

...
/usr/bin
/usr/bin/mendeleydesktop
/opt
/opt/mendeleydesktop
/opt/mendeleydesktop/lib
/opt/mendeleydesktop/lib/cpp
/opt/mendeleydesktop/lib/cpp/libstdc++.so.6
/opt/mendeleydesktop/lib/qt
/opt/mendeleydesktop/lib/qt/libQt5Widgets.so.5
/opt/mendeleydesktop/lib/qt/libicudata.so.56
...

Hope this helps.