0

I've installed R (3.2.2) in latest lubuntu (apt-get) and the RStudio (0.99.489 - Ubuntu 12.04+ 32-bit). R works from command line, but the IDE fails to launch from the shortcut that installation placed for some reason in the Graphics section. Same with RStudio's shortcut in Programming. When I try and run /usr/share/applications/R.desktop I get:

me@system:~$ . /usr/share/applications/R.desktop 
[Desktop: command not found
software: command not found
Science: command not found
Math: command not found

And..

me@system:~$ . /usr/share/applications/rstudio.desktop 
[Desktop: command not found
bash: fg: %F: no such job
bash: text/x-r: No such file or directory
bash: text/x-R: No such file or directory
bash: text/x-r-doc: No such file or directory
bash: text/x-r-sweave: No such file or directory
bash: text/x-r-markdown: No such file or directory
bash: text/x-r-html: No such file or directory
bash: text/x-r-presentation: No such file or directory
bash: application/x-r-data: No such file or directory
bash: application/x-r-project: No such file or directory
bash: text/x-r-history: No such file or directory
bash: text/x-r-profile: No such file or directory
bash: text/x-tex: No such file or directory
bash: text/x-markdown: No such file or directory
bash: text/html: No such file or directory
bash: text/css: No such file or directory
bash: text/javascript: No such file or directory
bash: text/x-chdr: No such file or directory
bash: text/x-csrc: No such file or directory
bash: text/x-c++hdr: No such file or directory
bash: text/x-c++src: No such file or directory

Grateful for advice how figure out what's going wrong here.


Edit: as per request below.

me@system:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily
  • You appear to be trying to source a desktop launcher? AFAIK that's not the way to open an application – steeldriver Dec 11 '15 at 16:32
  • Well it wasn't my primary method.. – geotheory Dec 11 '15 at 16:45
  • If it installed correctly, you should be able to launch RStudio from the LXDE desktop's normal application menu - look under 'Programming' – steeldriver Dec 11 '15 at 17:09
  • What do you mean by the IDE, in: but the IDE fails to launch from the shortcut that installation placed for some reason in the Graphics what is the name of the program, as it appears in the Graphics menu? – clarity123 Dec 11 '15 at 19:05
  • Also, can you try the command lsb_release -a and update the question to include its results? it may lead to additional clues, thanks – clarity123 Dec 11 '15 at 19:07
1

Just a slight misunderstanding, you seem to be calling it by sourcing, which is usually used for example if you were to source . ~/.bashrc to make some setting in effect for your system.

But application shortcut *.desktop files are not run this way. The .desktop files contain an Exec=somecommand and it is the somecommand that is actually run by the system when you double click or run from the menu.

So, if you want to use the terminal to perform exactly the same thing a *.desktop does, you need to determine what Exec=... command is being run.

You could open any text viewer and figure out what command is run, or just use grep on your command line, for example for my R.desktop file I see:

$ grep '^Exec' /usr/share/applications/R.desktop
Exec=R

This tells me that all my R.desktop is doing is running the command R

Thus, to do the equivalent of this R.desktop shortcut, all I have to do is type R on command prompt, so I do that and I get R to start

$ R

So just check in your R.desktop file, see what command comes after Exec= , and run that.

  • Thanks. Exec=R. But as I said I know that runs in terminal. It also has its own IDE, which I cannot run. More importantly I can't run RStudio... – geotheory Dec 11 '15 at 20:28
  • Thanks, your rstudio.desktop looks identical to mine, so the only thing I can think of now are system differences. For system info could you run lsb_release -a and include the results in the original question? Thanks – clarity123 Dec 11 '15 at 20:48
  • Thanks, lsb_release... info helps eliminate any doubts about wrong version installed, as you have the latest 15.10 and rstudio 0.99 ... is for Ubuntu 12.04+, so you should be fine in terms of version issues. Now, programs often give away helpful error info when run from command prompt. When I run rstudio's command, on my command prompt: /usr/lib/rstudio/bin/rstudio, I don't get errors and rstudio starts after a moment. What text or errors, if any, show up for you when you run that command? And as usual, update the question to include this, thanks – clarity123 Dec 12 '15 at 2:52
  • That's the same error as when I just run rstudio - error while loading shared libraries: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory. I've tried installing libgstreamer with apt-get. – geotheory Dec 12 '15 at 8:15
  • I see. That error info gives another lead to chase down, so to figure this out, could you run two commands, and include the results in the original question: uname -a, and dpkg --get-selections | grep '^r-' , thanks – clarity123 Dec 12 '15 at 12:40
0

try reinstall using terminal

sudo dpkg -i rstudio_file_name.deb

there might be an warning about missing libgstreamer0.10 package. Start Sinaptic Package Manager and try to find "libgstreamer" there. In my case there was no such version, so i goolge it:

debian.org says its part of jessie main so you need add

deb http://ftp.de.debian.org/debian jessie main

to your repositories (Sinaptic Package Manager>Settigs>Repositories, Software & Updates->Other Software) and later fix "NO_PUBKEY" issue via http://ccm.net/faq/809-debian-apt-get-no-pubkey-gpg-error

And now try to install rstudio again

sudo dpkg -i rstudio_file_name.deb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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