![]() |
|
|
|
|
| 010011010110000101110100011101000010000001000010011101010111010001100011011010000110010101110010 | |
|
Core FluxboxTweaking the Fluxbox WM for Fedora Core 2
Author: M Butcher In this brief how-to, I want to walk through the process of installing and configuring Fluxbox on Fedora Core 2. I've used Fluxbox on many platforms, most of which have no issues whatsoever with Fluxbox. But because of Fedora Core's unique approach to starting the window manager, installing here can be be a bit of a hassle. NOTE: If you are looking for a solution to slow Fluxbox startup times (or weird XFS behavior during Fluxbox startup), then you should read this article. Section 4 provides an answer, but you may still need to read the rest to make sense of the answer. 1. Install FluxboxThe nice thing about FC is that package management is now much easier. Using yum, the installation of Fluxbox can be accomplished like this:yum install fluxboxTen minutes later, you should have fluxbox running. 2. Set Fluxbox as the default Window ManagerFrom Gnome or KDE, you can simply run the desktop-chooser program and select Fluxbox. Alternately, you can manually edit the .Xclients-[hostname]:[display] file in your home directory (the file is usually called .Xclients-localhost.localdomain:0). In the next section, we will look at custom editing of this file.3. The Xclients fileFor some reason, the author of the Switchdesk RPM* chose to start Fluxbox with the command 'fluxbox'. In some cases (such as .xsession configuration) this choice makes sense. But in a weird startup environment like Fedora Core, where many of the startup scripts are automatically generated, a better way to start Fluxbox is with the 'startfluxbox' command. 'startfluxbox' differs in one significant way: it uses a script located in ~/.fluxbox/startup to start fluxbox. In this script, you can do some customization of how Fluxbox starts. In the next section, we'll look at the startup script. Here, however, we'll look at the minor changes that needs to be made.Basically, you have two options. If you think that you'll never need to set another WM as the default, then you can simple edit your ~/.Xclients-[domain]:[display] file and be done with it. The downside to this approach is that the next time you run switchdesk (the desktop switching program), you will need to re-edit this file and repeat the same change. I guess that means you'll revisit this page more frequently, too, which might not be all bad. The second option is to edit the script that switchdesk uses to create your .Xclient files. Actually, this method is quite easy, but it will require root. Rather than editing .Xclients-[domain]:[display], just edit /usr/share/switchdesk/Xclient.fluxbox. It looks exactly the same as the one in your home directory. Changing this file will constitute a site-wide change. That is, any other users who choose Fluxbox with switchdesk will also have Fluxbox started with 'startfluxbox'. Unless they have chosen to customize their ~/.Xclients-[domain]:[display] file, though, this shouldn't be a problem. Regardless of the file you choose to edit, the only thing you have to do is change the two occurances of 'fluxbox' to 'startfluxbox'. Here's mine:
As you can see, the additions (highlighted in red) were very minor. (Note: If you changed the /usr/share/switchdesk/Xclients.fluxbox script, you will need to re-run switchdesk for you changes to take effect.) 4. The startup FileThe first time you run Fluxbox after these changes, it will automatically generate the file ~/.fluxbox/startup. The file doesn't do much by default. However, under FC2 you will want to make a few changes.First and foremost, you will want to work around the XFS/Fluxbox bug that makes startup painfully slow (2+ minutes on my machine -- compared to the six seconds that it now takes). Apparently, there is a character encoding discrepancy between FC2 and Fluxbox. The solution is to set the LC_ALL environment variable to C: export LC_ALL=CThe best place for this is in the starup file. Also, you may want to start xscreensaver**, which is not started by default. Make sure you stop the daemon when fluxbox exits. # to start: xscreensaver -no-splash & ... # to stop: xscreensaver-command -stopFinally, you may want to set the background to a particular file. Use fbsetbg to do this. You can either point it to a specific file (fbsetbg -c /path/to/image) or simply reload the last background (fbsetbg -l). Use 'man fbsetbg' for more information. Now for the example. Here's my ~/.fluxbox/startup file:
Essentially, what this script does is set a few environment variables, start xscreensaver, start fluxbox (assigning the pid to the $wmpid variable), set the background (fbsetbg -l) and start an instance of aterm (so that when it loads, I'll have a terminal window waiting), and then wait until the $wmpid process (fluxbox) exits. Once fluxbox exits, it terminates xscreensaver (xscreensaver-command -exit). Once you've made these changes, log in using GDM. Fluxbox should load in a couple of seconds. ConclusionAt this point, you should have Fluxbox running quite well on your system. From here, you should be able to customize things to your liking. Don't be afraid to tweak the startup script... just make sure you have a backup copy of a working version.Notes:* 'rpm -qf /usr/share/switchdesk/Xclients.fluxbox'** To configure xscreensaver in Fluxbox, run xscreensaver-demo from a terminal window (or put it in your .fluxbox/menu file). |
|
|||||||||||||||||||
Search |
|||||||||||||||||||||
|
Questions? Comments? Consulting Opportunities? Email matt at aleph-null.tv. This site and all of its content is Copyright © 2003-2005, Aleph-Null, Inc. All rights reserved. |
|||||||||||||||||||||