仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 459|回复: 7
打印 上一主题 下一主题

[CentOS(社区)] 带来一篇CentOS“屏幕挑选”功效(display)

[复制链接]
海妖 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-14 20:15:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
欢迎大家来到仓酷云论坛!在条记本上装了个CentOS6.5,平常条记本都外接一个显现器,这回体系装好了以后,鼠标乱晃了一小会一直找不到“屏幕选择”功效(display),一怒之下就有了上面这段代码.
[size=1em][size=1em][root@localhost~]#vimload_xrandr.py



<divstyle="padding:0px;margin:0px;color:rgb(80,80,80);font-family:宋体,ArialNarrow,arial,serif;font-size:14px;line-height:28px;"><divclass="syntaxhighlighterpython"id="highlighter_122909"style="width:720px;padding:0px!important;margin:0.3em0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow-y:visible!important;overflow-x:auto!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;box-sizing:content-box!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;"><divclass="container"style="padding:0px!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background:none!important;">[size=1em]#-.-coding:utf-8-.-
[size=1em]__author__=root
[size=1em]
[size=1em]importos
[size=1em]
[size=1em]#列出显现器及分辩率
[size=1em]getScreens=os.popen("""
[size=1em]vgas=$(xrandr|grep"connected");
[size=1em]
[size=1em][$(echo"$vgas"|wc-l)-gt1]&&{
[size=1em]foriin$(echo"$vgas"|awk{print$1});
[size=1em]do
[size=1em]echo$i
[size=1em]xrandr|grep"$iconnected"-A1|awk-F"x"{print$1}|tail-n1|sed"s///g"
[size=1em]done
[size=1em]}""").readlines()
[size=1em]
[size=1em]#处置换行标记
[size=1em]foriinrange(len(getScreens)):getScreens=getScreens.replace("
","")
[size=1em]
[size=1em]#比对出分辩率较年夜的显现器
[size=1em]ifint(getScreens[1])<int(getScreens[3]):
[size=1em]bigger=getScreens[2]
<divclass="linenumber24index23alt1"style="white-space:nowrap;padding:0px1em!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:static!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;">
小女巫 该用户已被删除
沙发
发表于 2015-1-15 09:47:40 | 只看该作者

带来一篇CentOS“屏幕挑选”功能(display)

1v1飘过
飘飘悠悠 该用户已被删除
板凳
发表于 2015-1-25 19:31:59 | 只看该作者
永中office 2004增强版安装只需要默认安装即可使用并操作大多与win系统雷同,打印机的配置和管理,记录光盘等。
地板
发表于 2015-2-4 07:20:14 | 只看该作者
目前全球有超过一百多个Linux发行版本,在国内也能找到十几个常见版本。如何选择请根据你的需求和能力,RedhatLinux和DebianLinux是网络管理员的理想选择。
精灵巫婆 该用户已被删除
5#
发表于 2015-2-27 22:32:21 | 只看该作者
熟悉并掌握安装Linux,安装是学习的前提。目前较常见的安装方法有二种:
金色的骷髅 该用户已被删除
6#
发表于 2015-3-9 21:39:28 | 只看该作者
我学习Linux的心得体会 ,希望对大家的学习有所帮助,由于水平有限,本文难免有所欠缺,望请指正。
再见西城 该用户已被删除
7#
发表于 2015-3-17 06:12:34 | 只看该作者
和私有操作系统不同,各个Linux的发行版本的技术支持时间都较短,这对于Linux初学者是往往不够的。
灵魂腐蚀 该用户已被删除
8#
发表于 2015-3-24 01:58:22 | 只看该作者
Linux?最大的优点在于其作为服务器的强大功能,同时支持多种应用程序及开发工具,所以Linux操作系统有着广泛的应用空间。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-9-27 20:44

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表