Difference between revisions of "Xcompmgr"

From ArchWiki
Jump to: navigation, search
m (new templates, see Help:Style)
(Window Transparency: fix backwards terminology)
(21 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:X Server (English)]]
+
[[Category:X Server]]
[[Category:Eye candy (English)]]
+
[[Category:Eye candy]]
{{i18n|Xcompmgr}}
+
[[es:Xcompmgr]]
 +
[[ru:Xcompmgr]]
 +
[[zh-CN:Xcompmgr]]
 
{{Article summary start}}
 
{{Article summary start}}
{{Article summary text|Describes the installation and usage of xcompmgr.}}
+
{{Article summary text|Describes the installation and usage of Xcompmgr.}}
 
{{Article summary heading|Related articles}}
 
{{Article summary heading|Related articles}}
{{Article summary wiki|Cairo Compmgr}}
+
{{Article summary text|[[Compiz]]}}
{{Article summary wiki|Composite}}
+
{{Article summary text|[[Cairo Compmgr]]}}
{{Article summary wiki|AIGLX}}
+
{{Article summary text|[[Compton]]}}
{{Article summary wiki|Xorg}}
+
{{Article summary wiki|Window Manager}}
+
{{Article summary wiki|Openbox}}
+
{{Article summary wiki|Fluxbox}}
+
{{Article summary wiki|Awesome}}
+
 
{{Article summary end}}
 
