Have xscreensaver start when blackbox starts
From blag.wiki.aktivix.org
When you start gnome or xfce, xscreensaver automatically starts up. But that's not true with the other lighter window managers, like blackbox. Of course you can always run "xscreensaver &" from a terminal, but there's an easy way to set it up so that it starts automatically. And since we're talking about blackbox we might as well start up bbkeys, which handles key bindings for blackbox, also.
The first thing to do is to create a simple script which starts those apps before it starts blackbox. Lets call it BlackBox to distinguish it from /usr/bin/blackbox. Next, as root, I'll start my favorite text editor and enter the following:
#!/bin/sh bbkeys & xscreensaver & exec blackbox
Save it as /usr/local/bin/BlackBox.
Next, make it executable:
chmod +x /usr/local/bin/BlackBox
There are two ways to select a window manager in gdm. The first is to just log in, in which case whichever window manager you've selected with "switchdesk" will run. The second is to click on the "Sessions" menu item and select the window manager and then log in. To cover both cases you have to edit two files. Open /usr/share/xsessions/blackbox.desktop in your editor (as root). Find the line that says "Exec=blackbox" and change it to "Exec=/usr/local/bin/BlackBox". Save the file. Next open /usr/share/switchdesk/Xclients.blackbox (which you will have if you have set blackbox up to work with switchdesk, see the wiki). Find the line which says "WM=blackbox" and change it to "WM=BlackBox". Make sure that /usr/local/bin is included in the path statement below this line. Save the file.
That's all there is to it. Now, when you start blackbox, xscreensaver and bbkeys will start as well.