Jump to content

Terminal/Eterm Questions


mdg
 Share

Recommended Posts

1) I used to have different colors for files, directories,links,etc in Eterm until I started using fluxbox. Since then it's all one color. How can I get the colors back?

 

2) I've set up Eterm (in fluxbox) without borders, but I still have the menubar on top. How to get rid of it?

 

3) Easiest question last: When I read a man page in terminal, I've never figured out how to get back to the prompt when I'm done. I've tried "exit", "esc", "end", "back, satan", but nothing works. What's the magic word?

Link to comment
Share on other sites

Guest BooYah

The full command for getting colorized file listings is

 ls --color=auto

 

You can create an alias for it in /etc/profile.d/ to make it availible to all users.

 

But, before we go screwing around with things, look for the file /etc/profile.d/alias.sh and see if it's not already there, because I thought it was already aliased by default in Mandrake. Mine looks like this:

 

if [ $TERM != "emacs" ];then

   LS_OPTIONS="$LS_OPTIONS --color=auto"

fi



alias ls="ls $LS_OPTIONS"

Link to comment
Share on other sites

Here's my alias.sh file , maybe somebody can see an error

# Linux-Mandrake configuration: Chmouel Boudjnah <chmouel@mandrakesoft.com>

#

# Common Aliases for a system.

#

# The Semantic is :

#	If exist a ~/.alias and the user hasn't specified a

#	LOAD_SYSTEM_ALIAS variables then don't do any system aliases

#	If there is no ~/.alias but the user has specified a

#	IGNORE_SYSTEM_ALIASES then don't do any system aliases.



[[ -f ~/.alias ]] && [[ -z $LOAD_SYSTEM_ALIASES ]] && return 0

[[ -n $IGNORE_SYSTEM_ALIASES ]] && return 0



[ -e /etc/sysconfig/system ] && . /etc/sysconfig/system



eval `dircolors --sh /etc/DIR_COLORS`



# default ls options

LS_OPTIONS="-F"



# this should be removed once the bug with ls and multibytes locales is fixed

[ -r /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh

case "$LC_ALL$LC_CTYPE" in

   ja*|ko*|zh*) LS_OPTIONS="$LS_OPTIONS --show-control-chars";;

   *) if [ "`locale charmap`" = "UTF-8" ]; then

       LS_OPTIONS="$LS_OPTIONS --show-control-chars"

      fi;;

esac



# emacs doesn't support color

if [ $TERM != "emacs" ];then

   LS_OPTIONS="$LS_OPTIONS --color=auto"

fi



alias ls="ls $LS_OPTIONS"



alias d="ls"

alias l="ls"       	 # classical listing.

alias ll="ls -l"   	 # List detailled.

alias la='ls -a'      # List all.

alias lsd="ls -d */"  # List only the directory.

alias cd..="cd .."

alias s="cd .."

alias p="cd -"



alias md="mkdir"

alias rd="rmdir"

alias cp="cp -i"

alias mv="mv -i"

alias rm="rm -i"



# Make a filter for less

if [ -x /usr/bin/lesspipe.sh ];then

    export LESSOPEN="|/usr/bin/lesspipe.sh %s"

fi



if [ -n "$CLASS" -a "$CLASS" = "beginner" ];then

# Size of a directory (by default Human Readable).

   alias du='du -h'



# Size of a disk (by default Human Readable).

# and don't probe supermount

   alias df='df -h -x supermount'

fi

 

Is there supposed to be a "DIR_COLORS" directory in /etc?

Link to comment
Share on other sites

OK Steve, you were on the right track. I copied

if [ $TERM != "emacs" ];then

   LS_OPTIONS="$LS_OPTIONS --color=auto"

fi



alias ls="ls $LS_OPTIONS"

from /etc/profiles.d/alias.sh to ~/.bashrc and I have my colors back!

 

Thanks to you and Booyah

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...