LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-28-2009, 11:03 PM   #1
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Rep: Reputation: 31
a broken bash document?


http://www.linuxfromscratch.org/blfs...s/profile.html

i found everything here to work for me, except for the /etc/profile section.

the ~/profile subsection may be broken, or it may not.

the profile would break my bash, to the point where i had to use live cds to repair my distro. now my terminals are very LFS sexy like =)
 
Old 01-28-2009, 11:08 PM   #2
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
the way that this is breaking my terminal, is that i loose functionality of certain letters. i loose u, and a few others that make "shutdown" and "su" impossible. thank god i still have X11 running, and know the command "kdesu" to smash stuff up a bit more. =D my backup of my previous distro's profile is breaking this way now also.
 
Old 01-28-2009, 11:17 PM   #3
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
removing my .bash_profile = i gain access to my L key again. the odd part is that lowercase l is broken, but upper case L works fine.

removing .bashrc does nothing. i loose functionality of b, u, e, d, a and a few others.

indeed removing my distros default profile also returns my letter functionality. maybe ill upload my backups so someone can inspect them by request?

"for script in /etc/profile.d/*.sh ; do
if [ -r $script ] ; then
. $script
fi"

i have a feeling this general script is causing the clash of the titans, as my directories are blended together, with scripts from both the lfs info and the default distros info.

from commenting out section to section untill completely commented. the
Code:
export PATH=/bin:/usr/bin
is the one that returns my e key functionality.

Last edited by ninja master; 01-28-2009 at 11:28 PM.
 
Old 01-28-2009, 11:28 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
What did you do for this part:
Code:
cat > /etc/profile.d/i18n.sh << "EOF"
# Set up i18n variables
export LANG=<ll>_<CC>.<charmap><@modifiers>
EOF
Between the angle brackets are variables. You need to include the values you use. This isn't a literal script to use.

Also check this script:
Code:
/etc/profile.d/readline.sh

This script sets up the default inputrc configuration file. If the user does not have individual settings, it uses the global file.

cat > /etc/profile.d/readline.sh << "EOF"
# Setup the INPUTRC environment variable.
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
        INPUTRC=/etc/inputrc
fi
export INPUTRC
EOF
If $HOME/.inputrc is bad, this could cause the problems you are seeing.

Check the other scripts in /etc/profile.d/ as well. They are sourced by /etc/profile.

Last edited by jschiwal; 01-28-2009 at 11:30 PM.
 
Old 01-29-2009, 12:01 AM   #5
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
ok thanks, i screwed them up for sure. =) im looking to make my terminals sexy system wide.

what i did for the variables was went copy paste nuts. =)
 
Old 01-29-2009, 12:08 AM   #6
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
ok so i would be using en_US

would the script i would want to execute be

Code:
cat > /etc/profile.d/i18n.sh << "EOF"
# Set up i18n variables
export LANG=en_US
EOF
?????

found default "export LANG=en_US" thanks anywho!

Last edited by ninja master; 01-29-2009 at 12:30 AM.
 
Old 01-29-2009, 12:53 AM   #7
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
ok my readline.sh reads

Code:
# Setup the INPUTRC environment variable.
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
        INPUTRC=/etc/inputrc
fi
export INPUTRC
but my terminals are still loosing letter functionalities.
 
Old 01-29-2009, 01:03 AM   #8
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
ok i tried to chmod -x everything except for the scripts i created, but it seems the scripts in profile.d are still being read. do i need to chmod -r everything except the scripts i made?
 
Old 01-29-2009, 01:10 AM   #9
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
horay! i got it!!!

wait a minute, no i didnt... now if i reboot its going to be like "nothings in your path!" back to hammering on the /etc/profile blast and things were looking up for a second.

Last edited by ninja master; 01-29-2009 at 01:40 AM.
 
Old 01-29-2009, 05:10 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Code:
cat > /etc/profile.d/i18n.sh << "EOF"
# Set up i18n variables
export LANG=en_US
EOF
What this does is run a here document that writes the 2nd and 3rd line to a file (via redirection). You can use vim or another editor to make corrections or create a file instead.

I haven't modified my .inputrc and it contains comments that one may remove to make changes.
Code:
cat .inputrc
################################################################################
## ~/.inputrc
##
## Control the behaviour of the readline library used e.g.
## by the bash in the interactive mode for line editing.
##
################################################################################
#
# The bell style used e.g. on error or tab completion, possible values
# are `none', `visible', and `audible' the ringing the bell.
#
#set bell-style none

#
# If set to on, words which have more than one possible completion without
# any possible partial completion cause the matches to be listed immediately
# instead of ringing the bell.
#
#set show-all-if-unmodified on

#
# If set to on, words which have more than one possible completion cause the
# matches to be listed immediately instead of ringing the bell.
#
#set show-all-if-ambiguous on

#
# end
#
Where did you get your /etc/inputrc file. It has key mappings. If you modified it, you might want to go back to the original.

I would recommend installing the rcs package. Then before modifying a configuration file, you can check it in so you can later revert to a previous version if there is a problem.
E.G.
sudo mkdir /etc/RCS
cd /etc
sudo ci -l inputrc
# make modifications
vim inputrc
[/code]

Never change permissions of files in such a bulk manner. If you have an /etc/permissions file, it will list the ownership and permissions that files should be. Fix your ~/.bash_profile & /etc/profile files or the files it sources instead of stopping it from running.

Also, read the first part of the "info bash" manual. It tells you which startup script is run for login shells. There are three possible startup scripts that might be run in your home directory. ~/.profile, ~/.bash_login or ~/.bash_profile. One may source another as well, so reading what you have would be a good idea.

I don't understand what you mean by sexy terminals. Often changes are made in the PS1 variable to change the prompt.

Last edited by jschiwal; 01-29-2009 at 05:11 AM.
 
Old 01-29-2009, 02:54 PM   #11
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
ive got it set to the point where its functioning normally agian.
 
  


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
Line wrapping broken on Bash 3.0 ninjabob7 Linux - Software 4 09-21-2009 12:50 PM
html; character encoding per document tag, not whole document TheLinuxDuck Programming 0 08-14-2008 11:12 AM
[BASH] Search for 5-digit numbers in document General Programming 2 01-10-2007 08:06 PM
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
suse 9.2 install broken, involves bash dpeirce SUSE / openSUSE 1 04-10-2005 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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