LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-15-2009, 10:24 AM   #1
wufo
Member
 
Registered: Oct 2004
Posts: 209

Rep: Reputation: 15
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?

tj
 
Old 01-15-2009, 10:26 AM   #2
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Do you have a .bashrc in ~?
 
Old 01-15-2009, 11:12 AM   #3
wufo
Member
 
Registered: Oct 2004
Posts: 209

Original Poster
Rep: Reputation: 15
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?

tj
 
Old 01-15-2009, 12:56 PM   #4
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
did you have

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

tobyl

Last edited by tobyl; 01-15-2009 at 12:58 PM. Reason: .
 
Old 01-15-2009, 05:07 PM   #5
wufo
Member
 
Registered: Oct 2004
Posts: 209

Original Poster
Rep: Reputation: 15
Bingo, thanks, I'm learning.

tj
 
Old 01-17-2009, 01:42 PM   #6
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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
 
Old 01-18-2009, 01:06 AM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
It's a bit of reading, but see the bash manual page's section on invocation.
 
Old 01-19-2009, 09:21 AM   #8
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

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

#!/bin/sh
if [ -r /etc/profile ]
then
. /etc/profile
fi

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

Chris

Last edited by ChrisAbela; 01-19-2009 at 09:22 AM.
 
Old 01-19-2009, 04:27 PM   #9
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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?

Thanks

Last edited by NightSky; 01-19-2009 at 04:31 PM.
 
Old 01-19-2009, 05:49 PM   #10
wufo
Member
 
Registered: Oct 2004
Posts: 209

Original Poster
Rep: Reputation: 15
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.

tj
 
Old 01-20-2009, 02:33 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
To learn more on bash scripting try:
http://www.grymoire.com/Unix/
http://tldp.org/LDP/abs/html/
http://linux.2038bug.com/rute-home.html
 
Old 01-20-2009, 04:15 AM   #12
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
#!/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.
 
Old 01-21-2009, 09:45 PM   #13
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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.
 
Old 01-22-2009, 12:42 AM   #14
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Rep: Reputation: 31
hence why i changed all of my terminals to "konsole --ls" =D
 
Old 01-22-2009, 07:58 AM   #15
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by ninja master View Post
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.
Code:
$ grep Exec /usr/share/applications/kde/konsole.desktop 
Exec=konsole --ls
 
  


Reply



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
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-03-2008 11:18 PM
Command line/ command prompt saiinch Linux - Newbie 5 03-17-2006 02:29 AM
Finished Slackware installed and booted to a command prompt sledd Slackware 6 11-28-2004 05:59 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 12:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:41 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