Drop shadows
发表于 : 2006-11-07 1:35
If you are using DapperDrake you should probably look at CompositeManager
如果你使用DapperDrake你可能要参考Composite Manager
What drop shadows are and why you might want them
什么是drop shadows和为什么你会需要它们
Drop shadows are shadows drawn behind windows and menus on the desktop, to give the effect of depth. They are the default on Apple's Mac OS X. They require alpha layer transparency so that you can see through them to what ever is underneath. This requires a lot of computer power, unless your graphics card can accelerate the rendering. Apples graphics system is written in openGL so it is easy for them to implement this. Until recently it has been very hard to make drop shadows in Linux without a large performance hit.
Drop shadows是桌面上的窗口软件和菜单的阴影加深,它提供深度效果.它们在苹果电脑Mac OS X是默认的.它们能使alpha外观透明,这样你就可以总能透视你眼前所见的.它要求一定的机器功率,除非你的显卡能加速透视.苹果的图形系统使用openGL编写所以它能简易的执行它们.直到现在在linux中没有大量的点击操作依然很难达到阴影加强的效果.
Some people feel that drop shadows are unnecessary eyecandy. I think that they are a useful way of subtly making windows distinct from each other. The human eye is good at picking up on depth cues like drop shadows.
许多人觉得阴影加深是不必要的把戏.我认为它们是能巧妙的使窗口软件彼此鲜明不同的有效途径.人眼适宜拮取深度信息比如阴影加深.
A small warning
This may cause an instability on some (non-default install) programs. celestia-gnome and nethack-gnome seem to cause the x server to crash with these adjustments to the xorg.conf. (see bug https://bugzilla.ubuntu.com/show_bug.cgi?id=7406 )
小的警告
它可能引起一些(没有默认安装)程序的不稳定.celestia-gnome和nethack-gnome用这些来调整以适应xorg.conf时可能会引起X服务器崩溃.(参看错误 https://bugzilla.ubuntu.com/show_bug.cgi?id=7406 )
What you need
You will need to be running Xorg, rather than XFree86. Xorg is available in Hoary.
You will need the xcompmgr package (will also install libcomposite)
You will also need to have a good graphics card and a fast computer. I have a 64mb ATI Radeon Mobility 9000 in my 1Ghz G4 powerbook. A few years old, but good enough for this to work.
你需要什么
你需要正在运行Xorg,而不是XFree86.Xorg在Hoary下也有效.
你需要xcompmgr包(也需要安装libcomposite)
你也需要有一个好的显卡和快速的机器.我安装了64mb的 ATI Radeon Mobility 9000在我的1Ghz G4 powerbook上.过时好多年了,但是使drop shadows工作起来还非常的好.
You will need to enable graphics acceleration. Have a look at [[BinaryDriverHowto]] if you are running an x86 processor. I have a powerpc processor so I use the open source ati driver, which are already installed.
你也需要使图形加速,如果你正运行一个x86处理器参考一下[[Binary Driver How to]] .我有一台大功率的电脑处理器,所以我使用已经安装好的开源的ati驱动.
Now you need to edit your X configuration. You can get your system in a real mess if you damage this file. If have not edited configuration files before and don't know how to make a backup then you probably should not be attempting this.
The X configuration file is at /etc/X11/xorg.conf
现在你需要编辑你的X配置.如果破坏了这个文件会使您的系统十分杂乱.
不知道如何备份前,如果还没有编辑配置文件,最好不要轻易尝试.
X配置文件在/etc/X11/xorg.conf
These are the changes I made, it may be different on different card, if you try this please post your experience as a comment.
下面这些是我设定的改变,在不同的卡上它可能会不同,如果你做尝试请张贴自己的经验作为注解.
I changed
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
Driver "ati"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
EndSection
To
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
Driver "ati"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
Option "backingstore" "true"
Option "RenderAccel" "true"
EndSection
and added
Section "Extensions"
Option "Composite" "Enable"
Option "RENDER" "true"
Option "DAMAGE" "true"
EndSection
to the end.
These are lines that I have picked up from the wiki and the forums. They enable some of the new features in Xorg.
上面这些是我从wiki和论坛截取的命令行,它们可以使Xorg中的新特点发挥作用.
You will have to restart X for these to come into effect. The easiest way is to logout and press ctrl+alt+backspace at the login screen. (You can also reboot the whole computer, or logging out and running "sudo /etc/init.d/gdm restart" from a text terminal should do it)
为使这些发挥作用你需要重启X.最简单的方法是退出并且在登录界面按下ctrl+alt+backspace键.(你也可以重新启动整个机器,或者退出并且在一个文本编辑器运行"sudo /etc/init.d/gdm restart"也可以完成它)
How to enable drop shadows
The Gnome desktop does not have drop shadows built in, so you will need to use the xcompmgr utility to turn them on. Have a look at the man page for a full list of its options.
如何使drop shadows起作用
Gnome桌面没有收入drop shadows,所以你需要使用xcompmgr设备打开它们.
参照手册查看drop shadows所有选项的详细目录.
Open up a terminal and run
xcompmgr -c
Use Control + C to stop it.
打开一个终端并且运行
xcompmgr -c
使用Control + C可以停止它
Have a play with a few of the options in the man page. You can make the shadows bigger with
xcompmgr -c -r 30
or hard with
xcompmgr -s
If you get windows going on top of you gnome panels then run
killall gnome-panel
to put the panels back on the top layer.
用一些手册中的选项做些练习.你可以使用xcompmgr -c -r 30使阴影变大或者使用xcompmgr -s使阴影加深.
如果你的窗口软件在gnome面板上面运行,你可以运行kill all gnome-panel使所有的面板回到外观最上层.
Once you have found your perfect settings then you might want to make them run whenever you start Gnome. In the Preferences menu choose Sessions. Go to the Startup Programs tab. Click add and add your chosen xcompmgr command. Set the order to something small; you need it to load before gnome-panel.
一旦你搞定你的完美设置每当你打开Gnome你就会想运行它们.在参数菜单选择会话.打开开始程序下拉菜单,点击添加并且添加你选择的xcompmgr命令.设定命令给小的东西, 你需要在gnome面板加载.
Now log out and back in again.
现在退出然后再次登录.
Additional notes
If you find that this affects openGL performance, try adding the following to your /etc/X11/xorg.conf
附加说明
如果发现它影响openGL执行,尝试加入下面的东西到你的/etc/X11/xorg.conf
Option "AllowGLXWithComposite" "true"
From DanieleMedri Sat Mar 26 12:35:57 +0000 2005 From: Daniele Medri Date: Sat, 26 Mar 2005 12:35:57 +0000 Subject:
Option "AllowGLXWithComposite" Message-ID: <20050326123557+0000@https://www.ubuntulinux.org>
选择"AllowGLXWithComposite"
Message-ID:<20050326123557+0000@https://www.ubuntulinux.org>
I put this option in my device section (eg. Nvidia card) not in "Extensions".
From LucaDeRugeriis Thu May 12 03:28:09 +0100 2005 From: Luca De Rugeriis Date: Thu, 12 May 2005 03:28:09 +0100 Subject: Metacity Message-ID: <20050512032809+0100@https://www.ubuntulinux.org>
我设定了这些选项在我的设备层面(例如Nvidia card)而不是做为"延伸".
From LucaDeRugeriis Thu May 12 03:28:09 +0100 2005 From: Luca De Rugeriis Date: Thu, 12 May 2005 03:28:09 +0100 Subject: Metacity Message-ID: <20050512032809+0100@https://www.ubuntulinux.org>
If you kill gnome-panel, you lose icons in your notification area. Some applications will crash too. Then the panel will show up with drop shadows which is boring. Killing metacity is a much more effective way to restore your desktop margins.
如果你关闭gnome面板,你会在你的通知区域丢失画像.一些程序也会崩溃.
而且面板也伴随无聊的阴影加深出现.关闭metacity是恢复桌面边际相当有效的方法.
如果你使用DapperDrake你可能要参考Composite Manager
What drop shadows are and why you might want them
什么是drop shadows和为什么你会需要它们
Drop shadows are shadows drawn behind windows and menus on the desktop, to give the effect of depth. They are the default on Apple's Mac OS X. They require alpha layer transparency so that you can see through them to what ever is underneath. This requires a lot of computer power, unless your graphics card can accelerate the rendering. Apples graphics system is written in openGL so it is easy for them to implement this. Until recently it has been very hard to make drop shadows in Linux without a large performance hit.
Drop shadows是桌面上的窗口软件和菜单的阴影加深,它提供深度效果.它们在苹果电脑Mac OS X是默认的.它们能使alpha外观透明,这样你就可以总能透视你眼前所见的.它要求一定的机器功率,除非你的显卡能加速透视.苹果的图形系统使用openGL编写所以它能简易的执行它们.直到现在在linux中没有大量的点击操作依然很难达到阴影加强的效果.
Some people feel that drop shadows are unnecessary eyecandy. I think that they are a useful way of subtly making windows distinct from each other. The human eye is good at picking up on depth cues like drop shadows.
许多人觉得阴影加深是不必要的把戏.我认为它们是能巧妙的使窗口软件彼此鲜明不同的有效途径.人眼适宜拮取深度信息比如阴影加深.
A small warning
This may cause an instability on some (non-default install) programs. celestia-gnome and nethack-gnome seem to cause the x server to crash with these adjustments to the xorg.conf. (see bug https://bugzilla.ubuntu.com/show_bug.cgi?id=7406 )
小的警告
它可能引起一些(没有默认安装)程序的不稳定.celestia-gnome和nethack-gnome用这些来调整以适应xorg.conf时可能会引起X服务器崩溃.(参看错误 https://bugzilla.ubuntu.com/show_bug.cgi?id=7406 )
What you need
You will need to be running Xorg, rather than XFree86. Xorg is available in Hoary.
You will need the xcompmgr package (will also install libcomposite)
You will also need to have a good graphics card and a fast computer. I have a 64mb ATI Radeon Mobility 9000 in my 1Ghz G4 powerbook. A few years old, but good enough for this to work.
你需要什么
你需要正在运行Xorg,而不是XFree86.Xorg在Hoary下也有效.
你需要xcompmgr包(也需要安装libcomposite)
你也需要有一个好的显卡和快速的机器.我安装了64mb的 ATI Radeon Mobility 9000在我的1Ghz G4 powerbook上.过时好多年了,但是使drop shadows工作起来还非常的好.
You will need to enable graphics acceleration. Have a look at [[BinaryDriverHowto]] if you are running an x86 processor. I have a powerpc processor so I use the open source ati driver, which are already installed.
你也需要使图形加速,如果你正运行一个x86处理器参考一下[[Binary Driver How to]] .我有一台大功率的电脑处理器,所以我使用已经安装好的开源的ati驱动.
Now you need to edit your X configuration. You can get your system in a real mess if you damage this file. If have not edited configuration files before and don't know how to make a backup then you probably should not be attempting this.
The X configuration file is at /etc/X11/xorg.conf
现在你需要编辑你的X配置.如果破坏了这个文件会使您的系统十分杂乱.
不知道如何备份前,如果还没有编辑配置文件,最好不要轻易尝试.
X配置文件在/etc/X11/xorg.conf
These are the changes I made, it may be different on different card, if you try this please post your experience as a comment.
下面这些是我设定的改变,在不同的卡上它可能会不同,如果你做尝试请张贴自己的经验作为注解.
I changed
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
Driver "ati"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
EndSection
To
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Mobility 9000 M9 (R250 Lf)"
Driver "ati"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
Option "backingstore" "true"
Option "RenderAccel" "true"
EndSection
and added
Section "Extensions"
Option "Composite" "Enable"
Option "RENDER" "true"
Option "DAMAGE" "true"
EndSection
to the end.
These are lines that I have picked up from the wiki and the forums. They enable some of the new features in Xorg.
上面这些是我从wiki和论坛截取的命令行,它们可以使Xorg中的新特点发挥作用.
You will have to restart X for these to come into effect. The easiest way is to logout and press ctrl+alt+backspace at the login screen. (You can also reboot the whole computer, or logging out and running "sudo /etc/init.d/gdm restart" from a text terminal should do it)
为使这些发挥作用你需要重启X.最简单的方法是退出并且在登录界面按下ctrl+alt+backspace键.(你也可以重新启动整个机器,或者退出并且在一个文本编辑器运行"sudo /etc/init.d/gdm restart"也可以完成它)
How to enable drop shadows
The Gnome desktop does not have drop shadows built in, so you will need to use the xcompmgr utility to turn them on. Have a look at the man page for a full list of its options.
如何使drop shadows起作用
Gnome桌面没有收入drop shadows,所以你需要使用xcompmgr设备打开它们.
参照手册查看drop shadows所有选项的详细目录.
Open up a terminal and run
xcompmgr -c
Use Control + C to stop it.
打开一个终端并且运行
xcompmgr -c
使用Control + C可以停止它
Have a play with a few of the options in the man page. You can make the shadows bigger with
xcompmgr -c -r 30
or hard with
xcompmgr -s
If you get windows going on top of you gnome panels then run
killall gnome-panel
to put the panels back on the top layer.
用一些手册中的选项做些练习.你可以使用xcompmgr -c -r 30使阴影变大或者使用xcompmgr -s使阴影加深.
如果你的窗口软件在gnome面板上面运行,你可以运行kill all gnome-panel使所有的面板回到外观最上层.
Once you have found your perfect settings then you might want to make them run whenever you start Gnome. In the Preferences menu choose Sessions. Go to the Startup Programs tab. Click add and add your chosen xcompmgr command. Set the order to something small; you need it to load before gnome-panel.
一旦你搞定你的完美设置每当你打开Gnome你就会想运行它们.在参数菜单选择会话.打开开始程序下拉菜单,点击添加并且添加你选择的xcompmgr命令.设定命令给小的东西, 你需要在gnome面板加载.
Now log out and back in again.
现在退出然后再次登录.
Additional notes
If you find that this affects openGL performance, try adding the following to your /etc/X11/xorg.conf
附加说明
如果发现它影响openGL执行,尝试加入下面的东西到你的/etc/X11/xorg.conf
Option "AllowGLXWithComposite" "true"
From DanieleMedri Sat Mar 26 12:35:57 +0000 2005 From: Daniele Medri Date: Sat, 26 Mar 2005 12:35:57 +0000 Subject:
Option "AllowGLXWithComposite" Message-ID: <20050326123557+0000@https://www.ubuntulinux.org>
选择"AllowGLXWithComposite"
Message-ID:<20050326123557+0000@https://www.ubuntulinux.org>
I put this option in my device section (eg. Nvidia card) not in "Extensions".
From LucaDeRugeriis Thu May 12 03:28:09 +0100 2005 From: Luca De Rugeriis Date: Thu, 12 May 2005 03:28:09 +0100 Subject: Metacity Message-ID: <20050512032809+0100@https://www.ubuntulinux.org>
我设定了这些选项在我的设备层面(例如Nvidia card)而不是做为"延伸".
From LucaDeRugeriis Thu May 12 03:28:09 +0100 2005 From: Luca De Rugeriis Date: Thu, 12 May 2005 03:28:09 +0100 Subject: Metacity Message-ID: <20050512032809+0100@https://www.ubuntulinux.org>
If you kill gnome-panel, you lose icons in your notification area. Some applications will crash too. Then the panel will show up with drop shadows which is boring. Killing metacity is a much more effective way to restore your desktop margins.
如果你关闭gnome面板,你会在你的通知区域丢失画像.一些程序也会崩溃.
而且面板也伴随无聊的阴影加深出现.关闭metacity是恢复桌面边际相当有效的方法.