{{Article summary end}}
Xcompmgr is a simple composite manager, capable of rendering drop shadows and, with the use of the {{ic|transset}} utility, primitive window transparency. Designed solely as a proof-of-concept, xcompmgr is a lightweight alternative to Compiz Fusion and similar composite managers.
 
  
Because it does not replace any existing window manager, it is an ideal solution for [[Openbox]] and [[Fluxbox]] users seeking a more elegant desktop.
+
[http://cgit.freedesktop.org/xorg/app/xcompmgr/ Xcompmgr] is a simple [[Wikipedia:Compositing window manager|composite manager]] capable of rendering drop shadows and, with the use of the '''transset''' utility, primitive window transparency. Designed solely as a proof-of-concept, Xcompmgr is a lightweight alternative to Compiz and similar composite managers.
  
== Prerequisites ==
+
Because it does not replace any existing window manager, it is an ideal solution for users of lightweight [[Window Manager|window managers]], seeking a more elegant desktop.
 
+
Xcompmgr requires the following:
+
* [[Xorg]] must be installed, configured and running
+
* [[Composite]] must be enabled via graphics drivers or [[AIGLX]]
+
  
 
== Installation ==
 
== Installation ==
 +
Before installing Xcompmgr, make sure you have installed and correctly configured [[Xorg]]. If you have a custom setup, also turn on the [[Composite]] extension for the X Server.
  
Both {{ic|xcompmgr}} and the transparency tool {{ic|transset-df}}, are available from the standard repositories:
+
Xcompmgr can be [[Pacman|installed]] with the package {{Pkg|xcompmgr}}, available in the [[official repositories]]. For transparency also install {{Pkg|transset-df}} from the [[official repositories]].
# pacman -Syu xcompmgr transset-df
+
 
 +
=== Forks and updated versions ===
 +
There are some forks available, with various bugfixes:
 +
* {{App|xcompmgr-dana|One of the first forks of Xcompmgr.|http://oliwer.net/xcompmgr-dana/|{{AUR|xcompmgr-dana}}}}
 +
* {{App|xcompmgr_tint2|A fork of Xcompmgr that contains a patch for enabling real transparency in [[Tint2]].|http://www.freedesktop.org/wiki/Software/xapps|{{AUR|xcompmgr_tint2-git}}}}
 +
* {{App|[[Compton]]|A fork of Xcompmgr that contains most of the previous fixes as well as many others.|https://github.com/chjj/compton|{{AUR|compton-git}}}}
  
 
== Configuration ==
 
== Configuration ==
 
+
To load {{ic|xcompmgr}}, simply run:
To load xcompmgr, simply run:
+
 
  $ xcompmgr -c
 
  $ xcompmgr -c
  
Line 38: Line 35:
  
 
Instead of {{ic|-c}} you can experiment with the other switches to modify the drop-shadows or even enable fading. Below is a common example:
 
Instead of {{ic|-c}} you can experiment with the other switches to modify the drop-shadows or even enable fading. Below is a common example:
  xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &
+
  xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
  
 
For a full list of options, run:
 
For a full list of options, run:
Line 44: Line 41:
  
 
=== Window Transparency ===
 
=== Window Transparency ===
 
+
Although its practical use is limited, due to its slow performance, the {{ic|transset-df}} utility can be used to set the transparency of individual windows.
Although its practical use is limited, due to its slow performance, the {{ic|transset}} utility can be used to set the transparency of individual windows.
+
  
 
To set the transparency of a program window, make sure the desired program is already running, then execute:
 
To set the transparency of a program window, make sure the desired program is already running, then execute:
  transset n
+
  $ transset-df [opacity]
.. where {{ic|n}} is a number from 0 to 1, zero being transparent and 1 being opaque.
+
where {{ic|opacity}} is a number between '''0''' and '''1''', 0 being transparent and 1 being opaque.
 
+
Once executed, the mouse cursor will transform to a crosshair. Simply click the desired window and the transparency will change to the value specified. For example, {{ic|transset .25}} will set the target window to 75% opacity.
+
 
+
== Troubleshooting ==
+
 
+
=== Fluxbox windows won't raise ===
+
 
+
This is fixed in fluxbox CVS after 0.9.10. See [http://freedesktop.org/bugzilla/show_bug.cgi?id=1264] for more info.
+
 
+
A workaround in 0.9.10 is to set the layer of the Slit to "Desktop" (flux menu -> Configure -> Slit -> Layer -> Desktop).
+
 
+
=== Mozilla Firefox crashes when entering a Flash site ===
+
 
+
You can fix it by creating an executable file named {{ic|/etc/profile.d/flash.sh}} containing this line:
+
export XLIB_SKIP_ARGB_VISUALS=1
+
 
+
Warning! this will disable compositing effects aswell as cause kwin to not function and cairo-compmgr to crash.
+
 
+
=== Background turns light gray briefly after logging in (e.g. in Openbox) ===
+
 
+
This is fixed by installing hsetroot and setting the background color by executing {{ic|hsetroot -solid "#000000"}} (just type the code of the colour you want instead of 000000) before xcompmgr.
+
 
+
== Tips ==
+
  
=== Starting/Stopping xcompmgr on Demand ===
+
Once execution, the mouse cursor will transform to a cross-hair. Click a window and its transparency will change to the value specified. For example, {{ic|transset-df 0.25}} will set the target window to 25% opacity (75% transparency).
  
This script (e.g. in ~/bin) allows easy (re)starting and stopping of the compositing manager.
+
== Tips and tricks ==
 +
=== Start/Stop Xcompmgr on demand ===
 +
This script allows easy (re)starting and stopping of the compositing manager.
 +
{{hc|~/.bin/comp|<nowiki>
 
  #!/bin/bash
 
  #!/bin/bash
 
  #
 
  #
Line 82: Line 58:
 
  # (xcompmgr in this case)
 
  # (xcompmgr in this case)
 
   
 
   
  function comphelp () {
+
  comphelp() {
 
   echo "Composition Manager:"
 
   echo "Composition Manager:"
 
   echo "  (re)start: COMP"
 
   echo "  (re)start: COMP"
 
   echo "  stop:      COMP -s"
 
   echo "  stop:      COMP -s"
 
   echo "  query:    COMP -q"
 
   echo "  query:    COMP -q"
   echo "              returns 1 if composition manager is running, else 0"
+
   echo "              returns 0 if composition manager is running, else 1"
 
   exit
 
   exit
 
  }
 
  }
 
   
 
   
  function checkcomp () {
+
  checkcomp() {
   ( ps nc -C xcompmgr &>/dev/null ) && exit 1
+
   pgrep xcompmgr &>/dev/null
  exit 0
+
 
  }
 
  }
 
   
 
   
  function stopcomp () {
+
  stopcomp() {
   ( ps nc -C xcompmgr &>/dev/null ) && killall xcompmgr
+
   checkcomp && killall xcompmgr
 
  }
 
  }
 
   
 
   
  function startcomp () {
+
  startcomp() {
 
   stopcomp
 
   stopcomp
 
  # Example settings only. Replace with your own.
 
  # Example settings only. Replace with your own.
Line 107: Line 82:
 
  }
 
  }
 
   
 
   
  case "$1x" in
+
  case "$1" in
     "x") startcomp;;
+
     "") startcomp ;;
   "-qx") checkcomp;;
+
   "-q") checkcomp ;;
   "-sx") stopcomp; exit;;
+
   "-s") stopcomp; exit ;;
      *) comphelp;;
+
      *) comphelp ;;
  esac
+
  esac</nowiki>
 +
}}
 +
 
 +
