nvidia Ubuntu下无法检测第二个显示器的问题
nvidia multi-monitor configure under Ubuntu
原来第二个显示器可以检测出来,后来拿走后就只能检测出来640×480了,经过复杂的过程发现需要在device段加入:
Option “UseDisplayDevice” “DFP”
QUMI投影也可用了。
![]()
:
nvidia multi-monitor configure under Ubuntu
原来第二个显示器可以检测出来,后来拿走后就只能检测出来640×480了,经过复杂的过程发现需要在device段加入:
Option “UseDisplayDevice” “DFP”
QUMI投影也可用了。
![]()
:
这台老旧的服务器闲置了两个月了吧。上次安装完之后就一直扔在旧货厢上。因为公司的机柜似乎不是全尺寸的,位置似乎也不足以安装这台声音巨大的发动机。上周末的时候准备迁移一下,发现可悲的问题是密码忘记了。懒得rescue了,重装。结果最后发现了下面的错误:
“The ‘grub-pc’ package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.”
为了确认不是问题,先后做了以下测试:
1. 重新生成Startup disk安装->failed
2. 刻光盘安装->failed
结果发现这个问题似乎真实存在。问题的出现可能是因为使用了LVM。暂且不管了。通过Google发现还是需要rescue一下:
1. 安装光盘用Rescue方式启动
2. 进入shell,执行sudo apt-get install grub2,选择安装/dev/sda(启动盘)即可。同时选择了LVM里的/root分区,安装失败。
参考:
1. Debian User forum – “grub-pc”
2.
又:那天@dlqingxi兄说道CloudStack,找时间留意一下。
ShowOff是什么?showoff是一个用Sinatra开发的基于配置的简报系统。类似于Keynote。详细内容看它的主站吧:https://github.com/schacon/showoff
1.
sudo apt-get install libxml2-dev libxslt-dev Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libxslt1-dev' instead of 'libxslt-dev' The following NEW packages will be installed: libxml2-dev libxslt1-dev 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 1,412 kB of archives. After this operation, 5,583 kB of additional disk space will be used. Get:1 http://cn.archive.ubuntu.com/ubuntu/ natty-updates/main libxml2-dev amd64 2.7.8.dfsg-2ubuntu0.1 [835 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu/ natty/main libxslt1-dev amd64 1.1.26-6build1 [577 kB] Fetched 1,412 kB in 4s (299 kB/s) Selecting previously deselected package libxml2-dev. (Reading database ... 249315 files and directories currently installed.) Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-2ubuntu0.1_amd64.deb) ... Selecting previously deselected package libxslt1-dev. Unpacking libxslt1-dev (from .../libxslt1-dev_1.1.26-6build1_amd64.deb) ... Processing triggers for man-db ... Processing triggers for doc-base ... Processing 1 added doc-base file(s)... Registering documents with scrollkeeper... Setting up libxml2-dev (2.7.8.dfsg-2ubuntu0.1) ... Setting up libxslt1-dev (1.1.26-6build1) ...
2.
sudo gem install showoff Building native extensions. This could take a while... Building native extensions. This could take a while... Building native extensions. This could take a while... Successfully installed rack-1.3.2 Successfully installed tilt-1.3.2 Successfully installed sinatra-1.2.6 Successfully installed bluecloth-2.1.0 Successfully installed nokogiri-1.5.0 Successfully installed json-1.5.3 Successfully installed gli-1.3.2 Successfully installed showoff-0.4.2 8 gems installed Installing ri documentation for rack-1.3.2... Installing ri documentation for tilt-1.3.2... Installing ri documentation for sinatra-1.2.6... Installing ri documentation for bluecloth-2.1.0... Installing ri documentation for nokogiri-1.5.0... No definition for get_options No definition for set_options No definition for parse_memory No definition for parse_file No definition for parse_with Installing ri documentation for json-1.5.3... Installing ri documentation for gli-1.3.2... Installing ri documentation for showoff-0.4.2... Installing RDoc documentation for rack-1.3.2... Installing RDoc documentation for tilt-1.3.2... Installing RDoc documentation for sinatra-1.2.6... Installing RDoc documentation for bluecloth-2.1.0... Installing RDoc documentation for nokogiri-1.5.0... No definition for get_options No definition for set_options No definition for parse_memory No definition for parse_file No definition for parse_with Installing RDoc documentation for json-1.5.3... Installing RDoc documentation for gli-1.3.2... Installing RDoc documentation for showoff-0.4.2...
3. 安装后缺省目录/var/lib/gems/1.8/bin
4. 创建(信赖RMagick,需安装libmagickwand-dev,再sudo gem install rmagick pdfkit)
/var/lib/gems/1.8/bin/showoff create presentname
5. 创建后进入presentname目录
/var/lib/gems/1.8/bin/showoff serve image sizing disabled - install rmagick pdf generation disabled - install pdfkit == Sinatra/1.2.6 has taken the stage on 9090 for development with backup from WEBrick [2011-08-17 04:39:17] INFO WEBrick 1.3.1 [2011-08-17 04:39:17] INFO ruby 1.8.7 (2010-08-16) [x86_64-linux] [2011-08-17 04:39:24] INFO WEBrick::HTTPServer#start: pid=13746 port=9090
参考文章:
1. Subjects covered include Ruby, ERROR, Libxml, Nokogiri, and Iconv.
相关文件要复制到指定目录
/usr/share/redmine/vendor/plugins/redmine_code_review$ sudo cp -R assets/ /var/www/pm/plugin_assets/redmine_code_review/
在系统管理里设置角色和权限中相关角色的权限。
翻译的内容需要放到
/usr/share/redmine/config/locales/zh.yml 文件中。在研究是否可以放到独立文件中。
1. 典型模板
模板demo1.mustache
Hello {{name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{taxed_value}}, after taxes.
{{/in_ca}}
数据demo1.yml
--- "name": "Chris" "value": 10000 "taxed_value": 10000 - (10000 * 0.4) "in_ca": true ---
命令
/var/lib/gems/1.8/bin/mustache demo1.yml demo1.mustache
输出
Hello Chris You have just won $10000! Well, $10000-(10000*0.4), after taxes.
注意yml中的格式,:后面有空格
2. 转义和非转义
模板demo2.mustache
* {{name}}
* {{age}}
* {{company}}
* {{{company}}}
数据demo2.yml
--- "name": "Chris" "company": "<b>GitHub</b>" ---
命令:
/var/lib/gems/1.8/bin/mustache demo2.yml demo2.mustache
输出:
* Chris * * <b>GitHub</b> * <b>GitHub</b>
3.小节
模板demo3.mustache
Shown.
{{#nothin}}
Never shown!
{{/nothin}}
数据demo3.yml
--- "person": true ---
命令,还可以用下面方式:
cat demo3.yml demo3.mustache | /var/lib/gems/1.8/bin/mustache
输出:
Shown.
4. 非空列表
模板demo4.mustache
{{#repo}}
<b>{{name}}</b>
{{/repo}}
数据
--- "repo": - "name": "resque" - "name": "hub" - "name": "rip" ---
命令
/var/lib/gems/1.8/bin/mustache demo4.yml demo4.mustache
输出
<b>resque</b> <b>hub</b> <b>rip</b>
5. 匿名函数
模板demo5.mustache
{{#wrapped}}
{{name}} is awesome.
{{/wrapped}}
数据demo5.yml
---
"name": "Willy"
"wrapped": function() {
return function(text) {
return "<b>" + render(text) + "</b>"
}
}
---
命令
/var/lib/gems/1.8/bin/mustache demo5.yml demo5.mustache
输出
Willy is awesome.
6. 非否定值
模板demo6.mustache
{{#person?}}
Hi {{name}}!
{{/person?}}
数据 demo6.yml
--- "person?": - "name": "Jon" ---
命令
/var/lib/gems/1.8/bin/mustache demo6.yml demo6.mustache
输出
Hi Jon!
7. 反转小节
模板demo7.mustache
{{#repo}}
<b>{{name}}</b>
{{/repo}}
{{^repo}}
No repos
{{/repo}}
数据demo7.yml
--- "repo": [] ---
命令
/var/lib/gems/1.8/bin/mustache demo7.yml demo7.mustache
输出
No repos![]()
8. 注释
模板demo8.mustache
<h1>Today{{! ignore me }}.</h1>
命令
/var/lib/gems/1.8/bin/mustache demo8.mustache
输出
<h1>Today.</h1>
上面模板就是写成下面这样也是相同的输出:
<h1>Today{{! ignore me
This is a comment test!!!
Test row!!!!
}}.</h1>
9. 局部模板
模板base.mustache
<h2>Names</h2>
{{#repo}}
{{> user}}
{{/repo}}
局部模板user.mustache
<strong>{{name}}</strong>
数据用demo4.yml
命令
/var/lib/gems/1.8/bin/mustache demo4.yml base.mustache
输出
<h2>Names</h2> <strong>resque</strong> <strong>hub</strong> <strong>rip</strong>
10. 设置分隔符
模板setdelimiter.mustache
* {{default_tags}}
{{=<% %>=}}
{{name}}
<%name%>
* <% erb_style_tags %>
<%={{ }}=%>
<%name%>
{{name}}
* {{ default_tags_again }}
命令
/var/lib/gems/1.8/bin/mustache setdelimiter.mustache
输出
*
{{name}}
*
<%name%>
*
11.
在没有确认之前,很难想到一个故障的导致不是因为操作系统安装问题,不是因为PC硬件问题,而只是一根VGA线。
今天来了新人,准备的PC还是老样子。兼容机,内存8G,独立显卡,全高清显示器。拟安装Ubuntu 11.04系统,因为单位的路由是海蜘蛛的免费版本,偶尔的广告让apt-get update时获取的信息有问题,经常更新失败,所以继续让它跑Ubuntu 11.10。
安装很顺利,出现的问题也很简单。显示卡可以驱动上,但是显示器一直检测不出来,分辨率只能上到1024*768。。。
以为是显卡问题,本来想换。后来有人提议换个DVI线是否可以,结果换上后就好了。把那条线换给原来用DVI线的,发现问题是一样的。居然还有线的问题。。。好在作为IT公司,大把的VGA线在备用库里。