@c -*- texinfo -*-

@chapter Frequently Asked Questions

@enumerate

@item Why is it now called @emph{Sawfish}?

Because the old name (@samp{Sawmill}) was already being used by another
company, who were in the process of registering it as a trademark.

The rename should be mostly painless, all old binaries still work for
the time being, but will be phased out over time. Where before you
would execute a program called @file{sawmill*}, replace it by
@file{sawfish*}. E.g. @file{sawmill} becomes @file{sawfish}, and
@file{sawmill-client} becomes @file{sawfish-client}.

Your @file{~/.sawmill} directory will automatically be renamed
@file{~/.sawfish} unless it would overwrite an existing file. Both
@file{~/.sawfishrc} and @file{~/.sawmillrc} will be checked currently
(though only one will be actually loaded).

My apologies for any inconvenience caused.


@item But why @emph{Sawfish}, and not <insert your favourite
alternative>?

Well I had to choose something! And hopefully it satisfies the main
requirements:

@itemize @bullet
@item There are no other computer-related users of the name (as checked
in April 2000,)

@item It's similar enough to the old name to hopefully carry some
recognition across,

@item It has no tenuous relationship to window-managing.
@end itemize


@item I installed Sawfish but it's not working!  All I see when I
start X is the default stipple background: no programs, no menus, no
pager.

This is exactly what it's supposed to do. Sawfish is a @emph{window
manager} and as such is not responsible for setting the background,
starting programs or displaying a pager---these can all be done using
separate applications (e.g. by using a desktop environment such as
GNOME).

The default menu binding is somewhat obscure; you must middle-click on
the background to bring up the menus. (If you have a two-button mouse,
try clicking both buttons simultaneously)

If, after reading this, you still think that sawfish isn't working,
please send mail describing the problem to the sawfish mailing list
@email{sawfish-list@@gnome.org}


@item How do I add customizations?

There are several files controlling this:

@table @file
@item ~/.sawfishrc
Hand written lisp code, loaded at startup. This is where almost all
explicit customization should be done.

@item sawmill-defaults
This lisp library is only loaded if there's no @file{.sawfishrc} file.

@item ~/.sawfish/custom
This stores customizations created by the configuration tool; it
shouldn't really be edited manually.

This file is loaded @emph{after} @file{sawmill-defaults}, but @emph{before}
@file{.sawfishrc}.
@end table


@item I created @file{.sawfishrc}, now things have changed?

If a @file{~/.sawfishrc} file exists, it prevents
@file{sawmill-defaults} from being loaded. But it's
@file{sawmill-defaults} that loads some of the common window manager
features, so add the line

