VirtualBox虚拟机在CentOS中的多屏显示设置步骤
sudo yum install -y kernel-devel kernel-headers gcc make perl bzip2 dkms # 安装依赖
sudo mount /dev/cdrom /mnt # 挂载镜像(若自动挂载失败)
cd /mnt
sudo ./VBoxLinuxAdditions.run # 安装增强功能
sudo reboot # 重启虚拟机使功能生效
xrandr命令,输出会显示所有连接的显示器(如HDMI-1、VGA-1、LVDS-1)及支持的分辨率。HDMI-1)放在主显示器(如LVDS-1)右侧,命令:xrandr --output HDMI-1 --auto --right-of LVDS-1
xrandr --output HDMI-1 --same-as LVDS-1 --auto
xrandr --output HDMI-1 --off
HDMI-1设置为1920x1080分辨率,命令:xrandr --output HDMI-1 --mode 1920x1080 --auto
~/.bash_profile或创建/etc/X11/xorg.conf.d/10-monitor.conf文件(需根据显卡类型调整)。xrandr命令查看支持的分辨率,调整对应显示器的--mode参数;