LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-27-2004, 01:33 PM   #1
codec
Member
 
Registered: Sep 2003
Location: mad.es.eu
Distribution: ubuntu 5.04 knoppix Slack91/10 freebsd51 vector4 redhat9
Posts: 304

Rep: Reputation: 30
$PS1 different in X and prompt


When we first login, the default command prompt is: \u@\h:\w$
When the x started, the command prompt become bash 2.05b $

So, which script changed it to that useless prompt? I hope I can change that before touching .bashrc or /etc/profile
 
Old 06-27-2004, 01:53 PM   #2
veritas
Member
 
Registered: Aug 2003
Location: Dallas,TX
Distribution: Ubuntu Server, Slackware, Red Hat 6.1
Posts: 241

Rep: Reputation: 30
Not really sure about the script, try making a file in your home directory called .bash_profile, and then put your PS1= stuff in there. Restart X.

Also, are you seeing "bash 2.05b $" in a X terminal like xterm? Its possible that you haven't set the program to use the login shell.
 
Old 06-27-2004, 01:55 PM   #3
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,437

Rep: Reputation: 93
use the -ls switch
xterm -ls
and what about this 'reggae' prompt
export PS1="\[\033[1;32m\]\u\[\033[1;33m\]@\[\033[1;31m\]\h\[\033[0;39m\]:\w\\$ "
 
Old 06-27-2004, 01:58 PM   #4
veritas
Member
 
Registered: Aug 2003
Location: Dallas,TX
Distribution: Ubuntu Server, Slackware, Red Hat 6.1
Posts: 241

Rep: Reputation: 30
Heh, pretty cool actually. Of course, if reggae is not your thing, there is always the my cool poser prompt:

Code:
PS1="ELITE SWORD -->  0=--=[\w]==========> SLASH SLASH ENTER CMD >> "
Working directory INSIDE of the sword handle, thank you very much.

Last edited by veritas; 06-27-2004 at 02:09 PM.
 
Old 06-27-2004, 02:15 PM   #5
AxelFendersson
Member
 
Registered: Mar 2004
Location: Darkest Oxfordshire
Distribution: Arch, Slackware
Posts: 184

Rep: Reputation: 30
Quick-and-dirty fix:

cp /etc/profile ~/.bash_profile
cp /etc/profile ~/.bashrc
 
Old 06-27-2004, 02:30 PM   #6
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
rather than copying the whole thing...
I set up .bashrc to source /etc/profile and ~/.bash_profile

Code:
source /etc/profile
source ~/.bash_profile
I do that, rather than changing every single reference to aterm or xterm to a login shell.

--Shade
 
Old 06-27-2004, 03:33 PM   #7
AxelFendersson
Member
 
Registered: Mar 2004
Location: Darkest Oxfordshire
Distribution: Arch, Slackware
Posts: 184

Rep: Reputation: 30
That's another way of doing it. You could also use symlinks instead of copying:

ln -s /etc/profile ~/.bash_profile
ln -s /etc/profile ~/.bashrc

Although I've just set my GNOME termnal to be a login shell. I don't use Konsole or Xterm.
 
Old 06-27-2004, 04:42 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
cat /etc/profile > ~/.bashrc
cat /etc/profile > ~/.bash_profile


The many different ways to create a bash environment file....
 
  


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
Need a program capable of ripping PS1 isos TheBelush Linux - Software 2 04-18-2005 01:06 PM
help PS1 tool bar and .xinitrc Paxmaster Linux - Software 0 07-19-2004 01:04 PM
help i can't save my PS1 setting Paxmaster Linux - Software 3 07-17-2004 10:39 PM
PS1 variable wogga Red Hat 2 05-26-2004 05:39 PM
setting the PS1 enviroment variable in xterm schatoor Linux - General 2 04-29-2003 08:41 AM


All times are GMT -5. The time now is 08:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration