Craig B. Agricola > X11-WM-Sawfish-0.03 > X11::WM::Sawfish

Download:
X11-WM-Sawfish-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

X11::WM::Sawfish - Perl extension for sending LISP forms to the sawfish window manager for processing.

SYNOPSIS ^

  use X11::WM::Sawfish;

  my $x = new X11::WM::Sawfish($display);

  $x->eval_form('(display-message "Foo")');

ABSTRACT ^

X11::WM::Sawfish implements the communication protocols used to connect to a running instance of the Sawfish window manager and send LISP forms for evaluation.

DESCRIPTION ^

The Sawfish window manager is designed around a LISP dialect implemented by librep. As such, configuration can be done with arbitrary LISP forms. This can be in the configuration files, or it can be submitted by external processes with two different communications schemes. The first is with simple UNIX domain sockets. The second scheme is to use the standard X11 properties mechanism to submit LISP forms for evaluation.

To use X11::WM::Sawfish, simply create an instance, which will connect to the Sawfish window manager running on the X server pointed to by the argument. If no argument is given, the $DISPLAY environment variable will be used. Then use the eval_form() method to submit LISP forms for evaluation. The scheme used for connection will by default be the UNIX domain socket scheme, unless that method fails (which will only happen if the X server is running on a remote machine) in which case it will fall back to the X properties scheme.

Keep in mind that by default, the X properties scheme is disabled by Sawfish for security reasons. To enable it, the LISP form (server-net-init) must be evalutated. Make sure that you have secured your X server before you do this, because if you don't, anyone can connect to your Sawfish process and execute arbitrary LISP forms, which would include the ability to execute arbitrary system commands.

Methods

new($display)

Creates a new X11::WM::Sawfish object which will connect to the Sawfish window manager that is running on the X server pointed to by the argument. If the argument is not given, the $DISPLAY environment variable will be used. If the connection is not able to be created, new will return undef and set $!.

eval_form($string)

Takes the LISP form represented by string and submits it to the librep running in the Sawfish process. The results are returned (as a string). If the connection has been closed, it will automatically be reopened.

open_socket()

Attempts to open a connection to the Sawfish process.

close_socket()

Attempts to close the connection to the Sawfish process.

ServerVersion()

Returns the version number returned by the server when the initial connection was made (during object construction).

SEE ALSO ^

sawfish(1), sawfish-client(1), X11::WM::Sawfish::UNIX, X11::WM::Sawfish::XProp

AUTHOR ^

Craig B. Agricola, <craig@theagricolas.org>

COPYRIGHT AND LICENSE ^

Copyright 2003 by Craig B. Agricola

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: