特殊:Badtitle/NS100:DropShadows:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/DropShadows}} {{Languages|UbuntuHelp:DropShadows}} {|border="1" cellspacing="0" |'''I you are using FeistyFawn then see DesktopEffects . If you ar...
 
Wikibot留言 | 贡献
无编辑摘要
第4行: 第4行:
|'''I you are using FeistyFawn then see DesktopEffects . If you are using DapperDrake you should probably look at CompositeManager '''  
|'''I you are using FeistyFawn then see DesktopEffects . If you are using DapperDrake you should probably look at CompositeManager '''  
|}
|}
=== What drop shadows are and why you might want them ===
=== What drop shadows are and why you might want them ===
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 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.
http://www.ubuntulinux.org/wiki/dropshadows.png
http://www.ubuntulinux.org/wiki/dropshadows.png
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.
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 ===
=== 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 )
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 )
=== What you need ===
=== What you need ===
You will need to be running Xorg, rather than XFree86. Xorg is available in Hoary.
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 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.
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.
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.
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.
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.
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
The X configuration file is at /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.
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
I changed
<pre><nowiki>
<pre><nowiki>
Section "Device"
Section "Device"
第43行: 第26行:
Option          "UseFBDev"              "true"
Option          "UseFBDev"              "true"
EndSection
EndSection
</nowiki></pre>
</nowiki></pre>
To
To
<pre><nowiki>
<pre><nowiki>
Section "Device"
Section "Device"
第54行: 第34行:
BusID          "PCI:0:16:0"
BusID          "PCI:0:16:0"
Option          "UseFBDev"              "true"
Option          "UseFBDev"              "true"
Option          "backingstore"          "true"
Option          "backingstore"          "true"
Option          "RenderAccel"          "true"
Option          "RenderAccel"          "true"
EndSection
EndSection
</nowiki></pre>
</nowiki></pre>
and added
and added
<pre><nowiki>
<pre><nowiki>
Section "Extensions"
Section "Extensions"
第69行: 第45行:
Option "DAMAGE" "true"
Option "DAMAGE" "true"
EndSection
EndSection
</nowiki></pre>
</nowiki></pre>
to the end.
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.
These are lines that I have picked up from the wiki and the forums. They enable some of the new features in 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)
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)
=== How to enable drop shadows ===
=== 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.
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.
Open up a terminal and run
Open up a terminal and run
<pre><nowiki>
<pre><nowiki>
xcompmgr -c
xcompmgr -c
</nowiki></pre>
</nowiki></pre>
Use Control + C to stop it.
Use Control + C to stop it.
Have a play with a few of the options in the man page. You can make the shadows bigger with
Have a play with a few of the options in the man page. You can make the shadows bigger with
<pre><nowiki>
<pre><nowiki>
xcompmgr -c -r 30
xcompmgr -c -r 30
</nowiki></pre>
</nowiki></pre>
or hard with
or hard with
<pre><nowiki>
<pre><nowiki>
xcompmgr -s
xcompmgr -s
</nowiki></pre>
</nowiki></pre>
If you get windows going on top of you gnome panels then run
If you get windows going on top of you gnome panels then run
<pre><nowiki>
<pre><nowiki>
killall gnome-panel
killall gnome-panel
</nowiki></pre>
</nowiki></pre>
to put the panels back on the top layer.
to put the panels back on the top layer.
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.
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.
http://www.ubuntulinux.org/wiki/dropshadowsstartup.png
http://www.ubuntulinux.org/wiki/dropshadowsstartup.png
Now log out and back in again.
Now log out and back in again.
=== Additional notes ===
=== Additional notes ===
If you find that this affects openGL performance, try adding the following to your /etc/X11/xorg.conf
If you find that this affects openGL performance, try adding the following to your /etc/X11/xorg.conf
<pre><nowiki>
<pre><nowiki>
Option "AllowGLXWithComposite" "true"
Option "AllowGLXWithComposite" "true"
</nowiki></pre>
</nowiki></pre>
From DanieleMedri Sat Mar 26 12:35:57 +0000 2005
From DanieleMedri Sat Mar 26 12:35:57 +0000 2005
From: Daniele Medri
From: Daniele Medri
第129行: 第82行:
Subject: Option "AllowGLXWithComposite"
Subject: Option "AllowGLXWithComposite"
Message-ID: <20050326123557+0000@https://www.ubuntulinux.org>
Message-ID: <20050326123557+0000@https://www.ubuntulinux.org>
I put this option in my device section (eg. Nvidia card) not in "Extensions".
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 LucaDeRugeriis Thu May 12 03:28:09 +0100 2005
From: Luca De Rugeriis
From: Luca De Rugeriis
第137行: 第88行:
Subject: Metacity
Subject: Metacity
Message-ID: <20050512032809+0100@https://www.ubuntulinux.org>
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.
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.
Killing metacity is a much more effective way to restore your desktop margins.
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2007年11月30日 (五) 16:50的版本

{{#ifexist: :DropShadows/zh | | {{#ifexist: DropShadows/zh | | {{#ifeq: {{#titleparts:DropShadows|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:DropShadows|1|-1|}} | zh | | }}

I you are using FeistyFawn then see DesktopEffects . If you are using DapperDrake you should probably look at CompositeManager

What drop shadows are and why you might want them

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. dropshadows.png 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 )

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. 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. 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 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. 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)

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. Open up a terminal and run

xcompmgr -c

Use Control + C to stop it. 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. 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. dropshadowsstartup.png 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

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> 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> 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.