[问题] 在纯文本界面里没有彩色了

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
imlazy
帖子: 136
注册时间: 2006-10-29 10:49
来自: Shanghai, China

[问题] 在纯文本界面里没有彩色了

#1

帖子 imlazy » 2007-11-23 21:17

我记得上次好像是用apt-get装了JDK以后,在纯文本界面里就出现了下列问题:
1. 没有彩色了。
2. 按TAB自动补全没有了。
3. 在~/.bashrc里设的环境变量失效了(用export命令设的)。

我试了echo $SHELL,还是bash。

这是怎么回事?
头像
imlazy
帖子: 136
注册时间: 2006-10-29 10:49
来自: Shanghai, China

#2

帖子 imlazy » 2007-11-24 15:09

有人遇到这同样的事吗?请帮帮我,谢谢。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#3

帖子 BigSnake.NET » 2007-11-24 15:11

cp /etc/skel/* .
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
imlazy
帖子: 136
注册时间: 2006-10-29 10:49
来自: Shanghai, China

#4

帖子 imlazy » 2007-11-25 12:29

那里面只有一个Example的符号连接,我的~目录下已经有了。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#5

帖子 BigSnake.NET » 2007-11-25 12:33

imlazy 写了:那里面只有一个Example的符号连接,我的~目录下已经有了。
sudo aptitude install bash
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
Morain
帖子: 27
注册时间: 2006-06-21 19:03
联系:

Re: [问题] 在纯文本界面里没有彩色了

#6

帖子 Morain » 2007-11-26 13:05

imlazy 写了:我记得上次好像是用apt-get装了JDK以后,在纯文本界面里就出现了下列问题:
1. 没有彩色了。
2. 按TAB自动补全没有了。
3. 在~/.bashrc里设的环境变量失效了(用export命令设的)。

我试了echo $SHELL,还是bash。

这是怎么回事?
在~/.bashrc里面添加以下代码:

代码: 全选

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi
头像
imlazy
帖子: 136
注册时间: 2006-10-29 10:49
来自: Shanghai, China

#7

帖子 imlazy » 2007-12-01 9:21

我的~/.bashrc中本来就包含这一段,以下是该文件的内容:

代码: 全选

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    ;;
*)
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    ;;
esac

# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
这是不是意味着这个文件因为某种原因没有被执行。我不知道是什么原因,我现在只好在~/.bash_profile手工加入执行~/.bashrc的命令。
回复