There’s no /bin folder in my $HOME directory by default, so I had to create it. Then I would put my small script in it and “chmod +x” to make it work. If I do “./myscript” in “$HOME/bin”, it gets executed. If I navigate to some other folder outside “~/bin”, I can’t make the script work. What is going on? It gets on my nerves. I tried exporting the path in .bashrc, to no avail.
Hi
What did you export?
It should be;
echo $PATH
/home/username/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games
or
export PATH="/home/username/bin:$PATH"
Hi, Malcolm.
I have this:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/home/myusername/bin
By default the $HOME/bin folder is created and put into your path automatically. So, tell us how you installed openSUSE, its version and desktop selected.
Thank You,
It wasn’t created by default, I don’t know why. Here’s what I have:
Linux:
bin$ uname -a
Linux ***host*** 3.7.10-1.16-desktop #1 SMP PREEMPT date*bla*bla x86_64 x86_64 x86_64 GNU/Linux
KDE:
kded --version
Qt: 3.3.8c
KDE: 3.5.10 "release 67"
KDE Daemon: $Id: kded.cpp ******* date*blabla $
And how are you calling your file? If you still use the dot-slash before
it when outside of ‘bin’ it will not work. Just call it as myscript.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…
That’s what I did. I just call it myscript, without any dot-slash. It doesn’t work. I’m on openSUSE 12.3, DVD installation, basic.
Post the output from your mount command, in case your home directory is
mounted noexec or something.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…
Thank you, ab. No need to do that. After a restart it seems to be ok.
To help write your own bash scripts, look at my blog on the subject:
N.S.F. - New Script File, Bash Script File Header Creator - Version 2.6 - Blogs - openSUSE Forums
Thank You,