-   Slackware (
-   -   Slackware, Xfce and command prompt (

wufo 01-15-2009 11:24 AM

Slackware, Xfce and command prompt
I just installed Slack 12.2, coming back after a temporary foray into Ubuntu (which I have come to hate, but that's another subject) and I am running Xfce desktop for the first time. Having used fvwm before. So, I am a Xfce newbie.

The first problem I run into is the terminal settings under Xfce do not seem to inherit the profile settings, /etc/profile, etc. The prompt is just 'bash-3.1#' not 'host.user,pwd' and the ls command has none of the colors for the different file types, directories, links, etc.

Is the different profile file for Xfce launched xterms?


SqdnGuns 01-15-2009 11:26 AM

Do you have a .bashrc in ~?

wufo 01-15-2009 12:12 PM

Ok, putting it in .bashrc fixed that problem.
SO, that means that when starting a terminal in Xfce it totally ignores the universal profile in /etc/profile?


tobyl 01-15-2009 01:56 PM

did you have

'Run command as login shell' ticked in the preferences of terminal?
(need to restart terminal for changes to take effect)


wufo 01-15-2009 06:07 PM

Bingo, thanks, I'm learning.


NightSky 01-17-2009 02:42 PM

wufo, I tried to set PS1="\u@\h:\w> $" in /etc/profile for terminals that I am not using to logon to. That global setting won't work - have to create a ~.bashrc in /home/usr that has to be referred to by bash_profile according to :bahrc
thread here http://

rworkman 01-18-2009 02:06 AM

It's a bit of reading, but see the bash manual page's section on invocation.

ChrisAbela 01-19-2009 10:21 AM

I am also an avid xfce user.
This is my .bashrc:

if [ -r /etc/profile ]
. /etc/profile

Then copy .bashrc to /etc/skel so that all new users will inherit it immediately after they are created.


NightSky 01-19-2009 05:27 PM

These little scripts suggested are great but please explain what the code/symbols mean - what are they referring to? I am trying to learn howto read and write these snipets.
"if" is self explanitory, -r ?
What is the #! and /bin/ and /sh refer to?
What is the fi signify?


wufo 01-19-2009 06:49 PM

To Nightsky:

If you have trouble understanding the basics of these scripts you really need to some reading and study of the bash, or other, shell.
I highly recommend two books.

One is the old standby "UNIX Shell Programming" by Kochan and Wood. This is a great introductory book on shell programming.

The other one is "Learning the Bash Shell" from O'Reilly Press. A great book specific to the bash shell.

You really need to learn from something like these books before attempting to understand scripts that others have written. I know they were my savior and I still reference them all the time.


H_TeXMeX_H 01-20-2009 03:33 AM

To learn more on bash scripting try:

ChrisAbela 01-20-2009 05:15 AM

# This means the following is a shell sctipt, you should have a /bin/sh symbolically linked
# to the actual shell: usually /bin/bash
# try: $ ls -l /bin/sh

if [ -r /etc/profile ] # "-r" means if /etc/profile is readable
# check it out with $ ls -l /etc/profile
# try also $ man test
# you will find many incredibly powerful tests you can try.

# I think you got this one :-)

. /etc/profile
# this means: invoke /etc/profile

# fi means "the end of the if statement".

# The problem with UBUNTU et al is that you never get the incentive to learn these simple
# instructions.
# With Slackware you move from newbie to a power user in a few minutes :-).

Your question should form part of a Slackware FAQ, I had the same question when I started with Slack about a year ago. In a year's time you will be answering them!

NightSky 01-21-2009 10:45 PM

ChrisAbela, Thank you so much for your response copied it and added it to my custom help docs. I had those refferal links booked marked and already started reading. Just came across this post and thought when people write code if explanation was added it would make learning easier as it provides examples. It doesn't matter how basic it is, just makes slackware more user friendly.

ninja master 01-22-2009 01:42 AM

hence why i changed all of my terminals to "konsole --ls" =D

rworkman 01-22-2009 08:58 AM


Originally Posted by ninja master (Post 3417011)
hence why i changed all of my terminals to "konsole --ls" =D

Slackware's kde already does that; it's one of the few places Pat changes upstream defaults.

$ grep Exec /usr/share/applications/kde/konsole.desktop
Exec=konsole --ls

All times are GMT -5. The time now is 02:23 AM.