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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-08-2005, 03:00 AM
|
#1
|
Member
Registered: May 2004
Location: Spain
Distribution: SuSE9x
Posts: 40
Rep:
|
inputrc vs profile
Dear all,
I downloaded the PenguinBrain-Shareware. One of the 201 questions is:
After experimenting with 'vi' as your command line editor, you decide that you want to have 'vi' your default editor every time you log in. What would be the appropriate way to do this?
- Change the '/etc/inputrc' file.
- Change the '/etc/profile' file.
+ Change the '~/.inputrc file.
- Change the '~/.profile file.
Can somebody explain why ~/.inputrc and not ~/.profile? In my opinion technically speaking it really doesn't matter.
Regards, Carsten
|
|
|
07-08-2005, 04:22 AM
|
#2
|
Member
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379
Rep:
|
Change the '~/.profile file --> only if you need vi as default.
Change the '/etc/profile file --> only if EVERYONE need vi as default.
.inptrc file used by readline. See man page of readline for more info.
|
|
|
07-08-2005, 04:38 AM
|
#3
|
Member
Registered: May 2004
Location: Spain
Distribution: SuSE9x
Posts: 40
Original Poster
Rep:
|
Dear nixcraft,
yes, the difference between e. g. /etc/profile and ~/.profile is clear to me.
However I cannot draw a conclusion from your answer.
Code:
root:~ # man readline
No manual entry for readline
root:~ # man -k readline
Term::ReadLine (3pm) - Perl interface to various *(C`readline*(C' packages. If no real package is found, substitutes stubs instead of basic functions.
Term::ReadLine::Gnu (3pm) - Perl extension for the GNU Readline/History Library
root:~ # rpm -q readline
readline-5.0-7.2
root:~ # rpm -ql readline-5.0-7.2
/lib/libhistory.so.5
/lib/libhistory.so.5.0
/lib/libreadline.so.5
/lib/libreadline.so.5.0
/usr/share/info/history.info.gz
/usr/share/info/readline.info.gz
No man page available, so I try the info page of readline.
Code:
root:~ # info readline
---snip---
1.3 Readline Init File
======================
Although the Readline library comes with a set of Emacs-like
keybindings installed by default, it is possible to use a different set
of keybindings. Any user can customize programs that use Readline by
putting commands in an "inputrc" file, conventionally in his home
directory. The name of this file is taken from the value of the
environment variable `INPUTRC'. If that variable is unset, Readline
will read both `/etc/inputrc' and `~/.inputrc'.
When a program which uses the Readline library starts up, the init
file is read, and the key bindings are set.
In addition, the `C-x C-r' command re-reads this init file, thus
incorporating any changes that you might have made to it.
When a program which uses the Readline library starts up, the init file is read, and the key bindings are set.
---snip---
Very interesting but it doesn't provide an answer to my question, does it?
Regards, Carsten
|
|
|
07-08-2005, 07:55 AM
|
#4
|
Member
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379
Rep:
|
Inputrc deals with the mapping of the keyboard. For example inputrc is used to customized Home, Del, Insert keys for BASH shell and readline is library used by bash and other shells. You should only include keyboard shortcut in this file. And your vi realted alias or EDITOR variable in profile file. You must be wondering then how it works if you include the line in INPUTRC .. that is because INPUTRC run as shell script by bash/your shell.
/etc/profile = The systemwide initialization file, executed for login shells FOR ALL USERS
~/.profile = The personal initialization file, executed for login shells for Individual/current logged in user.
/etc/inputrc = The systemwide readline initialization file for ALL USER
~/.inputrc = Individual readline initialization file
I hope this clears it.
|
|
|
07-08-2005, 08:18 AM
|
#5
|
Member
Registered: May 2004
Location: Spain
Distribution: SuSE9x
Posts: 40
Original Poster
Rep:
|
Yes, that clears it.
Thank you, Carsten
|
|
|
All times are GMT -5. The time now is 03:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|