Slackware This Forum is for the discussion of Slackware Linux.
|
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-10-2004, 04:09 PM
|
#1
|
|
Member
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176
Rep:
|
put my user logon instead of bash prompt
Hi, i like to watch the fortune cookies stuff every time i open up a terminal. i now know the reason why kde 3.2.1 delete this issue it don't delete it, it just delete the user profile in the terminal so you don't see any message of fortune cookie. well i'm using aterm in kde 3.1.4 i want that instead of the typical bash$ that appears in the aterm terminal, i want it to appear user@machine$ like the usual one that appears in the kde console all the time. how i put that back but in aterm? i know how to delete user@machine$ from any terminal, but i don't know how to put it back. any tips?
|
|
|
|
04-10-2004, 10:28 PM
|
#2
|
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Rep:
|
Your post was kinda hard to understand, I apologize if this isn't what you wanted but I have a feeling this will help you out.
|
|
|
|
04-11-2004, 12:11 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2004
Location: MSU
Distribution: Slackware
Posts: 24
Rep:
|
Theres a flag to make aterm treat your shell as a login shell, I think -ls but im not sure; I know it is in the manual.
|
|
|
|
04-11-2004, 12:14 AM
|
#4
|
|
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Rep:
|
You're experiencing the difference between a login shell and a sub-shell.
There are a few initialization scripts which bash reads when it starts up. If you log in, say in a regular old console, bash reads /etc/profile and /home/user/.bash_profile
When a subshell (xterms and the like) starts up, it only reads the file /home/user/.bashrc
Within /home/user/.bashrc you want to have the line:
source /etc/profile
and/or optionally:
source .bash_profile
That should fix everything for you.
KDE's Konsole does things differently, but I'm not sure what exactly.
--Shade
|
|
|
|
04-11-2004, 10:22 AM
|
#5
|
|
Member
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176
Original Poster
Rep:
|
ok i be more clear, for example when you open up a console it shows this in the prompt
DEFAULT:
The hardware's, of course.
user@Slackware:~$
you can saw that
DEFAULT:
The hardware's, of course.
is the message of the fortune cookie, well is different when you open up aterm it shows only this:
bash-2.0.5$
Ok the thing is i want to open aterm and saw my user login instead of the bash-2.0.5$ i want to see this
user@Slackware:~$
how i put aterm, the same way that happens when i open a konsole. No bash-2.0.5$ yes user@Slackware:~$
|
|
|
|
04-11-2004, 12:48 PM
|
#6
|
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Rep:
|
Okay, I get it and I was right. What you want to do is open up your .bashrc file in your home directory. There will be a chunk that looks like
PS1="[stuff in here]"
Change that to
PS1="\u@\h:\W$"
Check out the link I gave a few posts back, it gives all the commands that you can add to change the way it looks. You can add all sorts of stuff.
|
|
|
|
04-11-2004, 01:09 PM
|
#7
|
|
Member
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176
Original Poster
Rep:
|
 ohh yeah, but the problem is i don't have any .bashrc file in my home directory. i only have .bash_history which is a text file that have all the commands i have already use in bash.  so what can i say, if konsole have the user login as default prompt where does it check it? so i could put it too in aterm.
|
|
|
|
04-11-2004, 01:35 PM
|
#8
|
|
Senior Member
Registered: Sep 2003
Location: Indiana
Distribution: Slackware-current
Posts: 1,244
Rep:
|
you can make your own .bashrc
|
|
|
|
04-11-2004, 01:58 PM
|
#9
|
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Rep:
|
Yeah, just make one and put the PS1=blahblahblah thing I gave you. You can also make aliases and stuff like that with your .bashrc file. It's pretty nifty.
|
|
|
|
04-11-2004, 10:00 PM
|
#10
|
|
Member
Registered: Feb 2004
Distribution: slackware 9.1
Posts: 106
Rep:
|
a samble .bash_profile
#####################
# .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=""
PS1="[\u@\h \w]\\$ " # this is what you wan to edit.
export USERNAME BASH_ENV PATH PS1
#################
now to change prompts just type "prompt" without the "" of course.
|
|
|
|
04-13-2004, 01:57 PM
|
#11
|
|
Member
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176
Original Poster
Rep:
|
 thank you it work very very well
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME=""
PS1="[\u@\h \w]\\$ " # this is what you wan to edit.
export USERNAME BASH_ENV PATH PS1
now aterm show the user prompt instead of the tipical Bash prompt.
 i'm so happy now.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:48 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|