当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 10 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 指南 - 在Hoary中设置你的窗口,让它更加漂亮
帖子发表于 : 2005-04-12 22:38 
头像

注册: 2005-03-26 9:38
帖子: 521
送出感谢: 0 次
接收感谢: 0 次
(NOTE: THIS ONLY WORKS IN HOARY, DOES NOT WORK IN WARTY. Also, since I use an nvidia card, I'm not sure how well this will work in ATI. I've put in some ATI instructions that I've read but I'm not 100% sure if they'd work.)

I've spent the last day and a half trying to get compositing working in ubuntu. This is actually an amalgamation of a bunch of guides I've found; I shouldn't be given full credit for this.

The first thing you need to do is install xcompmgr and transset. These are found in the hoary universe repositories, if you havent already done so, enable the universe repo in your /etc/apt/sources.list. Its not very hard to do this, search the forums for how to do it

Code:
代码:
sudo apt-get install xcompmgr transset



xcompmgr is the composite manager (the program/extension that makes things look pretty) and transset sets windows transparencies.

Now, the next thing you have to do is actually enable compositing. This is done via a simple edit of your /etc/X11/xorg.conf

Code:
代码:
sudo gedit /etc/X11/xorg.conf



Add the following section after the "module" section:

Code:
代码:
Section "Extensions" Option "Composite" "Enable" EndSection



This tells xorg to enable compositing. Now, just so you know, unless you have a good video card, compositing most likely slow down xorg. Apparantly nvidia cards fare better than ati cards, since you can enable acceleration (which we'll do later) which'll actually make x use your video card for rendering.

As I said earlier, if you have an nvidia card it'll run better. I'm assuming you've already installed the nvidia binary drivers and such, if you haven't then do so. Add the following lines to the "device" section:

Code:
代码:
Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true"



"RenderAccel" is actually an option you should already have if you're running an nvidia card, but I've included it incase you haven't put it in yet. I'm pretty sure this only works on nvidia cards; can someone tell me if there's an equivelant for ati?

"AllowGLXWithComposite" is a command that allows you to use OpenGL while compositing is running. Apparantly it can be buggy, though, so if you have problems you might want to disable compositing in your xorg.conf whenever you want to use opengl (just comment out the compositing option with #)

Now, if you have an ati card, add these lines instead:

Code:
代码:
Option "backingstore" "true" Option "AllowGLXWithComposite" "true"



According to a cached google page, backingstore is "used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed."

(Since I don't own an ati card, I apologize if any of my facts are incorrect. If someone with an ati card can correct me, I'll make sure to update this.)

OK, now for the really fun part. We're going to actually set it so compositing is enabled when you start GNOME. Go to system -> preference -> sessions. Go to startup programs, and click "add."

Now, before I continue, I'm going to explain a few of xcompmgr's options:

-c : enable shadows
-s : enable simple shadows
-fF : enable fadeins/fadeouts

You can mix-and-match those commands. For example, if you want just shadows, use xcompmgr -c. If you want simple shadows, use xcompmgr -s. If you want to enable shadows and fadeins, use xcompmgr -cfF. I wouldn't recommend using -cs; that'll probably break the program.

So, where it asks you for the command, enter xcompmgr and then the argument. For example, if you'd like to enable shadows and fadeins/fadeouts, you'd enter:

Code:
代码:
xcompmgr -cfF



Finally, in the order, change it to 0. This'll make sure it's the first thing that GNOME runs. Apparantly things run much better this way.

Alright! Now you can restart X (ctrl+alt+backspace), log back in, and you should have compositing running!

Using Transset

This is just an extra little command. If you want to set certain windows as transparent, then run the command "transset" in the console. Your mouse will turn into a crosshair; simply click on the window you want to set as transparent. The transparency value can be anywhere from 0 (completely transparent) to 1 (opaque.) It defaults to .75, and back to 1 if the window is already transparent.

For example, if you want to make a window half-transparent:

Code:
代码:
transset 0.5

[/code]


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2005-04-13 20:52 

注册: 2005-04-13 13:18
帖子: 4
送出感谢: 0 次
接收感谢: 0 次
(NOTE: THIS ONLY WORKS IN HOARY, DOES NOT WORK IN WARTY. Also, since I use an nvidia card, I'm not sure how well this will work in ATI. I've put in some ATI instructions that I've read but I'm not 100% sure if they'd work.)
(注意:这只能在HORTY上实现,不能在WARTY上实现。并且,由于我使用nvidia显卡,我不确定是否可以在ATI显卡下工作。我加入了一些我能理解的ATI的指令,但我还是不能100%确信他们在工作。)

I've spent the last day and a half trying to get compositing working in ubuntu. This is actually an amalgamation of a bunch of guides I've found; I shouldn't be given full credit for this.
我用尽了所有的力量使他能够在ubuntu下运行。这是由我发现的一些指南合并而成的;我已经不能给出这个文档的名单。

The first thing you need to do is install xcompmgr and transset. These are found in the hoary universe repositories, if you havent already done so, enable the universe repo in your /etc/apt/sources.list. Its not very hard to do this, search the forums for how to do it
你首先要做的第一件事是安装xcompmgr和transset。他们在hoary的universe仓库下,如果你还没有做,在你的/etc/apt/sources.list下添加universe。这不是很难的,论坛可以得到答案。
代码:
代码:
sudo apt-get install xcompmgr transset



xcompmgr is the composite manager (the program/extension that makes things look pretty) and transset sets windows transparencies.
xcompmgr是混合管理器(这个程序/扩展使得界面看更漂亮)而transset可以设置窗口透明。

Now, the next thing you have to do is actually enable compositing. This is done via a simple edit of your /etc/X11/xorg.conf
现在,你要做的就是设置允许混合,这只要简单的编辑你的/etc/X11/xorg.conf

代码:
代码:
sudo gedit /etc/X11/xorg.conf



Add the following section after the "module" section:
在"module"章节后添加下列章节

代码:
代码:
Section "Extensions" Option "Composite" "Enable" EndSection



This tells xorg to enable compositing. Now, just so you know, unless you have a good video card, compositing most likely slow down xorg. Apparantly nvidia cards fare better than ati cards, since you can enable acceleration (which we'll do later) which'll actually make x use your video card for rendering.
这是告诉xorg允许混合。现在你要知道混合大多数情况下可能会减慢xorg,除非你有一个好的显卡。装备nvidia显卡要比ati显卡感觉要好,因为你可以设置加速(后面就要设置)这可以使得X使用显卡来渲染。

As I said earlier, if you have an nvidia card it'll run better. I'm assuming you've already installed the nvidia binary drivers and such, if you haven't then do so. Add the following lines to the "device" section:
象我以前所说,如果你有一块nvidia显卡它就能更好的工作。我姑且认为你已经装好了niadia的驱动,如果你还没做,就跟着做下面的。在"device"章节后添加下列几行:

代码:
代码:
Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true"



"RenderAccel" is actually an option you should already have if you're running an nvidia card, but I've included it incase you haven't put it in yet. I'm pretty sure this only works on nvidia cards; can someone tell me if there's an equivelant for ati?
"RenderAccel"如果你使用nvidia显卡早就应该加上这个选项,我加了这个是因为你可能还没有加上它。我非常确信这只能在nvidia下工作;有人能告诉我ati和等价语句吗?

"AllowGLXWithComposite" is a command that allows you to use OpenGL while compositing is running. Apparantly it can be buggy, though, so if you have problems you might want to disable compositing in your xorg.conf whenever you want to use opengl (just comment out the compositing option with #)
"AllowGLXWithComposite"是一个命令允许你在打开混合时使用OpenGL。使用它可能会出现BUG,所以当使用OpenGL出现问题时你应该使得混合选项失效(只须在option前加一个#号)

Now, if you have an ati card, add these lines instead:
当你用的是ati显卡时,用下列语句代替:

代码:
代码:
Option "backingstore" "true" Option "AllowGLXWithComposite" "true"



According to a cached google page, backingstore is "used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed."
根据google搜索页面,backingstore是“用于允许服务器支持后台存储,通过它当象素数据需要重新显示时,被遮挡的窗口层的象素数据就记录在服务器上,从而减轻了传送前台数据给X客户端的需求。

(Since I don't own an ati card, I apologize if any of my facts are incorrect. If someone with an ati card can correct me, I'll make sure to update this.)
{由于我没有ati显卡,如果我所说的不正确我只能说对不起。如果有人能纠正我的做法,我保证我会更新这些。)

OK, now for the really fun part. We're going to actually set it so compositing is enabled when you start GNOME. Go to system -> preference -> sessions. Go to startup programs, and click "add."
OK,真正有趣的部分开始了。我们来让GNOME启动时激活混合功能。依次点击 系统-> 首选项->会话。点击启动程序选项,再点击"添加"

Now, before I continue, I'm going to explain a few of xcompmgr's options:
在继续之前,先解释一些xcompmgr的参数:

-c : enable shadows
-s : enable simple shadows
-fF : enable fadeins/fadeouts

-c : 允许阴影
-s : 允许简单阴影
-fF : 允许渐入/渐出

You can mix-and-match those commands. For example, if you want just shadows, use xcompmgr -c. If you want simple shadows, use xcompmgr -s. If you want to enable shadows and fadeins, use xcompmgr -cfF. I wouldn't recommend using -cs; that'll probably break the program.
你可以 混合这些选项。例子,如果你只需要阴影就使用xcompmgr -c。如果你要简单阴影使用xcompmgr -s。如果你要阴影和渐入使用xcompmgr -cfF。我不推荐使用-cs,这可能会中断程序使用。

So, where it asks you for the command, enter xcompmgr and then the argument. For example, if you'd like to enable shadows and fadeins/fadeouts, you'd enter:
所以在启动命令输入框里输入xcompmgr再跟上参数。例子如果你喜欢加上阴影和渐入渐出,你可以输入:

代码:
代码:
xcompmgr -cfF



Finally, in the order, change it to 0. This'll make sure it's the first thing that GNOME runs. Apparantly things run much better this way.
最后,在顺序里改为0。这可以使得在运行GNOME时首先就运行它。这个方法可以使它工作的更好。

Alright! Now you can restart X (ctrl+alt+backspace), log back in, and you should have compositing running!
好了!现在你可以重启X(按ctrl+alt+backspace),重新登录,你的混合功能已经在运行了!

Using Transset
使用透明

This is just an extra little command. If you want to set certain windows as transparent, then run the command "transset" in the console. Your mouse will turn into a crosshair; simply click on the window you want to set as transparent. The transparency value can be anywhere from 0 (completely transparent) to 1 (opaque.) It defaults to .75, and back to 1 if the window is already transparent.
这只是一个特别的小命令。如果你想使一定的窗口透明,在终端里运行命令"transset"。你的鼠标指针会变成一个“十”字,单击你想透明的窗口。透明度的值可以从0(完全透明)到1(不透明),它的缺省值是.75,如果窗口已经透明则会回到1。

For example, if you want to make a window half-transparent:
例子,如果你想使窗口半透明:

代码:
代码:
transset 0.5


-----------------------
不知道compositing用什么词好,就直接翻成了混合 :oops:


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2005-04-13 21:01 
头像

注册: 2005-04-10 16:54
帖子: 2625
地址: 温州大学
送出感谢: 0 次
接收感谢: 1
兄弟辛苦了!


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2005-04-13 21:59 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
http://www.ubuntu.org.cn/docs/folder.20 ... ument_view


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2005-07-30 20:42 

注册: 2005-07-28 15:08
帖子: 265
送出感谢: 0 次
接收感谢: 0 次
用脚本应该怎么做呢?

我试着做,可以sed不太会用


_________________
无声胜有声


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2005-12-15 22:08 
头像

注册: 2005-10-10 22:50
帖子: 38
送出感谢: 0 次
接收感谢: 0 次
我按照上面说的做了,结果重启gnome后就进不去了。
把/etc/X11/xorg.conf改过来后还是不能进入gnome。输入用户和密码后就是一片黄色,能听到启动时的声音就是一直是什么东西都看不到。
之前我按照所说的在系统-> 首选项->会话的启动程序选项里面加了xcompmgr -cfF也是把它的顺序设为0,我现在想在shell下把它取消,应该用什么命令呢?还是有其他的解决办法?谢谢:)


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2005-12-16 15:20 
头像

注册: 2005-05-15 3:09
帖子: 427
送出感谢: 0 次
接收感谢: 0 次
偶也不行,最后还是把home/.gnome2/session-manual删除了才能进入gnome。还有,用在论坛上搜索叶兄的xorg.conf的设置方法就更不行,连在covery下的X也进入不了,最后还是得把xorg.conf删除了才行。


_________________
琴声如我


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2005-12-16 18:55 
头像

注册: 2005-05-15 3:09
帖子: 427
送出感谢: 0 次
接收感谢: 0 次
哗,我用这个方法OK了!只是成设置xcompmgr -cfF 时,不要设为0,就设为50,让GNOME先进来再启用这个xcompmgr 就可以顺利进入GNOME了。


_________________
琴声如我


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2006-07-29 19:00 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
似乎过时了,先放着。


_________________
https://weakish.github.io


页首
 用户资料  
 
10 楼 
 文章标题 :
帖子发表于 : 2006-07-31 0:02 
头像

注册: 2005-08-14 19:53
帖子: 3998
送出感谢: 1
接收感谢: 2
引用:
As I said earlier, if you have an nvidia card it'll run better. I'm assuming you've already installed the nvidia binary drivers and such, if you haven't then do so. Add the following lines to the "device" section:
象我以前所说,如果你有一块nvidia显卡它就能更好的工作。我姑且认为你已经装好了niadia的驱动,如果你还没做,就跟着做下面的。在"device"章节后添加下列几行:

代码:
代码:

Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true"



这里似乎翻译有误‘

Add the following lines to the "device" section:

应该是在"device" section中添加而非在之后添加

应该有别与
引用:
Add the following section after the "module" section:
在"module"章节后添加下列章节



不过谢谢翻译了 嘿嘿 正在搞这东西


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 10 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译