ffi Posted August 7, 2006 Report Share Posted August 7, 2006 (edited) There are some program that I can run as root but not as user, eg: $ rar bash: rar: command not found but when I run as root I can access rar. Edited August 7, 2006 by ffi Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted August 7, 2006 Report Share Posted August 7, 2006 Well, generally there's a reason you can't run them as a user... You could always just do use sudo or something....maybe...don't actually know if that'd work.... Try 'locate [command]' to find where it is and just run if from there. For example, I know urpmi can only be run as root....I did 'locate urpmi', lotta results, one being /usr/sbin/urpmi.... [urza9814@Arochone ~]$ urpmi bash: urpmi: command not found [urza9814@Arochone ~]$ /usr/sbin/urpmi urpmi version 4.7.15 Copyright (C) 1999-2005 Mandriva. This is free software and may be redistributed under the terms of the GNU GPL ... They might all be under /usr/sbin, I'm really not sure...just a bit of exploration on my part...hope it helps :) Quote Link to comment Share on other sites More sharing options...
ffi Posted August 7, 2006 Author Report Share Posted August 7, 2006 (edited) Yes, but I need this program to run, its located in /usr/local/bin I tried permissions and stuff but it wont run. When I enter ra + rab it auto-completes but my user finds nothing, there are other programs in the same dir which my user does auto-complete. I need to be able to run it without path, so I can use rar as a backend for graphical archivers.... edit: this is not true, i had some duplicates. So the question really should by how can I make my user look in /usr/local/bin like root can? Edited August 7, 2006 by ffi Quote Link to comment Share on other sites More sharing options...
tyme Posted August 7, 2006 Report Share Posted August 7, 2006 edit .bash_profile and add /usr/local/bin to your path: PATH=$PATH:/usr/local/bin export PATH assuming PATH isn't being set and exported already in your .bash_profile - if it is, then just add :/usr/local/bin to the end of the PATH=$PATH:* line. you could also allow all users to access /usr/local/bin by editing the file /etc/profile similarly. Quote Link to comment Share on other sites More sharing options...
ffi Posted August 7, 2006 Author Report Share Posted August 7, 2006 (edited) edit .bash_profile and add /usr/local/bin to your path: PATH=$PATH:/usr/local/bin export PATH assuming PATH isn't being set and exported already in your .bash_profile - if it is, then just add :/usr/local/bin to the end of the [/i]PATH=$PATH:*[/i] line. Hmm, this in part worked, I can now access rar from command line but xarchiver still doesnt work. Maybe it needs to know the path too :s Edited August 7, 2006 by ffi Quote Link to comment Share on other sites More sharing options...
tyme Posted August 7, 2006 Report Share Posted August 7, 2006 where is xarchiver located? also, be sure to run: source /etc/profile after any changes to .bash_profile or /etc/profile Quote Link to comment Share on other sites More sharing options...
ffi Posted August 7, 2006 Author Report Share Posted August 7, 2006 Both as user and root, I get # source /etc/profile -bash: TMOUT: readonly variable xarchiver is in /usr/bin Quote Link to comment Share on other sites More sharing options...
tyme Posted August 7, 2006 Report Share Posted August 7, 2006 if xarchiver is in /usr/bin then it should already be in your path. try logging out and back in and see if it helps any. Quote Link to comment Share on other sites More sharing options...
ffi Posted August 7, 2006 Author Report Share Posted August 7, 2006 (edited) if xarchiver is in /usr/bin then it should already be in your path. try logging out and back in and see if it helps any. Yes. it works. Thanks :) Edited August 7, 2006 by ffi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.