1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
User Extensible system.fvwm2rc For Debian GNU/Linux
-----------------------------------------------------------------------------
The Debian pre-packaged version of the Fvwm window manager (version 2)
comes with a custom system.fvwm2rc. It provides the following features:
o users can customize their environment without having to
copy system.fvwmrc
o Debian packages can install themselves into a menu
o users can also add to the menus
This README describes how the features of the Debian system.fvwmrc can
be used.
** Allowing user customization the right way
When fvwm starts, it reads in one of two configuration files: either the
user's own ~/.fvwm2rc, or the system wide /etc/X11/fvwm2/system.fvwm2rc.
(Paths given in this document are for a Debian Linux system. For most
other people, they are different.) As long as a user does not have their
own configuration file, their environment will change when system.fvwm2rc
is changed. This is good, because the system administrator can then
use system.fvwm2rc to set up a comfortable environment, with menus for
locally installed software, and so on.
If a user is not completely happy with the environment set up by
system.fvwm2rc, they can make any modifications they wish by copying
system.fvwm2rc to ~/.fvwm2rc, and then changing the file.
Unfortunately, their environment will no longer follow changes
in the system.fvwm2rc.
The problem can be solved in many ways. The new system.fvwm2rc in this
package does it by adding `hooks'. Hooks are extra files that a user
can create that modify the environment. This avoids the need for a
~/.fvwm2rc. Therefore, when system.fvwm2rc changes, a user's environment
will also change.
A bare bones version of this would be system.fvwm2rc that looked
something like the following:
Style "*" Color white/black
... other commands to set up the default environment ...
Read .fvwm2/post.hook
The last line is a command for fvwm to read in the file .fvwm2/post.hook
and execute all configuration commands in it. Now, if a user
needs to customize their environment, they can create the file
~/.fvwm2/post.hook, put any necessary commands there, and things will
work fine.
The bare bones version above is, however, slightly too simple. For
example, if system.fvwm2rc defines a main menu, which it usually does,
new entries can be added to it in .fvwm2/post.hook, but they will be
added to the end of the menu. This is awkward. Therefore, the new
system.fvwm2rc contains several other hooks. See later for a complete
list.
The system administrator has the same problem as a user. If he installs
a new version of fvwm, which comes with a new system.fvwm2rc, either
his local modifications will be lost, or the new stuff will be lost.
This new system.fvwm2rc solves the problem by duplicating each hook: the
system administrator also won't change system.fvwm2rc directly, but will
only add hooks.
-----------------------------------------------------------------------------
The hooks
For each hook, there is one version for the system administrator,
located in /etc/X11/fvwm2, and one for the user, located in ~/.fvwm2.
The system administrator hook is read in first.
The hooks are:
pre.hook
Commands to execute before any commands in system.fvwm2rc.
This is included mostly for completeness.
post.hook
Commands to execute after all other commands in
system.fvwm2rc. This is usually where most customization
is put.
init.hook
Additional commands for the InitFunction, which is
automatically executed by fvwm upon startup. This should
contain commands to start any programs you want to always
start, such as a welcome screen or an xterm.
The lines in init.hook should be "continuation lines"
for a function, such as:
+ "I" Exec xterm
See the fvwm2 manual page for details (the AddToFunction
command).
restart.hook
Similar to init.hook, but for the RestartFunction, which is
executed when fvwm is restarted.
init-restart.hook
Similar to init.hook and restart.hook, but these additional
commands will be added to both InitFunction and
RestartFunction. This is usually where commands to
start fvwm modules are placed.
main-menu.hook
Additional entries in the main menu. These entries
come after the auto-generated stuff, but before the
mandatory "Exit" entry. Each line in main-menu.hook
should be a continuation line for a menu definition
(see the fvwm2 manual page about the AddToMenu
command). For example:
+ "XTerm" Exec xterm
Note that main-menu.hook and init.hook (et al) have a
different, but very similar syntax.
main-menu-pre.hook
Same as main-menu.hook, but entries are added at the
very beginning of the menu. You will probably want to
add a separator line to the end of this, by using:
+ "" Nop
otherwise the menu looks silly.
menudefs.hook
The menu auto-generation stuff puts the generated
menus in this system-wide file. Therefore, any edits
the system administrator makes to this file will be
lost the next time "update-menus" is run, so don't
edit it. post-hook is probably the best place to put
extra menus.
background.xpm
background.jpg
background.gif
background.color
background.list
These files define the screen background (root window).
They are searched for in order, and only the first
one is used. (Also, for this case only, the user
hook is searched for before the system administrator,
because otherwise a user could not override the background).
background.xpm, background.jpg and background.gif
should be the graphic files themselves (or a symbolic
link to them).
The background.color file should contain one line that
gives the name of a color. The background will then
be set to that color.
The background.list file should be a list of
filenames, one per line. Each line specifies the path
to a jpg or gif format picture file. Paths can be
absolute (starting with '/'), or relative to the
user's home directory. The background will be set to
one of the pictures at random.
-----------------------------------------------------------------------------
For more details of the menu system, install the "menu" package, and
read /usr/doc/menu/README.
-----------------------------------------------------------------------------
Hints and tips
Configuring your pager
You can put *FvwmPagerXXX lines in the post hook to
reconfigure the pager to your liking: your options
will override the defaults provided. This is good
enough for most people.
Unfortunately, you can't easily change the number of
desks covered by the pager. This is because the pager
is started just after the post hook. If you want
multiple desks, you could wait for the appearance of
the pager, kill it, and start a new one configured to
you liking. You can do this by including something
like the following at the end of your init-restart
hook:
+ "I" Wait FvwmPager
+ "I" KillModule FvwmPager
+ "I" Module FvwmPager 0 3
|