@lisp
(require 'sawmill-defaults)
@end lisp

@noindent to your @file{.sawfishrc} file if you want to start with all
the standard features loaded.


@item What's this @code{sawfish-client} program?

This allows you to connect to a window manager process and evaluate
arbitrary Lisp forms. Do @samp{sawfish-client -?} for more details
(@samp{sawfish-client -} for a read-eval-print loop)

By default you can only connect from the host running the wm (through a
unix-domain socket). To enable the network based server, evaluate the
lisp form @code{(server-net-init)}.

Note however that this connects through the X server, meaning that
anyone who can open windows on your display can also execute any Lisp
code on the host running the window manager (and by extension,
@emph{execute any program}).

So @emph{don't} run the net server with X access control disabled
(unless you're not connected to a network)


@item How do I bind a key to execute a shell command?

Bind a key to the @samp{run-shell-command} command; remember to enter
the shell command you want to execute in the string entry in the
@samp{Edit binding} dialog window.


@item How do I make clicking on a window raise the window?

Bind the event @kbd{Button1-Click1} in the @code{window-keymap} to the
@code{raise-window-and-pass-through-click} command


@item How do I redefine the @samp{Applications} menu?

See the @samp{Popup Menus} node in the Info manual (@pxref{Popup
Menus})


@item How do I read the Info manual?

Either execute the command @samp{info sawfish}, or enter the Info mode
within Emacs (@kbd{C-h i}) and type @kbd{g (sawfish) RET}.

If you're using GNOME, then try executing @samp{gnome-help-browser
info:sawfish}.


@item How do I create a new theme?

See the @samp{Window Frames} node of the Info manual (@pxref{Window
Frames})

Basically though, create a directory @file{~/.sawfish/themes/@var{foo}}
where @var{foo} is the name of your theme. Then copy any images into
this directory and create a file @file{theme.jl} that will be loaded to
initialise the theme

The configuration tool will display the contents of a file called
@file{README} in the directory (but make it 80-column text, and only a
few lines)

Recent versions of sawfish include a program @code{sawfish-themer} that
allows simple themes to be created using a GTK+ interface. Ian McKellar
has created @code{GimpMill}:

@quotation
GimpMill is a GIMP plugin written in Python using James Henstrige's 
really cool Python GIMP bindings. It allows the construction of Sawmill
themes within The GIMP - extending the GIMP interface to allow theme 
creation like the GAP extends it to allow animation creation.
@end quotation

@noindent
GimpMill is available from @url{http://www.yakk.net/projects.gimpmill.html}


@item How do I port an Enlightenment theme to sawfish?

There's no automatic translation available. Get the images used in the
window border, then write a @file{theme.jl} file telling the window
manager how they are used to form a window frame

See the @file{themes/brushed-metal} directory for an example, and the
Info manual for the documentation


@item Are there any other themes available?

Thanks to those nice people at themes.org, there's now
@url{http://sawmill.themes.org/} for your theming pleasure


@item Why don't GTK themes work with sawfish?

There was a problem with older versions of the @code{gtk-engines}
package preventing engine based themes working with several interpreted
languages. Get the latest @code{gtk-engines} from
@url{ftp://ftp.gnome.org/}


@item Why don't you use GUILE?

Mainly because I'm lazy; I had already written rep, and therefore
understood it completely, whereas I have never used GUILE. Also, rep
has some features not available in GUILE (byte-code compilation,
autoloading, built-in event-loop, @dots{})

But before you flame me: yes I do think scheme is a more elegant
language


@item Will you add feature @var{x}?

Possibly. But only if it can be written in Lisp, or doesn't conflict
with the overall design aims.

These aims are to build a lightweight, generally applicable, set of
core window management functions, then write @emph{all} high-level
functionality as Lisp extensions


@item Will you add background setting?

No. This can easily be done by a separate application (e.g. with the
GNOME hints, simply monitor property @code{_WIN_WORKSPACE} on the root
window).


@item Is there a sawfish mailing list?

Yes. See @url{http://lists.gnome.org/mailman/listinfo/sawfish-list} for
subscription instructions and archived messages.


@item Is there a sawfish IRC channel?

From Ryan Pavlik @email{rpav@@mythosource.org}:

@quotation
Sawmill has an irc channel too! It's on EFNet, and called (of all
crazy things), #sawmill. So break out your irc clients, or hop on over
if you're already addicted. Theme, lisp, general sawmill, and most
other random discussion welcome.

If you need an EFNet server, check www.efnet.net for a listing.
@end quotation


@item Why does sawfish look weird/crash on Solaris?

Sawfish works stably on Solaris, but you may need to do two things:

@enumerate
@item
Disable use of MIT-SHM by Imlib (run the program @code{imlib_config},
the MIT-SHM option is on the @samp{Rendering} page)

@item
Recompile GTK+ using the @samp{--disable-xim} option to configure
@end enumerate


@item Why don't some windows ever get focused?

If you don't have the option `give focus to windows even when they
haven't asked for it' checked (group Focus/Advanced), then windows that
don't ask for focus don't get it.

Windows ask to receive focus by setting their WM_HINTS property
appropriately; for example if I xprop a gnome-terminal:

@example
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
                window id # of group leader: 0x5c00001
@end example


@item Why doesn't the GNOME desk-guide / tasklist show the true state
of my desktop?

It seems that there is a problem with these applets that only occurs
after restarting sawfish--they seem to lose track of the current window
states.

The simplest way to correct this is to execute the following shell
commands:

@example
$ save-session
$ killall panel
@end example

@noindent
(assuming you have a session manager to restart the panel afterwards!)


@item What do these @samp{bytecode-error} messages mean?

It means that you're trying to execute Lisp code that was compiled for
an outdated version of the Lisp virtual machine. Recompile any Lisp
files that you have installed locally.


@item How do I compile Lisp files?

Use the shell command:

@example
sawfish --batch -l compiler -f compile-batch @var{files@dots{}}
@end example

@noindent where @var{files@dots{}} are the names of the files you want
to compile. They will normally have @file{.jl} suffixes, the compiler
will create associated files with @file{.jlc} suffixes containing the
compiled Lisp code.


@end enumerate
