LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2004, 09:12 PM   #1
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Rep: Reputation: 15
Unhappy problem with startx, bash


Actually as a newbie I don't really know what is the problem.
As far as I can guess it's some errors I made when i tried to set some paths in /etc/profile.
Now after I start up my computer it says:
bash: id: command not found
[ : too many arguments
bash : tput:command not found
bash : tput: command not found
bash: wc: command not found
[: :integer expression expected
And whatever i type will result in
bash: command not found.

Is there any way I can resolve this?
 
Old 06-21-2004, 09:26 PM   #2
lpletch
LQ Newbie
 
Registered: Jun 2004
Posts: 8

Rep: Reputation: 0
Here is my path in /etc/profile you can compare to yours.


PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games"

export PATH

Don't know how you are going to edit without a working shell though.
Maybe boot with a rescue disk or Dist. CD
 
Old 06-21-2004, 09:30 PM   #3
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
Er... Meaning if I don't boot with either a rescue disk or Dist. CD there is no other way I can edit /etc/profile?
 
Old 06-21-2004, 09:49 PM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 49
you can still give the full path to run a command

e.g.

# /usr/bin/vim /etc/profile

If your system gets you upto the X screen or a text screen, you would not require a RescueCD or a BootCD

Last edited by ppuru; 06-21-2004 at 09:51 PM.
 
Old 06-21-2004, 09:54 PM   #5
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
I removed the 2 lines i added(which i thought to be the error), but startx and the other commands still refused to work.
Any suggestions to what else can be wrong?
 
Old 06-21-2004, 11:11 PM   #6
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
What happens when you type "echo $PATH"?
 
Old 06-22-2004, 12:22 AM   #7
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks milkshaw.
It seems like i removed a path by mistake.
export PATH=$PATH:/bin: seems to solve my error.

Can I ask another thing?
If I have clustalw in /opt/BioBrew/ClustalW/1.8.3/bin
what is the exact path to set so that i can just type clustalw to run it?
Afraid that I'll mess up all the paths again...

Last edited by jing; 06-22-2004 at 12:24 AM.
 
Old 06-22-2004, 12:39 AM   #8
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
Quote:
Originally posted by jing
Thanks milkshaw.
It seems like i removed a path by mistake.
export PATH=$PATH:/bin: seems to solve my error.
In /etc/profile you should have a longer path than /usr/bin such as the following

PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
export PATH PS1

Tip: Always make backups before changing files. I even have a backup directory for my latest working versions of config files and back them up to CD and the web.

Quote:
Can I ask another thing?
If I have clustalw in /opt/BioBrew/ClustalW/1.8.3/bin
what is the exact path to set so that i can just type clustalw to run it?
Afraid that I'll mess up all the paths again...
If the executable is in that directory just add it to your PATH or make an alias in /etc/profile for all users or ~/.bashrc for one user.
alias shortcut='full/path/to/program'
 
Old 06-22-2004, 12:47 AM   #9
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by darthtux
In /etc/profile you should have a longer path than /usr/bin such as the following

PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
export PATH PS1

Tip: Always make backups before changing files. I even have a backup directory for my latest working versions of config files and back them up to CD and the web.



If the executable is in that directory just add it to your PATH or make an alias in /etc/profile for all users or ~/.bashrc for one user.
alias shortcut='full/path/to/program'
But from what i could remember, i did not remove any line other then the two which i added in..

Er...so the exact path to be added to /etc/profile will be :
PATH=/opt/BioBrew/ClustalW/1.8.3/bin
Is that right?
Too afraid to go around messing with the paths again..
 
Old 06-22-2004, 12:56 AM   #10
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
You add it to the *end* of your existing PATH statement in /etc/profile. paths are seperated by colons For instance if it now says
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
you make it
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/BioBrew/ClustalW/1.8.3/bin
It's just adding a colon followed by the path you want to add

or if it is just for one user add the following line to ~/.bashrc
export PATH=$PATH:/opt/BioBrew/ClustalW/1.8.3/bin
 
Old 06-22-2004, 01:03 AM   #11
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks, darthtux.
But is there anyway which i can use to check if the path has been correctly set?
By just typing clustalw and see if it run is one way,right?
If it's correctly set, my earlier mistake won't repeat itself again right?

Last edited by jing; 06-22-2004 at 01:05 AM.
 
Old 06-22-2004, 01:05 AM   #12
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
echo $PATH

Yes, if it runs that part of the PATH is correct.

EDIT
If you have all needed paths in your PATH, you won't have the problems you had.

Last edited by darthtux; 06-22-2004 at 01:08 AM.
 
Old 06-22-2004, 01:41 AM   #13
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
echo $PATH shows
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/x11R6
and alot more
But I don't see the path which I just typed into /etc/profile appearing anywehre.
And clustalw don't work either..

Where did i go wrong?
 
Old 06-22-2004, 01:44 AM   #14
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
Did you log out and back in.
 
Old 06-22-2004, 01:45 AM   #15
jing
Member
 
Registered: May 2004
Location: Singapore
Posts: 30

Original Poster
Rep: Reputation: 15
no, I need to log out and in again to be able to see the changes?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startx problem mandrakewanta Linux - Newbie 2 05-07-2005 08:13 PM
when i startx the kde bring 2 bash program by it self Paxmaster Linux - General 1 11-11-2004 07:09 PM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 08:06 AM
Startx problem jcnye Linux - Software 2 08-10-2004 11:37 PM
Startx problem HoRrIdPrObLeMs Linux - Newbie 9 03-05-2002 04:20 PM


All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration