我的笔记本电脑支持 1366x768 分辨率,但即使安装了新增嘉宾在我的lubuntu-11.10-替代-i386虚拟机我仅具有以下可用分辨率(来自xrandr
):
1024x768 60.0 + 60.0
1600x1200 60.0
1440x1050 60.0
1280x960 60.0
800x600 60.0*
640x480 60.0
答案1
请在此处查看我的帖子:
#!/bin/bash
# Script to automatically resize virtual monitors in VirtualBox
# Start the server
sudo killall VBoxService
sleep 1
sudo VBoxService
sleep 1
# Start the client service
VBoxClient-all
# Get the modeline information we want for the following resolutions:
# [email protected] (Laptop display)
RES0="1680 1050 60"
# 1280x1024@60Hz (External monitor)
RES1="1280 1024 60"
# Setup mappings for physical to virtual monitors
MAP0="VBOX0"
MAP1="VBOX1"
# Generate settings
SETTINGS0=$( gtf $RES0 | grep Modeline | cut -d ' ' -f4-16 )
SETTINGS1=$( gtf $RES1 | grep Modeline | cut -d ' ' -f4-16 )
# Get name of modelines from settings
NAME0=$( echo $SETTINGS0 | cut -d ' ' -f1 )
NAME1=$( echo $SETTINGS1 | cut -d ' ' -f1 )
# Echo settings
echo "Modeline for Display 0 ($NAME0): $SETTINGS0"
echo "Modeline for Display 1 ($NAME1): $SETTINGS1"
# Create the new modelines via xrandr
xrandr --newmode $SETTINGS0
xrandr --newmode $SETTINGS1
# Add the newly created modelines to devices
xrandr --addmode $MAP0 $NAME0
xrandr --addmode $MAP1 $NAME1
# Finally, enable the new modes
xrandr --output $MAP0 --mode $NAME0
xrandr --output $MAP1 --mode $NAME1
# Extra: Attempt to run "auto" mode on the external monitor
# This is out last-ditch effort (which worked in this case) to get it running at
# 1600x1200 instead of 1280x1024 :)
xrandr --output $MAP1 --auto --above $MAP0
然后,您只需将其放入 rc 文件 (kderc、gtkrc-2.0、fvwm2rc) 中即可运行,然后重新启动桌面管理器。一切都应该看起来很棒!
请注意,这里唯一额外的代码是参数--above $MAP0
,这意味着 MAP0 的监视器物理位于 MAP0 上方。