"Your session only lasted 10 seconds...."
Just starting to get the hang of Linux and when I booted up today I got this error message just before KDE start (same error when I try Gnome and failsafe)
Your session only lasted 10 seconds..... ~/bin/bash: line 1: id: command not found ~/bin/bash: line 1: id: command not found ~/bin/bash: line 1: id: command not found ~/bin/bash: line 12: :too many arguements /usr/share/apps/switchdesk/Xclients.kde: line 2: exec: startkde: not found The only thing I have done recently that I can think of that may have done this is editing a shell file. I was setting paths and must have made an error. How do I get to the command line to fix this??? I tried to login to failsafe but that gave me a similar error. |
Which file were you editing? Post the new version, someone will tell you where the syntax problem was.
RO |
From what I can remember I was editing .bash_profile. I changed it back to
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin BASH_ENV=$HOME/.bashrc USERNAME="" export USERNAME BASH_ENV PATH but that was only for one user and not root. I'm still getting the same error. Think I may have also editied /etc/profile, but I only added paths to a java dir. |
/etc/profile is a file that will affect all users. Can you undo that changes there. What does
env |grep PATH show? RO |
env | grep PATH gives -
LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/X11R6/lib/modules PATH=/usr/java/j2re1.4.2_01/bin:/home/USER/bin |
Also. No shell commands work. I have to define their directory to use them i.e.
ls doesn't work unless /bin/ls is input. |
Well, that is the problem. It erases the path and replaces it with what you have. Comment out that line (# at the start), start a new xterm and you should have something like
env |grep PATH LD_LIBRARY_PATH=/root/adabas/lib:/root/adabas/lib:/root/adabas/lib:/root/adabas/lib:/root/adabas/lib: PATH=/root/adabas/bin:/root/adabas/pgm:/root/adabas/bin:/root/adabas/pgm:/root/adabas/bin:/root/adabas/pgm:/root/adabas/bin:/root/adabas/pgm:/root/adabas/bin:/root/adabas/pgm:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin You can APPEND to the path with PATH=/usr/java/j2re1.4.2_01/bin:/home/USER/bin:$PATH export PATH RO |
yes, you need to change your path variable.
your path variable for a standard user should include: /usr/bin /usr/local/bin /bin and also: /sbin /usr/sbin for root users. so just add them to your path variable, using the export command (use "whereis" to find where the path to a command such as export is) |
pheeeeww!!
Figured it out. I had two lines in the wrong place in /etc/profile which was stopping other PATHs being set. lol, it took literally 10 seconds to edit. Been trying to figure this out for the last hour. Oh well, you live and learn. -Quite possibly one of the most important things to remember while using Linux! Thanks. |
It is just second nature, I never make a change without first
cp filename filename_orig Glad you got it sorted out. :) RO |
All times are GMT -5. The time now is 12:56 PM. |