在安装centos的时候无法使用图形界面,只好使用linux text进行了安装 安装好之后startx还是花屏,由于VPC不支持Linux的24色,只用16色,而Linux默认的是24色。因此需要手动修改"/etc/X11/xorg.conf"文件。
将
将
- Section "Screen"
- Identifier "Screen0"
- Device "Videocard0"
- DefaultDepth 24
- SubSection "Display"
- Viewport 0 0
- Depth 24
- EndSubSection
- EndSection
修改为:
- Section "Screen"
- Identifier "Screen0"
- Device "Videocard0"
- DefaultDepth 16
- SubSection "Display"
- Viewport 0 0
- Depth 16
- EndSubSection
- EndSection
这时重启后 startx即可进入图形界面,但是进去后发现鼠标无法使用。
这个不是vpc本身的问题,而是linux内核的一个bug。这个需要通过修改"/boot/grub/grub.conf"来完成,Cent OS中默认安装的grub.conf内容为:
title CentOS (2.6.18-194.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-194.el5.img
修改为:
title CentOS (2.6.18-194.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet i8042.noloop
initrd /initrd-2.6.18-194.el5.img
这样保存后重启,进入系统后,鼠标移动至vpc的屏幕上,按空格右边的alt键就可以在虚拟机和xp之间进行切换了
文章评论