For ease of use, you can bind this script to a hot-key using, for example, [[Xbindkeys]]. This allows for fast restart or temporary composition removal if needed without interrupting other work.
 +
 
 +
=== Toggle Xcompmgr ===
 +
Assign the following script to any hot-key:
 +
#!/bin/bash
 +
 +
if pgrep xcompmgr &>/dev/null; then
 +
        echo "Turning xcompmgr ON"
 +
        xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
 +
else
 +
        echo "Turning xcompmgr OFF"
 +
        pkill xcompmgr &
 +
fi
 +
 +
exit 0
 +
 
 +
== Troubleshooting ==
 +
=== Mozilla Firefox crashes when entering a Flash site ===
 +
You can fix it by creating an executable file named {{ic|/etc/profile.d/flash.sh}} containing this line:
 +
export XLIB_SKIP_ARGB_VISUALS=1
 +
 
 +
{{Warning|This will disable compositing effects.}}
 +
 
 +
=== Background turns light gray briefly after logging in (e.g. in Openbox) ===
 +
This is fixed by installing {{Pkg|hsetroot}} and setting the background color by executing {{ic|hsetroot -solid "#000000"}} (just type the code of the color you want instead of ''#000000'') before {{ic|xcompmgr}}.
 +
 
 +
=== BadPicture request in awesome ===
 +
If you get the following error in [[awesome]]:
 +
  error 163: BadPicture request 149 minor 8 serial 34943
 +
  error 163: BadPicture request 149 minor 8 serial 34988
 +
  error 163: BadPicture request 149 minor 8 serial 35033
 +
just install [[feh]] and restart [[awesome]].
 +
 
 +
=== Screen not updating in awesome after resolution change ===
  
I bound COMP and COMP -s to two hot keys in IceWM because there are a few glitches using xcompmgr in this WM. This allows for fast restart or temporary composition removal if needed without interrupting other work.
+
When using an external monitor, you may encounter problems when automatically changing display resolutions: a part of the screen becomes "stuck" and no longer updates itself. This problem occurs because of the initial resolution change (happening before Xcompmgr starts) as well as [[awesome]] setting the background via [[Feh]].
  
==See also==
+
To fix it, you need to install {{Pkg|hsetroot}}, from the [[official repositories]], and put the following line in {{ic|.xinitrc}}, just before {{ic|xcompmgr}}:
*[[AIGLX]]
+
hsetroot -solid "#000066"
*[[Composite]] -- A Xorg extension required by composite managers
+
(you can replace ''#000066'' with your color of choice).
*[[Compiz]] -- The original composite/window manager from Novell
+
*[[Cairo Compmgr|Cairo Composite Manager]] -- A versatile and extensible composite manager which uses cairo for rendering.
+
*[[Wikipedia:Compositing window manager]]
+

Revision as of 21:08, 1 May 2013

Summary help replacing me
Describes the installation and usage of Xcompmgr.
Related articles
Compiz
Cairo Compmgr
Compton

Xcompmgr is a simple composite manager capable of rendering drop shadows and, with the use of the transset utility, primitive window transparency. Designed solely as a proof-of-concept, Xcompmgr is a lightweight alternative to Compiz and similar composite managers.

Because it does not replace any existing window manager, it is an ideal solution for users of lightweight window managers, seeking a more elegant desktop.

Installation

Before installing Xcompmgr, make sure you have installed and correctly configured Xorg. If you have a custom setup, also turn on the Composite extension for the X Server.

Xcompmgr can be installed with the package xcompmgr, available in the official repositories. For transparency also install transset-df from the official repositories.

Forks and updated versions

There are some forks available, with various bugfixes:

  • xcompmgr-dana — One of the first forks of Xcompmgr.
http://oliwer.net/xcompmgr-dana/ || xcompmgr-danaAUR
  • xcompmgr_tint2 — A fork of Xcompmgr that contains a patch for enabling real transparency in Tint2.
http://www.freedesktop.org/wiki/Software/xapps || xcompmgr_tint2-gitAUR
  • Compton — A fork of Xcompmgr that contains most of the previous fixes as well as many others.
https://github.com/chjj/compton || compton-gitAUR

Configuration

To load xcompmgr, simply run:

$ xcompmgr -c

To have it load at session start, add the following to xprofile:

xcompmgr -c &

Instead of -c you can experiment with the other switches to modify the drop-shadows or even enable fading. Below is a common example:

xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &

For a full list of options, run:

$ xcompmgr --help

Window Transparency

Although its practical use is limited, due to its slow performance, the transset-df utility can be used to set the transparency of individual windows.

To set the transparency of a program window, make sure the desired program is already running, then execute:

$ transset-df [opacity]

where opacity is a number between 0 and 1, 0 being transparent and 1 being opaque.

Once execution, the mouse cursor will transform to a cross-hair. Click a window and its transparency will change to the value specified. For example, transset-df 0.25 will set the target window to 25% opacity (75% transparency).

Tips and tricks

Start/Stop Xcompmgr on demand

This script allows easy (re)starting and stopping of the compositing manager.

~/.bin/comp
 #!/bin/bash
 #
 # Start a composition manager.
 # (xcompmgr in this case)
 
 comphelp() {
   echo "Composition Manager:"
   echo "   (re)start: COMP"
   echo "   stop:      COMP -s"
   echo "   query:     COMP -q"
   echo "              returns 0 if composition manager is running, else 1"
   exit
 }
 
 checkcomp() {
   pgrep xcompmgr &>/dev/null
 }
 
 stopcomp() {
   checkcomp && killall xcompmgr
 }
 
 startcomp() {
   stopcomp
 # Example settings only. Replace with your own.
   xcompmgr -CcfF -I-.015 -O-.03 -D6 -t-1 -l-3 -r4.2 -o.5 &
   exit
 }
 
 case "$1" in
     "") startcomp ;;
   "-q") checkcomp ;;
   "-s") stopcomp; exit ;;
      *) comphelp ;;
 esac

