LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 09-18-2003, 08:38 AM   #1
underling
LQ Newbie
 
Registered: Sep 2003
Location: Scotland
Distribution: Redhat 9
Posts: 24

Rep: Reputation: 15
Unhappy "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.
 
Old 09-18-2003, 09:15 AM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Which file were you editing? Post the new version, someone will tell you where the syntax problem was.

RO
 
Old 09-18-2003, 09:41 AM   #3
underling
LQ Newbie
 
Registered: Sep 2003
Location: Scotland
Distribution: Redhat 9
Posts: 24

Original Poster
Rep: Reputation: 15
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.
 
Old 09-18-2003, 09:53 AM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
/etc/profile is a file that will affect all users. Can you undo that changes there. What does
env |grep PATH
show?

RO
 
Old 09-18-2003, 10:07 AM   #5
underling
LQ Newbie
 
Registered: Sep 2003
Location: Scotland
Distribution: Redhat 9
Posts: 24

Original Poster
Rep: Reputation: 15
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
 
Old 09-18-2003, 10:08 AM   #6
underling
LQ Newbie
 
Registered: Sep 2003
Location: Scotland
Distribution: Redhat 9
Posts: 24

Original Poster
Rep: Reputation: 15
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.
 
Old 09-18-2003, 10:23 AM   #7
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
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
 
Old 09-18-2003, 10:29 AM   #8
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
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)
 
Old 09-18-2003, 10:55 AM   #9
underling
LQ Newbie
 
Registered: Sep 2003
Location: Scotland
Distribution: Redhat 9
Posts: 24

Original Poster
Rep: Reputation: 15
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.
 
Old 09-18-2003, 11:58 AM   #10
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
It is just second nature, I never make a change without first
cp filename filename_orig

Glad you got it sorted out.

RO
 
  


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
Your session only lasted less than 10 seconds... rsamurti Slackware - Installation 13 10-13-2011 02:24 AM
"your last session only lasted less than 10 seconds" supwiddiss SUSE / openSUSE 6 08-10-2007 06:19 AM
Your session only lasted for less than 10 seconds Raafi Linux - Newbie 5 04-17-2005 04:56 PM
Oracle 10g and Fedora 2.0 "Session lasted lesst than 10 seconds" ushradha Linux - Software 6 11-19-2004 10:04 PM
Your session lasted for < 10 seconds ... rsamurti Slackware 4 06-27-2004 08:24 AM


All times are GMT -5. The time now is 10:51 AM.

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