You are not logged in.
With Ubuntu I could copy executables into my ~/bin folder and then just run them by typing the name (in terminal or run box).
How can I do this in Arch?
Last edited by anonymous_user (2009-10-16 21:14:44)
Offline
By adding ~/bin/ to your $PATH.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
to be "compliant", add this to your ~/.bashrc
export PATH='$PATH:$HOME/bin'
Last edited by Lich (2009-10-15 19:14:02)
Archlinux | ratpoison + evilwm | urxvtc | tmux
Offline
Ok I did that but then I can't launch any programs from my terminal. It says command not found.
Once I remove that line from my .bashrc, it works fine again.
Last edited by anonymous_user (2009-10-15 19:33:26)
Offline
Show us the output of
echo $PATH
when it is added. There must be something wrong for it to find less commands
Offline
you need to source your bashrc after you add that line
source ~/.bashrc
Archlinux | ratpoison + evilwm | urxvtc | tmux
Offline
to be "compliant", add this to your ~/.bashrc
export PATH='$PATH:$HOME/bin'
That doesn't work. You enclosed the string in single quotes. It should have been this:
export PATH="$PATH:$HOME/bin"
Double quotes enable variable interpolation.
Last edited by Peasantoid (2009-10-15 19:43:01)
Offline
to be "compliant", add this to your ~/.bashrc
export PATH='$PATH:$HOME/bin'
That doesn't work because of the single quotes (bash doesn't interpolate variables inside single quotes). Use double quotes:
export PATH="$PATH:$HOME/bin"
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I used the double quotes and it works for the terminal. Thanks.
Now is there a way so I can also run the programs from xfrun4?
Offline
@Peasantoid
Hehe, nearly identical replies. I didn't want to edit my post with the traditional "bah, beat me to it" remark as I want to leave it completely intact.
I found this amusing.
*note to self*
post first, double-check and maybe edit later
I used the double quotes and it works for the terminal. Thanks.
Now is there a way so I can also run the programs from xfrun4?
Log out and log back in so that your login terminal sources your bashrc.
Last edited by Xyne (2009-10-15 19:50:40)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Didn't work. I can launch the program from terminal but not xfrun4.
Offline
@Peasantoid
Hehe, nearly identical replies. I didn't want to edit my post with the traditional "bah, beat me to it" remark as I want to leave it completely intact.I found this amusing.
Damn man, that's weird!
Great minds think alike...
@anonymous_user: Here's a fairly simple (but questionably elegant) workaround for xfrun4. Rename the real xfrun4 to something like _xfrun4, then create this script in its place:
#!/bin/bash
source ~/.bashrc
_xfrun4 $@
Remember to `chmod +x` the script.
Last edited by Peasantoid (2009-10-15 20:03:53)
Offline
That still doesn't work. Im thinking it may just be easier to copy my scripts to /usr/bin or something.
Last edited by anonymous_user (2009-10-15 20:37:35)
Offline
What do you mean 'it doesn't work'? Is there an error message? What?
(If you're sticking that in ~/.bin, it's not going to work, since that's what you're trying to enable in the first place )
Last edited by Peasantoid (2009-10-15 20:44:38)
Offline
have you created that folder first?
mkdir ~/bin
then just add the line to .bashrc, or edit the PATH variable in /etc/profile
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
to be "compliant", add this to your ~/.bashrc
export PATH='$PATH:$HOME/bin'
This might work (using double quotes or even none at all). But I prefer it the other way around:
export PATH=$HOME/bin:$PATH
Bash will now search the ~/bin directory first. This is preferable, since I often put wrapper scripts around applications and keep them under the original name in my ~/bin. So my wrapper script will always be called instead of the original application in e.g. /usr/bin.
Moreover I did put this PATH extension into my $HOME/.bash_profile:
. $HOME/.bashrc
# Make sure the users bin directory will be searched in first place.
if [ -d $HOME/bin ]
then
export PATH=$HOME/bin:$PATH
fi
That way the path will be changed on login only and not everytime an interactive bash is started.
Last edited by bernarcher (2009-10-16 00:08:20)
To know or not to know ...
... the questions remain forever.
Offline
Lich wrote:to be "compliant", add this to your ~/.bashrc
export PATH='$PATH:$HOME/bin'
This might work (using double quotes or even none at all). But I prefer it the other way around:
export PATH=$HOME/bin:$PATH
Bash will now search the ~/bin directory first. This is preferable, since I often put wrapper scripts around applications and keep them under the original name in my ~/bin. So my wrapper script will always be called instead of the original application in e.g. /usr/bin.
Moreover I did put this PATH extension into my $HOME/.bash_profile:
. $HOME/.bashrc # Make sure the users bin directory will be searched in first place. if [ -d $HOME/bin ] then export PATH=$HOME/bin:$PATH fi
That way the path will be changed on login only and not everytime an interactive bash is started.
Didn't work
have you created that folder first?
Yes it was already created.
What do you mean 'it doesn't work'? Is there an error message? What?
See:
Offline
Remember to `chmod +x` the script.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Hmm! Stupid question: Is your conky-start executable at all?
(The Properties window does show "Read & Write" only.)
Also you need to re-login to make the .bash_profile changes current.
Last edited by bernarcher (2009-10-16 01:19:22)
To know or not to know ...
... the questions remain forever.
Offline
Its already executable:
[kevin]~/bin$ chmod +x -v conky-start
mode of `conky-start' retained as 0755 (rwxr-xr-x)
Offline
What happens if you try to explicitely run it:
$ ~/bin/conky-start
Also, what does "echo $PATH" say?
Last edited by bernarcher (2009-10-16 01:29:45)
To know or not to know ...
... the questions remain forever.
Offline
If I run it explicitly, I get the same error.
[kevin]~$ echo $PATH
/home/kevin/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
Last edited by anonymous_user (2009-10-16 01:35:10)
Offline
Weird! Maybe your conky-start is corrupted.
But yet another try. Does it work when you run it from the ~/bin directory?
cd bin
./conky-start
(Also try without the "./)
To know or not to know ...
... the questions remain forever.
Offline
Just to clarify:
conky-start works fine from the terminal, but not from xfrun4.
Offline
Ok, I googled a bit for
xfrun4 "failed to execute child process"
It appears this is an old problem with xfrun4 which does not properly use the PATH settings. See for instance this bug report.
Sorry, I have no idea how to proceed, then.
Last edited by bernarcher (2009-10-16 02:18:25)
To know or not to know ...
... the questions remain forever.
Offline