1 Frequently Asked Questions
****************************

See also `http:://sawfish.wikia.com/wiki/Tips'.

  1. How can I get information on Sawfish?

        * Homepage: `http://sawfish.wikia.com/'.

        * Mailing list: Please subscribe at
          `http://mail.gnome.org/mailman/listinfo/sawfish-list'. You
          can browse the archives at
          `http://mail.gnome.org/archives/sawfish-list/'.

        * IRC: Join `#sawfish' on `irc.freenode.net'.

  2. How do I read the Info manual?

        * From root menu (middle click the background), choose `Help'
          section.

        * Execute the command `info sawfish'

        * In emacs, enter the Info mode (`C-h i') and type `g (sawfish)
          RET'.

        * If you're using GNOME, then try executing `gnome-help-browser
          info:sawfish'.

  3. 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, but first try
     middle-click (by default) on the background. This invokes the
     menu. (If you have a two-button mouse, try clicking both buttons
     simultaneously).

     Why this is so? Because Sawfish is minimal - Sawfish is a _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).

  4. How do I customize Sawfish?

     There're two ways, by the configurator GUI and by preparing lisp
     code. The GUI can be run by middle-clicking background ->
     "Customize". Most customizations similar to other window managers
     can be done through GUI.

     For customizations by lisp, first understand that in the startup,
     files `~/.sawfish/custom', `.sawfishrc' are read in this order.

    `~/.sawfish/custom'
          This file is created and edited by the configurator GUI, and
          stores customizations. It shouldn't really be edited manually.

    `~/.sawfish/rc'  or `~/.sawfishrc'
          This is the file you edit. It is a hand written lisp code,
          and almost all explicit customizations should be done here.

          Choose the filename either `~/.sawfish/rc' or `~/.sawfishrc'.
          The former is recommended, because the directory `~/.sawfish'
          is anyway created to store `custom', and you can also put
          other lisp scripts, like user-contributed codes there.

          Sawfish < 1.6 reads `sawfish-defaults' by default only if
          `~/.sawfishrc' lacks, but now it is always read.

  5. How can I start an application from Sawfish?
        * From a key
          Bind a key to the `run-shell-command' command. In the
          configurator, you can enter the command name at the same time.

        * From lisp
          The function `system' invokes a shell. Don't forget to add "&"
          not to block the Sawfish execution.
               (system "firefox doodle.com &")

        * At Sawfish startup
          You can use lisp, but you don't have to. Simply execute it
          from, say, `.Xclient' or any file. See the above item "How do
          I customize Sawfish?" for lisp customization.

  6. How do I make clicking on a window raise the window?

     Bind the event `Button1-Click1' in the `window-keymap' to the
     `raise-window-and-pass-through-click' command

  7. How do I redefine the `Applications' menu?

     See the `Popup Menus' node in the Info manual (*note Popup Menus::)

  8. How do I compile Lisp files?

     Use the shell command:

          sawfish --batch -l compiler -f compile-batch FILES...

     where FILES... are the names of the files you want to compile.
     They will normally have `.jl' suffixes, the compiler will create
     associated files with `.jlc' suffixes containing the compiled Lisp
     code.

     Remember that always the latest code is read, i.e., if the source
     is newer than the byte compiled file, the source is used, unlike
     emacs.

  9. How do I create a new theme?

     See the `Window Frames' node of the Info manual (*note Window
     Frames::)

     Basically though, create a directory `~/.sawfish/themes/FOO' where
     FOO is the name of your theme. Then copy any images into this
     directory and create a file `theme.jl' that will be loaded to
     initialize the theme

 10. 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 `theme.jl' file telling the window
     manager how they are used to form a window frame

     See the `themes/brushed-metal' directory for an example, and the
     Info manual for the documentation

 11. Are there any other themes available?

     Yes, there are plenty actually. Most of them reside over at
     freshmeat: `http://themes.freshmeat.net/browse/926/'.  You can
     also take a look at the Themes section on the Sawfish website:
     `http://sawfish.wikia.com/wiki/Themes'.

 12. Why don't GTK themes work with Sawfish?

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

 13. Sound support.

     Here we explain sound support which can't be set via Configurator.

     You can add sound files under `~/.sawfish/sounds/'. This path can
     be changed with `audio-load-path' variable. See the file `OPTIONS'
     for the format.

     The program to play sounds is set by `play-sample-program'. If you
     want to pass arguments or redirect the output, prepare a wrapper
     script, for example something like following:

          #!/bin/sh

          # No need of backgrounding.
          mplayer -volume 30 "$1" &>/dev/null

 14. What's this `sawfish-client' program?

     This allows you to connect to a window manager process and evaluate
     arbitrary Lisp forms. Do `sawfish-client -?' for more details
     (`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 `(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,
     _execute any program_).

     So _don't_ run the net server with X access control disabled
     (unless you're not connected to a network).

 15. How do I restart Sawfish?

     From a shell lauch the following command: `sawfish-client -q -f
     restart'

 16. Shutdown privilege.

     The Sawfish root-menu has a "session" sub-menu which allows you to
     shutdown your machine. If you use GNOME or KDE, no additional work
     is required. But if you use Sawfish standalone, the user needs the
     privilege to execute `shutdown' command.

     You can do it, for example, with `sudo' combined with user group
     `shutdown':

          $ groupadd shutdown      # add a new group called "shutdown"
          $ adduser john shutdown  # add user "john" to the "shutdown" group
          $ visudo                 # add the group "shutdown" to sudoers

          # add the following:
          %shutdown ALL=(root) NOPASSWD: /sbin/shutdown

     That's it, now everyone in the `shutdown' group can do it!

 17. I have multiple heads. Is it possible to switch workspace per head?

     You have to devise a trick, because the strict answer is no.
     There's "sticky-head" script which partly achives it on the wiki,
     but it's still incomplete:
     `http://sawfish.wikia.com/wiki/Sticky-head'

     Technically, Sawfish's workspace implements "virtual desktop"
     specified in the window manager standard (ewmh), which has to be
     at least the size of the X screen, so the workspace has to containt
     all heads. "Per head workspace" has to be implemented as a new
     mechanism on top of workspace.

 18. How can I hide the mouse pointer when idle?

     Install "unclutter".

 19. Why don't you use GUILE or other languages?

     (Current Sawfish community's attitude.)

     We can't afford it. We're understaffed.

     (Written by John Harper.)

     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, ...)

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

 20. Will you add feature 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 _all_ high-level
     functionality as Lisp extensions

 21. Will you add background setting?

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

 22. Why does Sawfish look weird/crash on Solaris?

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

       1. Disable use of MIT-SHM by Imlib (run the program
          `imlib_config', the MIT-SHM option is on the `Rendering' page)

       2. Recompile GTK+ using the `--disable-xim' option to configure

 23. Why don't some windows ever get focused?

     Because that window doesn't accept it. Technically, windows ask to
     receive focus by setting their WM_HINTS property appropriately; for
     example if I xprop a gnome-terminal:

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

 24. 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:

          $ save-session
          $ killall panel

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

 25. What do these `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.

 26. Historical question: Why is it now called _Sawfish_?

     Because the old name (`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 (final
     phasing out started around 1.5.0). Where before you would execute
     a program called `sawmill*', replace it by `sawfish*'. E.g.
     `sawmill' becomes `sawfish', and `sawmill-client' becomes
     `sawfish-client'.

     Your `~/.sawmill' directory will automatically be renamed
     `~/.sawfish' unless it would overwrite an existing file. Only user
     configuration `~/.sawfish[/]rc' will be checked currently,
     `~/.sawmillrc' is not used anymore (it was also read up to version
     1.3.5).

     My apologies for any inconvenience caused.

 27. Historical question: But why _Sawfish_, and not <insert your
     favourite alternative>?

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

        * There are no other computer-related users of the name (as
          checked in April 2000,)

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

        * It has no tenuous relationship to window-managing.

     Incidentally, there was no meaning to the name "Sawmill", the
     author grepped `/usr/dict/words' for something containing "wm".


