Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In the course of installing 'convert,' there were several export commands to run to make it work. In some cases, though, I misspelled items and/or didn't include quotes where I should.
Soooo... I am wondering that...
1. Where do these export commands 'go'?
2. How can I clean this up?
Whoops... I did mess up my PATH.
bash can't find cp, rm, and other commands.
I'm .. ah... screwed huh?
More info. I am running SuSE 9.2 and I executed these commands as myself, not su.
I think things are okay, but I am confused by the results.
When I ran the export commands, I ran than under my username, not 'su'. And after I performed these operations, I could run convert, but not other commands like cp.
So, I just closed that terminal session. (I'm in SuSE in KDE.) I reopened a new terminal session and common commands work like cp, mv, etc.
But now convert doesn't work.
Ultimately, I'd like 'convert' and the other commands to work. ;-)
Distribution: SuSE 9.1 Pro on Intel 2.4GHz (Dell Optiplex GX260)
Posts: 20
Rep:
1) If all you did was export paths, then you will get your regular paths back by re-loggin in or restarting your computer. export variables are only stored in RAM, not in disk.
2) If you fubar'ed your /etc/profile file, then you need to find a way to re-establish your paths in that file. You'll want to make sure the regular paths are there, like
/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin
and add any distro-specific stuff to it, like /opt/firefox or /opt/kde3/bin.
"export" commands put or modify variables in your "environment". Environments are inherited from the shell that started them. If you want to see the value of the PATH variable, you can type "echo $PATH".
Distribution: SuSE 9.1 Pro on Intel 2.4GHz (Dell Optiplex GX260)
Posts: 20
Rep:
Quote:
Originally posted by tcv
Ultimately, I'd like 'convert' and the other commands to work. ;-)
WhaddaIdowrong?
Convert (I assume you mean ImageMagick's convert) should have been installed in a "regular" place. In my SuSE distro, it's in /usr/bin. Of course, your installation should have put convert in a place accessible to your PATH for you.
If convert is in your path, you can type "whereis convert" and it will respond with the location. If you have convert in a "special place" and you don't want to put it in /usr/bin or somwhere like that, then you can link to it with a command like "ln -s /path/to/convert /usr/bin/convert". Or, you can just add the location of convert to your path from within /etc/profile or $HOME/.bashrc.
Well, it seems to me I can go two routes with this...
1. Create a profile.local that exports the items listed in QuickStart.html. That way, I can specify the manual location of ImageMagick. (Right now it's in "$HOME/bin/".)
2. Download the SOURCE instead of the binary, and make INSTALL.
/etc/profile is the system wide environment. This is the default for all users. It doesn't appear that you messed with this file. The individual users profile is a hidden file in your home directory called .bash_profile. You can change the path here too.
When you added the commands you overwrite the existing path environment with a new one. That is why cp etc. didn't work. And as you found out the the new environment was only valid for the current shell. When you opened a new terminal window you could not use the convert command because the environment didn't include the new commands anymore.
So just add the new commands to the .bash_profile file for your user.
There is no .bash_profile in my home folder, however there is a .profile.
There is also an /etc/profile. There's a warning in there to create a .profilelocal if I want to create my own settings. And I see a check in profile for the existence of the local profile.
But wouldn't I have to create an export path that included the places that are ALSO in the global profile INCLUDING the convert stuff?
Distribution: SuSE 9.1 Pro on Intel 2.4GHz (Dell Optiplex GX260)
Posts: 20
Rep:
If the executable binaries are sitting in $HOME/bin, just add the line
export PATH=$HOME/bin:$PATH
to your local profile. Frankly, I'm surprised your profile isn't setting up $HOME/bin already. Don't worry, the regular profile stuff will still work fine.
Originally posted by zoiks to your local profile. Frankly, I'm surprised your profile isn't setting up $HOME/bin already. Don't worry, the regular profile stuff will still work fine.
It is setting up $HOME/bin.
But how does it find all the rest of it? ImageMagick has a library, as I'm sure you know, that's set up with an environment variable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.