Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tips for Terminals..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Thu Jun 20, 2002 1:26 am    Post subject: Tips for Terminals.. Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Jun 20, 2002 2:06 am    Post subject: Reply with quote

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
View user's profile Send private message
james
n00b
n00b


Joined: 24 Apr 2002
Posts: 56
Location: Middle Smithfield, PA

PostPosted: Thu Jun 20, 2002 2:20 am    Post subject: Reply with quote

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
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Thu Jun 20, 2002 4:10 am    Post subject: Reply with quote

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
View user's profile Send private message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Thu Jun 20, 2002 7:15 am    Post subject: Reply with quote

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
View user's profile Send private message
vermaden
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 168
Location: pl_PL.lodz

PostPosted: Mon Nov 13, 2006 9:03 pm    Post subject: Reply with quote

a lot nice tips can be found here:
http://www.debian-administration.org/articles/130
_________________
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds
vermaden's: links spreadbsd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum