#254 ✓resolved
Josep Anguera

Running as root works, as a normal user don't

Reported by Josep Anguera | July 14th, 2010 @ 08:24 PM

System: Fedora 11 i386

I've intalled redcar like this (as root):

# gem install redcar
# redcar install
The installation worked perfectly. The problem is that now if I run redcar as root, redcar loads and works as expected but if I try to run it as my regular user it fails with:
[z@zlaptop ~]$ redcar
Redcar 0.3.8 ( i386-linux )

Can't find jruby jar at /usr/lib/ruby/gems/1.8/gems/redcar-0.3.8/lib/jruby-complete-1.5.0.jar, did you run 'redcar install' ?

Comments and changes to this ticket

  • Josep Anguera

    Josep Anguera July 14th, 2010 @ 08:25 PM

    Redcar version is 0.3.8

  • Josep Anguera

    Josep Anguera July 14th, 2010 @ 09:54 PM

    Well, excuse me for triple posting, but I've found the problem. The problem is that it installs several files as symbolic links and the real files are placed in the home directory. For example:

    lrwxrwxrwx 1 root root 72 2010-07-14 20:06 ./plugins/edit_view_swt/vendor/java-mateview.jar -> /root/.redcar/jars/redcar/plugins/edit_view_swt/vendor/java-mateview.jar
    lrwxrwxrwx 1 root root 78 2010-07-14 20:06 ./plugins/application_swt/lib/dist/application_swt.jar -> /root/.redcar/jars/redcar/plugins/application_swt/lib/dist/application_swt.jar
    lrwxrwxrwx 1 root root 54 2010-07-14 20:04 ./plugins/application_swt/vendor/jface/org.eclipse.core.commands.jar -> /root/.redcar/jars/jface/org.eclipse.core.commands.jar
    ...
    

    I guess that is intended but it would be nice to have an option at install time asking which user's home directory you want to put those files.

  • Daniel Lucraft

    Daniel Lucraft July 15th, 2010 @ 09:27 AM

    • State changed from “new” to “open”

    Damn, sorry. I didn't think of the running-as-root case, only the "sudo redcar install" case.

    If you run "sudo redcar install" the home directory is still given as the user's, not root's. So you can install like that to make it work for now.

    What do you think it should do when being run as root?

  • Josep Anguera

    Josep Anguera July 16th, 2010 @ 01:35 AM

    Yes, I know that with sudo it would have gone ok, but in Fedora the use of sudo is not as standard as in Ubuntu. In my opinion these symbolic links shouldn't exist because you cannot expect to have access to someone's home directory but I understand that the installation is focused on single person (just one account) system.

    So, there are two solutions (that I can think of):

    1. Everything is kept as it is now, but in the 'redcar install' step you specify a user account or path like

      # redcar install --path=/home/daniel
      
    2. Instead of being symbolic links let that files be in /usr/lib/ruby/gems/... and at startup redcar could look if they exist in the home directory of the user. If they don't, just copy them to the user's home directory. In other words, use the files in /usr/lib/ruby/... as a fallback if they don't exist in the user's home directory.

    With the second approach you solve the inherent problem with the actual way of proceed in multiuser systems.

    In any case, congratulations for the project, looks promising :). I've started to use it yesterday and works perfectly, not a single crash. Congratulations.

    PS: additionally in Linux I think that these days (not sure, I'm not really well informed about that) the use of the XDG is recommended to place this kind of files. Just an idea, hope it helps :)

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) February 19th, 2011 @ 12:55 PM

    • State changed from “open” to “resolved”

    Option 1) was implemented (for different reasons) some time ago, the option is called "--home-dir=PATH"

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

Pages