For ease of use, you can bind this script to a hot-key using, for example, Xbindkeys. This allows for fast restart or temporary composition removal if needed without interrupting other work.

Toggle Xcompmgr

Assign the following script to any hot-key:

#!/bin/bash

if pgrep xcompmgr &>/dev/null; then
       echo "Turning xcompmgr ON"
       xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
else
       echo "Turning xcompmgr OFF"
       pkill xcompmgr &
fi

exit 0

Troubleshooting

Mozilla Firefox crashes when entering a Flash site

You can fix it by creating an executable file named /etc/profile.d/flash.sh containing this line:

export XLIB_SKIP_ARGB_VISUALS=1
Warning: This will disable compositing effects.

Background turns light gray briefly after logging in (e.g. in Openbox)

This is fixed by installing hsetroot and setting the background color by executing hsetroot -solid "#000000" (just type the code of the color you want instead of #000000) before xcompmgr.

BadPicture request in awesome

If you get the following error in awesome:

 error 163: BadPicture request 149 minor 8 serial 34943
 error 163: BadPicture request 149 minor 8 serial 34988
 error 163: BadPicture request 149 minor 8 serial 35033

just install feh and restart awesome.

Screen not updating in awesome after resolution change

When using an external monitor, you may encounter problems when automatically changing display resolutions: a part of the screen becomes "stuck" and no longer updates itself. This problem occurs because of the initial resolution change (happening before Xcompmgr starts) as well as awesome setting the background via Feh.

To fix it, you need to install hsetroot, from the official repositories, and put the following line in .xinitrc, just before xcompmgr:

hsetroot -solid "#000066"

(you can replace #000066 with your color of choice).