使用xrandr命令设置Ubuntu系统分辨率
来源:互联网 发布:微信飞机大战源码 编辑:程序博客网 时间:2024/05/21 12:44
From time to time I see posts on various Linux forums asking how to set a screen resolution.
Often this results in a discussion about writing a configuration file, xorg.conf ( /etc/X11/xorg.conf )
While there is nothing wrong with writing a xorg.conf, xorg.conf is depreciated and writing an xorg.conf is intimidating to many users.
Using xrandr is potentially faster and easier.
How to use xrandr
First display a list of your monitor resolutions
xrandr -q
Note: If you do not see the resolution you desire listed, either your monitor does not support that particular resolution or you may need to install a driver (ati, intel, or nvidia are the big 3). The technical details of installing these drivers varies by graphics card and will not be covered in this blog.
Then set the resolution you want to use (change the “1400×1050″ to your desired resolution).
xrandr -s 1400x1050
Adjusting the dpi (dots per inch)
dpi refers to the resolution of your monitor (pixels per inch) and affects window decorations, window size, and font. See this page for additional information.
On many monitors xrandr will set the dpi automatically. When it does not, or if you prefer an alternate setting, you can try specifying a dpi manually.
xrandr --dpi 96 -s 1400x1050
If that fails, you can specify a dpi in ~/.Xdefaults
Open any editor and enter the following configuration:
Xft.dpi: 96
This dpi will then be applied to any new windows you open. Alternately you can log off and back on (no need to reboot).
If 96 is not the right size for your, try a smaller ( 72 ) or larger ( 135 ) value.
Dual monitors
To use xrandr to configure dual monitors, use the --right-of or --left-of options.
Example, using a nvidia card:
First list your monitors with xrandr, note the monitor names (in bold).
bodhi@zenix:~$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 4096 x 4096
DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 520mm x 320mm
1920×1200 60.0*+
1600×1200 60.0
1680×1050 60.0
1280×1024 75.0
1280×960 60.0
1152×864 75.0
1024×768 75.1 70.1 60.0
832×624 74.6
800×600 72.2 75.0 60.3 56.2
640×480 72.8 75.0 60.0
720×400 70.1
DVI-I-2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 520mm x 320mm
1920×1200 60.0*+
1600×1200 60.0
1680×1050 60.0
1280×1024 75.0
1280×960 60.0
1152×864 75.0
1024×768 75.1 70.1 60.0
832×624 74.6
800×600 72.2 75.0 60.3 56.2
640×480 72.8 75.0 60.0
720×400 70.1
TV-1 disconnected (normal left inverted right x axis y axis)
Use xrandr to configure the monitors. Change the names “DVI-I-1″ and “DVI-I-2″ to the names of your monitors. You may also need to adjust the resolution and change “--left-of to” “--right-of”
xrandr --auto --output DVI-I-2 --mode 1920x1200 --left-of DVI-I-1
Has the same effect as
xrandr --auto --output DVI-I-1 --mode 1920x1200 --right-of DVI-I-2
Set a primary display
To set a primary display, use the --primary option.
xrandr --auto --output DVI-I-1 --mode 1920x1200 --primary --right-of DVI-I-2
Configuring xrandr to run when you log in
The method to do this varies by desktop and with most major desktop environments (gnome, kde, xfce) you would add the xrandr command to your start up options / applications.
With openbox, add the xrandr command to ~/.config/openbox/autostart.sh.
With fluxbox, use ~/.fluxbox/startup
Alternately, depending on your window manager, you can add the xrandr command to ~/.xinit
For a link on using ~/.xinit, see this fluxbox wiki page or, as an alternate, the Arch wiki Slim page.
Graphical tools
I am aware of 3 5 (thanks to charlie-tca and KenP) graphical font ends for xranadr : lxrandr , grandr, the grandr applet, ARandR, and Krandr.
lxrandr is a part of the lxde and is lightweight and fast, but does not have all of the xrandr options available.
grandr has more a few more options, including rotation, but again not all the xrandr options are available from the graphical interface.
grandr applet is a small application (gnome applet) that would run in your panel and similar to lxrandr allows one to set a resolution.
Krandr is a KDE applet to set your resolution.
arandr is similar to grandr, but IMO the interface seems less intuitive. Arandr will write a script for you to set your resolution at login.
For additional information on using xrandr, see the xrandr man page.
- 使用xrandr命令设置Ubuntu系统分辨率
- 使用命令xrandr设置当前系统的显示分辨率及显示的旋转脚本
- ubuntu 14.04 分辨率调整 -- xrandr命令
- debian,Ubuntu 使用 xrandr 调整分辨率
- ubuntu xrandr修改分辨率
- xrandr设置分辨率
- [问题解决方案] ubuntu 14.04 分辨率调整 -- xrandr命令
- Linux下使用 xrandr 命令设置屏幕分辨率
- Linux下使用 xrandr 命令设置屏幕分辨率
- 使用xrandr和cvt命令添加自定义的分辨率模式
- Ubuntu系统设置分辨率
- ubuntu 使用xrandr 双屏显示
- ubuntu 16.04安装后只有一个分辨率,无法用xrandr命令也无法修改xorg.conf(已解决)
- Ubuntu: Linux下查看本机显示器分辨率(xrandr)
- xrandr命令解决ubuntu15.10双屏分辨率问题
- linux实用技巧:获取当前系统显示分辨率"xrandr --current"
- xrandr命令
- xrandr命令
- 在PHP中利用wsdl创建标准webservice的实现代码
- 一道IGT的关于RGB的笔试题
- Ubuntu下deb包的安装方法
- Linux下软件安装方法汇总
- 黑马程序员_java基础(2) 流程控制语句&函数与数组
- 使用xrandr命令设置Ubuntu系统分辨率
- Hello World.
- 解决Firefox is already running问题
- Hbase Rpc只是个链接地址哦
- 一个注射点,一个webshell甚至系统权限
- 一个系统中同时使用VC6.0+OpenCV1.0和VS2005+OpenCV2.0的方法
- Objective-c中的委托 .
- Raspberry Pi 外壳DIY(图解)
- oc中单例设计模式的实现