View previous topic :: View next topic |
Author |
Message |
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Thu Jun 20, 2002 1:26 am Post subject: Tips for Terminals.. |
|
|
I'm basically using a simple B&W xterm session. Does anyone have some more fancy xterm / Eterm / atem tips or tricks that they especially like? _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Jun 20, 2002 2:06 am Post subject: |
|
|
Good question... I've not quite deciphered xterm yet. The man page for bash indicates this: Quote: | When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com-
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior. |
My .bash_profile is this: Code: | [ -f ~/.bashrc ] && . ~/.bashrc
export TERM=vt102
eval `dircolors -b`
alias d="ls --color"
alias ls="ls --color=always"
alias ll="ls --color -l"
alias startx='startx -- -nolisten tcp' |
X starts with the -nolisten tcp option, so this file is being sourced. Howver,
directory listings don't show up in color unless I manually enter 'ls --color'.
Anyone know what is wrong? Other than the alias startx line, I didn't make
any changes or additions. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
james n00b
Joined: 24 Apr 2002 Posts: 56 Location: Middle Smithfield, PA
|
Posted: Thu Jun 20, 2002 2:20 am Post subject: |
|
|
Hi.
What I did was to make a .bashrc file in /root. Then copied the alias portion of bash profile over and everything is listed in color!
HTH,
J _________________ 17 Opps It's 19 now Gentoo's and counting |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Thu Jun 20, 2002 4:10 am Post subject: |
|
|
kanuslupus wrote: |
My .bash_profile is this: Code: | [ -f ~/.bashrc ] && . ~/.bashrc
export TERM=vt102
eval `dircolors -b`
alias d="ls --color"
alias ls="ls --color=always"
alias ll="ls --color -l"
alias startx='startx -- -nolisten tcp' |
X starts with the -nolisten tcp option, so this file is being sourced. Howver,
directory listings don't show up in color unless I manually enter 'ls --color'.
Anyone know what is wrong? Other than the alias startx line, I didn't make
any changes or additions. |
I moved these commands: Code: | alias d="ls --color"
alias ls="ls --color=always"
alias ll="ls --color -l" | to my ~/.bashrc and they worked like a charm, but I couldn't get them to work in my ~/.bash_profile either. Also, I have set up this: Code: | PS1="[\u@\h \W]\\$ "
PS2="----> " | as my prompt, but it only works when I have it in my ~/.bashrc and not my ~/.bash_profile. I'm not sure why this is. I read the man pages and it seems like it should work either place. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Thu Jun 20, 2002 7:15 am Post subject: |
|
|
The following work for me for nice color xterm, eterm. x-progs running after su and gvim instead of vim on X. You can ignore the "echo" lines since I use them to proprerly display greek characters...
-------
Non-root .bash_profile :
Code: |
case $TERM in xterm*)
xhost +localhost
export TERM=xterm-color
alias vi=gvim
;;
esac
case $TERM in Eterm*)
xhost +localhost
export TERM=xterm-color
alias vi=gvim
;;
esac
|
root's .bash_profile :
Code: |
case $TERM in xterm*)
export DISPLAY=:0.0
export TERM=xterm-color
alias ls="/bin/ls --color=auto -F -b -T 0"
alias vi=gvim
;;
*)
echo -ne "\033(K\033)K";
;; esac
case $TERM in Eterm*)
export DISPLAY=:0.0
export TERM=xterm-color
alias ls="/bin/ls --color=auto -F -b -T 0"
alias vi=gvim
;;
*)
echo -ne "\033(K\033)K";
;; esac
|
|
|
Back to top |
|
|
vermaden Apprentice
Joined: 27 Jul 2005 Posts: 168 Location: pl_PL.lodz
|
|
Back to top |
|
|
|