【Tools】linux更改分辨率,解決虛擬機安裝后太小的問題


Linux更改屏幕分辨率

 

1,分辨率模式已存在

1)如何查詢是否存在:

終端輸入命令:xrandr,即會輸出當前已存在的分辨率模式。

2)如何配置:

使用命令xrandr --output 顯示器名稱 --mode 模式名稱

如:

xrandr --output Virtual1 --mode "1440x900"

 


2,分辨率模式不存在

總體操作流程如下:

1)使用ctv或gtf命令計算mode line參數;

2)使用xrandr --newmode 新建一個模式;

3)使用xrandr --add添加一個模式到指定的顯示器;

4)使用xrandr -s 設置指定顯示器的分辨率;

5)持久化模式與設置,即設置參數重啟后有效。


 

 

 

永久更改:

sudo vi /etc/X11/xorg.conf    //打開(或新建)xorg.conf文件,初始系統沒有該文件,創建即可。

打開后,在文件中添加以下內容:

 1 Section "Monitor"
 2     Identifier "Configured Monitor"
 3     Modeline "1600x900_60.00"  119.00  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync    #來自命令gtf的輸出
 4     Option "PreferredMode" "1600x900_60.00"    #模式名為"1600x900_60.00"
 5 EndSection
 6 
 7 
 8 Section "Screen"
 9     Identifier "Default Screen"
10     Monitor "Configured Monitor"
11     Device "Configured Video Device"
12 EndSection
13 
14 
15 Section "Device"
16     Identifier "Configured Video Device"
17 EndSection
xorg.conf

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM