http://gentoo-wiki.com/TIP_Xorg_X11_and_Tranparency http://ruinaudio.com/xorg-cvs-howto.txt http://www.freedesktop.org/Software/xapps http://ruinaudio.com/xorg-cvs-howto.txt Last night I installed Xorg (the Keith Packard and Free Desktop fork of XFree86). There were a couple of gotchas, so I took the following notes to save everyone else some time. 1. create a new destination directory to house your new Xorg installation. A lot of FAQs use /opt/Xorg-, I used /data1/Xorg-20041015 2. check out xorg from CVS (or emerge xorg-x11 in gentoo) cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login CVS password: cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co -P xc 3. copy config/cf/xorgsite.def to config/cf/host.def 4. edit config/cf/host.def to suite your setup, and add the following lines: #define ProjectRoot /data1/Xorg-20041015 #define NothingOutsideProjectRoot YES #define HasFreetype2 YES #define HasFontconfig YES (be sure to change /data1/Xorg-20041015 to the directory to suite your particular setup) 5. back up your /etc/X11 and /usr/X11R6 directories (just as a precaution, the compile shouldn't affect anything in those directories) mv /usr/X11R6{,-`date +%Y%m%d`} cp /etc/X11{,-`date +%Y%m%d`} 6. make /usr/X11R6 a symlink to your installation directory ln -s /data1/Xorg-20041015 /usr/X11R6 7. compile Xorg with the command make World (this is going to take forever, even on a fast machine. I told Xorg to use distcc, but it seemed to revert back to gcc once it got far enough along in the build process. I'm sure there's a way to force this, but I didn't investigate further) Oh, be sure you've got flex, bison, and the PAM development libraries installed. In Debian, "apt-get install flex bison libpam0g-dev" 8. Install to the installation directory: su -c 'make install' 9. copy your old /etc/X11/XF86Config-4 to /etc/X11/xorg.conf and add a the following lines: Section "Extensions" Option "Composite" "Enable" Option "RENDER" "Enable" EndSection (some FAQs recommend that you also find a section that looks like this: Section "InputDevice" Identifier "Keyboard0" Driver "Keyboard" And change it to look like this: Section "InputDevice" Identifier "Keyboard0" Driver "kbd" I didn't do that though, and things seemed to work fine for me. 10. At this point you should have enough to actually get restart into Xorg, so go ahead and quit out. If you're using the NVidia driver, be sure to reinstall that at this point. NVidia users should also enable render acceleration and (if you want even more eye candy) cursor shadows. Here's what my device configuration looks like: Section "Device" Identifier "NVidia GeForce4 440 Go (NV17)" Driver "nvidia" BusID "PCI:01:00:00" Option "CursorShadow" "1" Option "NvAGP" "1" Option "RenderAccel" "1" Option "NoLogo" "1" EndSection Obviously you should replace the Identifier, BusID, and NvAGP with the correct options for your system. By the way, the RenderAccel option is marked as experimental in the current NVidia drivers (1.0-6111), so if they're giving you problems feel free to disable them). 11. Fire up Xorg either via startx or xdm (or gdm, kdm, etc). At this point some of my fonts were screwy, until I realized that I'd forgotten to copy some of my old PCF fonts and also forgotten to create a symlink in my new X11R6 directory to my old truetype fonts directory. Here's what I did: cp -aiv /usr/X11R6{-20041015,}/lib/X11/fonts/misc/*.pcf cd /usr/X11R6/lib/X11/fonts/misc && mkfontdir cd /usr/X11R6/lib/X11/fonts && ln -s /usr/share/fonts/truetype 12. Now you should be up and running. In order to actually play with any of the new stuff, you'll need to install xcompmgr (the X composition manager), and transset (an app to set window transparency). Gentoo users, by the way, can just emerge xcompmgr and skip to step 16. Everyone else, here's how you get xcompmgr: Either get the source from CVS, like this: cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps login CVS password: cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/xapps co xcompmgr Or grab the tarball like this: http://freedesktop.org/~xapps/release/xcompmgr-1.1.tar.gz Note: using the tarball isn't recommended, because it might be too old, and because you'll need to grab transset from CVS in a few minutes anyway. 13. In order to compile xcompmgr, you'll need to point your pkg-config at your new Xorg pkgconfig directory, like so: PKG_CONFIG_PATH=/data1/Xorg-20041015/lib/pkgconfig export PKG_CONFIG_PATH 14. Most people can probably skip this step, but when I tried to compile xcompmgr, I was getting the following errors: configure.ac: 9: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER' and later: configure.ac: 9: required file `./[config.h].in' not found To get rid of them, edit configure.ac and change the following line AC_CONFIG_HEADER([config.h]) so it looks like this: AM_CONFIG_HEADER(config.h) After that everything should be fine. Oh, if you get the following error: checking for xcomposite xfixes xdamage xrender... Package xcomposite was not found in the pkg-config search path. Perhaps you should add the directory containing `xcomposite.pc' to the PKG_CONFIG_PATH environment variable No package 'xcomposite' found configure: error: Library requirements (xcomposite xfixes xdamage xrender) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them. Then you probably skipped step 13. 15. Compile and install xcompmgr. ./autogen.sh && ./configure && make && sudo make install 16. Grab transset from CVS and compile it: cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps login CVS password: cvs -d:pserver:anoncvs@freedesktop.org:/cvs/xapps co transset cd transset make && su -c 'cp transset /usr/X11R6/bin' (You have to install it manually because the Makefile distributed with transset doesn't have an install directive) 17. Now you can play with xcompmgr. Try this in a terminal to get you started: xcompmgr -c The composite manager will start up and remap your windows. If you run transset, then click on a window, it'll set a window transparent. If you cancel out of xcompmgr (by pressing ctrl-C), things will return to normal. The xcompmgr man page describes all the options, but here's a good set of defaults: xcompmgr -cCfF -r7 -o.65 -l-10 -t-8 -D7 & This command gives you transparency, drop-shadows, and windows that fade in on open, and fade out on close. By the way, if you're one of the 5 people besides me still using E16, you'll need to upgrade to E16.7 in order to get rid of the horrible rendering artifacts on window borders and menus. The latest and greatest in Sid is E16.6, so for Debian users this means compiling E16 from source (and installing libimlib2-dev if you haven't already done so). As of right now, there appear to be a couple of minor rendering issues with E16.7. Specifically, Eterms leave dropshadow artifacts if you resize them from the keyboard, expanding an icon from a transparent iconbox will leave a residual burn mark, and window titlebars occasionally get garbled on the edges. I don't think any of these glitches are serious, but if they bother you, I've read that MetaCity (the default GNOME window manager) works great out of the box, and that the kwin (the KDE window manager) developers are currently adding native Xcomposite support to kwin. If you want Xine and mplayer to play nice with the Xcomposite transparency and dropshadow effects, you'll need to change the video driver to something other than Xv (which is usually the default). Why? Because Xv allows applications to bypass other applications -- including the window manager and our new buddy, the composition manager -- and blit (block transfer, graphics programming parliance for "copy a whole bunch of stuff from one memory address to another") directly to the screen. In Xine, you'll find the driver under the Video tab of the settings dialog (which you can access by pressing Alt-S, or right-clicking on the movie window and selecting Settings -> Setup). Xshm (X Shared Memory) works fine for me. mplayer doesn't have a GUI, but if you invoke mplayer with "-vo x11", it'll have the same effect. XawTV and any other Xv-using applications will have need to be adjusted in a similar way. Don't feel like reconfiguring all these programs? If you don't make any changes, applications blitting via Xv will still run and display just fine, as long as the window isn't obscured. When the window is obscured by a translucent object (eg, a dropshadow or a transparent window), you'll get an ugly blue window instead of a pretty blended one.