QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 747|回复: 1

急,进入不了xwindow,请高手帮忙看看!

[复制链接]
发表于 2005-10-9 10:11:47 | 显示全部楼层 |阅读模式
昨天不小心修改了/ect/bashrc和/ect/profile后,启动时进入不了xwindow
请各位高手帮忙看看是什么原因!!!非常感谢!!
/ect/bashrc内容如下:

# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.

if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
       umask 002
else
       umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
   case $TERM in
       xterm*)
           PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
           ;;
       *)
           ;;
   esac   
   [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
        
   if [ -z "$loginsh" ]; then # We're not a login shell
       for i in /etc/profile.d/*.sh; do
           if [ -x $i ]; then
               . $i
           fi
       done
   fi
fi   

unset loginsh


/ect/profile内容如下:# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.

if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
       umask 002
else
       umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
   case $TERM in
       xterm*)
           PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
           ;;
       *)
           ;;
   esac   
   [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
        
   if [ -z "$loginsh" ]; then # We're not a login shell
       for i in /etc/profile.d/*.sh; do
           if [ -x $i ]; then
               . $i
           fi
       done
   fi
fi   

unset loginsh
   
~   
~   
~   
~
~
[root@325 etc]# vi profile
[ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1

if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
   PATH="$PATH:/usr/X11R6/bin"
fi

if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
   export PATH=$PATH:/usr/games
fi

umask 022

USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HISTCONTROL=ignoredups
HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
   INPUTRC=/etc/inputrc
fi

# some old programs still use it (eg: "man"), and it is also
# required for level1 compliance for LI18NUX2000
NLSPATH=/usr/share/locale/%l/%N

export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
export HISTCONTROL HISTSIZE

for i in /etc/profile.d/*.sh ; do
       if [ -x $i ]; then
               . $i
       fi
done

unset i

export JAVA_HOME=/usr/java/jdk1.5.0_04
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/dt.jar:.:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
发表于 2005-10-9 11:20:08 | 显示全部楼层
JAVA_HOME=/usr/share/jdk1.5.0_04
PATH=$JAVA_HOME:$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH JAVA_HOME CLASSPATH
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-17 06:56 , Processed in 0.033648 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表