In my recent articles I have been covering various window managers and desktops for Linux. So far you can read about Fluxbox, Window Maker, and Xfce 4. These desktops and window managers are solid entries in the Linux desktop. But what if you want to take your Linux desktop further with a bit more eye candy? Any desktop can be made more modern looking with the simple addition of drop shadows. Although most would argue that drop shadows are fairly worthless to the desktop, they give open windows a more three dimensional, modern look which can make any desktop instantly look more relevant.
Fortunately there are composite managers that help you bring your old school desktop into the modern ages without having to lose your mind. One of those composite managers, xcompmgr, is really quite easy to use. For most window managers it's as simple as installing and running a command with desired arguments. Let's take a look at how this is done.
Getting and installing
Xcompmgr will most likely be found in your distributions repositories, so you can just open up your Add/Remove Software utility, do a search for "xcompmgr", select the results, and apply the changes. Or, if you prefer the command line, you can install xcompmgr with a command like:
sudo apt-get install xcompmgr
yum install xcompmgr
NOTE: The first is a Ubuntu-based command the second is a Fedora-based command. When using the Fedora command you will have to have root permissions.
Once installed, you are ready to go.
The syntax of the xcompmgr command is simple:
Where OPTIONS is a single letter or group of letters representing various options.
Here is a list of the more useful options used in xcompmgr:
-r Specify the blur radius for the shadows.
-o Specify the opacity for the shadows.
-l Specify left offset for shadows (default is right offset.)
-t Specify top offset for shadows (default is bottom.)
-I Specify the opacity change between steps for fading in.
-O Specify the opacity change between steps for fading out.
-c Soft shadows with translucency support.
-f Enable smooth effects for transient windows in hiding and restoring. Only used in conjunction with the "c" option.
-C Disable shadows for panels and docks. Only used in conjunction with the "c" option.
-D Specify time (in milliseconds) between steps in a fade.
Before and after
Let's take a look at before and after shots of the same desktop with and without the use of xcompmgr.
Figure 1 shows the Fluxbox desktop with a few windows open (some shaded). You see no drop shadows here.
Now we'll employ xcompmgr with the following options:
xcompmgr -c -r10 -F -f -D5 -C -o0.8 &
As you can see there are some numerical values with the options. Here's what they mean:
r10 - Radius of 10 pixels.
D5 - 5 millisecond fade
o0.8 - Not sure what value this represents, but I know the default is .75. Play with anything between these and you'll find a setting to your liking.
NOTE: The & is added to the end of the command so you can get your bash prompt back. Otherwise you wouldn't be able to u
As you can see, in Figure 2, the desktop has an added dimension it didn't have before. It adds just enough eye candy, without taking a hit on your performance, to keep people from saying "Your desktop is old-school UNIX!"
Make it stick
The easiest way to make this stick is to make use of the .xinitrc file. This file will start your window manager exactly how you want it. If you are using Fluxbox your ~/.xinitrc file would look like this:
xcompmgr -c -r10 -F -f -D5 -C -o0.8 &
Of course, when using .xinitrc, you would have to not use your graphical log in and then use the command startx to start your window manager.
No, it won't make you a better user, programer, or win you any awards; but xcompmgr can at least make your desktop look more like it belongs in the current era.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.