LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-23-2002, 12:51 PM   #1
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
.bash_profile & path


i have, what i hope, is a fairly simple question. i just installed slackware 8.0 on my laptop, and so far so good. but when i'm in X and using xterm (or any other terminal for that matter) instead of the pwd i'm in, i get "bash-2.05#" as the prompt. plus i don't have any text formatting (files, paths, everything is the same color/weight).

i'm pretty sure this has to do with my .bash_profile (which doesn't exist) but i have no idea what the syntax is. please help! :-)
 
Old 01-23-2002, 02:17 PM   #2
ryanstrayer
Member
 
Registered: Jan 2002
Location: Kansas City
Distribution: RedHat 7.2 Kernel 2.4.17
Posts: 250

Rep: Reputation: 30
You can do one of two things...

Login as root and copy everything from the /etc/skel directory to your home directory.

or

Login as root and rename your home directory to something else, delete your user account. Then, recreate your user account and let the system recreate your home directory with the needed files.

Cheers!
 
Old 01-23-2002, 03:33 PM   #3
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
You may want to take a look at the /etc/profile file. It's the global profile config and if something is missing or wrong in there, could affect any new user.
 
Old 01-24-2002, 12:29 AM   #4
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
well, my problem is that i'm currently logged in as root (i'm one of those stupid people who always uses his root account).

looking in /etc/profile really doesn't do me much good, as i don't know the syntax for adding or removing lines. :-|
 
Old 01-24-2002, 06:25 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
copy from /etc/skel then
 
Old 01-24-2002, 08:10 AM   #6
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
i'll give that a go when i get home from work (damn corporate environment not letting me bring my linux box in).

i'm surprised they even let me get on the internet... oh, wait... they don't. i had to steal this username/pw for the firewall. :-)
 
Old 01-25-2002, 01:44 PM   #7
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
well, i tried those suggestions, and i still haven't been able to find a solution. let me restate my problem just for the record.

in console mode (slackware 8.0), i get the good ol' "root@localhost ~#" prompt, which shows my pwd, username and hostname, etc... it also displays all the font colors and bolds directories and all that good stuff.

however, when i boot into x and start any sort of terminal (aterm, xterm, gnome-terminal) the only prompt i get is "bash-2.05#". not to mention all the text appears as just white, making it hard to differentiate files from directories, and what have you.

i checked my /etc/skel dir, and it was empty. so i'm unable to copy files from there.

i'd just like to know what files i need to create and what configuration process i need to go through in order to get my x-terms to act like they should. i really have no idea about syntax, files, and whatnot, since i migrated from redhat which took care of all that stuff for me.

if someone could possibly post the necessary syntax, i'd really appreciate it. thanx in advance! :-)
 
Old 01-25-2002, 06:57 PM   #8
BruceLeroy
LQ Newbie
 
Registered: Jan 2002
Location: miami,fl
Distribution: Redhat 7
Posts: 24

Rep: Reputation: 15
I'm getting the same thing under RedHat. I always log on as root too. I might have screwed with the wrong file It just started happening today. Editing my bash files trying to get an alias to bind (did that make sense?) might have been my problem. Next time I boot into Linux, i'll see if that fixes it....
 
Old 01-25-2002, 11:41 PM   #9
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
if you echo $PS1 what do you get?
I assume in plain console it would be something like
[\u@\h \W]\$
echo it in X and if it is different than I guess you can set it
export PS1=[\u@\h \W]\$
 
Old 01-26-2002, 12:06 AM   #10
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
uhhhh... little clarification please? like what file(s) should this go in?

sorry... i've tried researching the problem myself, and have come up with nothing.
 
Old 01-26-2002, 12:06 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
that export line should be fine in ~/.bashrc, but it *should* already be in /etc/bashrc tho. You do have a /etc/bashrc yeah?

a standard ~/.bashrc file is:

Code:
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
so you can see that it doesn't actually do anything other than load the defaults.

Last edited by acid_kewpie; 01-26-2002 at 12:08 PM.
 
Old 01-30-2002, 02:49 PM   #12
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
well, i just thought i'd inform anyone else out there who might happen to be having the same problem that i fixed it. basically, all i had to do was add the following lines to my .bashrc file in my home dir:

alias dir='dir --color'
alias ls='ls --color'

basically, it just invokes ls with the color option, and gets the colors from your ~/.dircolors file.

pretty simple, and i'm glad i got it working (was getting irritating having all my terminal text be the same font/color.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Java to my path in the .bash_profile file .... jmax24 Linux - General 5 04-20-2004 02:14 PM
kde3.2 $PATH and .bash_profile easywebdev Slackware 2 03-29-2004 05:42 PM
bash_profile & bashrc c1p3r Linux - Newbie 0 07-15-2003 06:10 AM
kshell in path & .bash_profile dmartinez Linux - Newbie 3 03-31-2003 11:15 PM
profile, .bash_profile & ???? ChimpFace9000 Linux - General 1 07-05-2001 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:17 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
Open Source Consulting | Domain Registration