Wednesday, February 1, 2017

FreeBSD compiz

FreeBSD compiz



 Configuring xorg.conf for desktop effects

Before you install and run Compiz Fusion, you need to add a few settings to /etc/X11/xorg.conf:
Add the following section to enable composite effects:
Section "Extensions"
Option "Composite" "Enable"
EndSection
Locate the “Screen” section which should look similar to the one below:
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
...
and add the following two lines (after “Monitor” will do):
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
Locate the “Subsection” that refers to the screen resolution that you wish to use. For example, if you wish to use 1280x1024, locate the section that follows. If the desired resolution does not appear in any subsection, you may add the relevant entry by hand:
SubSection "Display"
Viewport 0 0
Modes "1280x1024"
EndSubSection
A color depth of 24 bits is needed for desktop composition, change the above subsection to:
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
Finally, confirm that the “glx” and “extmod” modules are loaded in the “Module” section:
Section "Module"
Load "extmod"
Load "glx"
...

Installing and configuring Compiz Fusion

Installing Compiz Fusion is as simple as any other port:
# cd /usr/ports/x11-wm/compiz-fusion
# make install clean
Make sure to select the “EXTRA” plugins and the “EMERALD” window decorator from the options dialog that appears. If you are using GNOME, or already have support for gconf in your system, you may also wish to select “gconf support”. In this way, your effect settings will be integrated with the other desktop settings, and will be viewable via gconf-editorCompiz Fusion can however save its settings to flat files, if such an integration is not wanted. In this case, a .compizconfig directory will be created inside your home directory.
When the installation is finished, start your graphic desktop and at a terminal, enter the following commands (as a normal user):
% compiz --replace --sm-disable --ignore-desktop-hints ccp &
% emerald --replace &
Your screen will flicker for a few seconds, as your window manager (e.g. Metacity if you are using GNOME) is replaced by Compiz FusionEmerald takes care of the window decorations (i.e. close, minimize, maximize buttons, title bars and so on).
You may convert this to a trivial script and have it run at startup automatically (e.g. by adding to “Sessions” in a GNOME desktop):
#! /bin/sh
compiz --replace --sm-disable --ignore-desktop-hints ccp &
emerald --replace &
Save this in your home directory as, for example, start-compiz and make it executable:
% chmod +x ~/start-compiz
Then use the GUI to add it to Startup Programs (located in SystemPreferencesSessions on a GNOME desktop).
To actually select all the desired effects and their settings, execute (again as a normal user) the Compiz Config Settings Manager:
% ccsm
Note: In GNOME, this can also be found in the SystemPreferences menu.
If you have selected “gconf support” during the build, you will also be able to view these settings using gconf-editor under apps/compiz.
Note: If you installed the x11/nvidia-xconfig port, you should be able to perform most of the above settings by entering the following commands (as root):
# nvidia-xconfig --add-argb-glx-visuals
# nvidia-xconfig --composite
# nvidia-xconfig --depth=24
You may wish to run nvidia-xconfig -A | more to see a list of all the options offered by the above program.


Available link for download