改动了/etc/profile后无法正常启动X窗口

sportboys 2004-07-16 11:51:14
为了使用Eclipse,我先安装了JSDK1.4.2_05
然后用cat >>/etc/profile写入了一些环境变量的设置
由于错误,我重复写了好几次
最后我用gedit直接打开那个profile文件,发现多了不少重复的东西(我不是写了好几次么)
然后我就直接删掉了那些重复的内容。
为了使环境变量生效,我重启了一下电脑,结果问题来了,无法正常启动X窗口了,它提示内容如下:
your session only lasted less then 10 seconds.If you have not logged out yourself,this could mean that there is some installation problem or that you may be out of diskspace.Try logging in with one of the failsafe sessions to see if you can fix this problem.

然后我尝试从命令行login
结果提示我有很多mail
id not found
……java/bin is a directory
……java/lib/tools.jar permisson denied

请问各位大侠怎么解决这个问题
...全文
146 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jeremyhit 2004-07-21
  • 打赏
  • 举报
回复
sorry
看错了,还以为你改动的是.bash_profile
不好意思
jeremyhit 2004-07-21
  • 打赏
  • 举报
回复
这个问题我也碰到过
你可以先从其他账号下拷贝一个干净的profile到自己的账号下就可以了
如果没有也可以自己写:

普通用户
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME

root用户:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME BASH_ENV PATH

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