SlackwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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://http://www.linuxquestions.org...t=bash_profile
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?
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.
#!/bin/sh
# 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.
then
# I think you got this one :-)
. /etc/profile
# this means: invoke /etc/profile
fi
# 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!
Last edited by ChrisAbela; 01-20-2009 at 04:18 AM.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.