I used to use Devilspie 0.7 on Solaris 9 some time ago, but for some reason stopped - can't remember why.

Well, today I decided I'd compile Devilspie 0.10 to run on Solaris 10 on a SunRay as a normal bog standard user, and boy was it fun. As I've had so much fun, I thought I'd document it for anyone else who may be wanting to do the same thing.

GOAL: Compile and install Devilspie 0.10 in my home directory so that it would run on a Solaris 10 Sunray and workstation, using Gnome 2.6, without having to install any additional software over and above that already supplied with Solaris 10.

Well, I was almost 100% successful, I needed to install one app first. The following steps should help anyone compile Devilspie on Solaris 10.

1. Download the source code tarball - devilspie-0.10.tar.gz - and extract it to a directory of your choice.

Now this is the step that caused me to stray from the original goal - unforunately, Solaris 10 doesn't come with GOB-2 by default, so you need to compile it yourself. Don't worry, it's not very big and doesn't take very long.

2. Download the GOB-2 source code tarball - gob2-2.0.11.tar.gz - and extract it to a directory of your choice.

3. Compile and install GOB-2 using the usual "./configure, make and make" install steps. I also used the "--prefix" option to install it in my home directory.

4. Configure your path to include your custom install of gob2. Without gob2 in your path, make will fail with the following error:


Making all in src
tristate-dummy.gob
bash: tristate-dummy.gob: command not found
*** Error code 127
make: Fatal error: Command failed for target `tristate-dummy.c'

5. Configure Devilspie, but include the X11 libs as follows:


$ LIBS=-lX11 ./configure

If you forget the LIBS part, make fails with the following error:


/usr/sfw/bin/gcc -Wall -g -O2 -o devilspie tristate-dummy.o devilspie-matcher.o devilspie-matcher-windowname.o devilspie-matcher-always.o devilspie-action.o devilspie-action-debug.o devilspie-action-decorate.o devilspie-action-exec.o devilspie-action-hide.o devilspie-action-layer.o devilspie-action-opacity.o devilspie-action-resize.o devilspie-action-savegeometry.o devilspie-action-setgeometry.o devilspie-action-setwintype.o devilspie-action-setworkspace.o config-parser.o flurb.o devilspie.o xutils.o -lwnck-1 -lgtk-x11-2.0 -lstartup-notification-1 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lxml2 -lpthread -lz -lm -lsocket -lnsl -lpopt
Undefined first referenced
symbol in file
XMoveResizeWindow devilspie-action-setgeometry.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XGetWindowAttributes xutils.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XFree devilspie-action-opacity.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XSync devilspie-action-opacity.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XSendEvent xutils.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XGetWindowProperty devilspie-action-opacity.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XDeleteProperty devilspie-action-opacity.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XChangeProperty devilspie-action-decorate.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XQueryTree devilspie-action-opacity.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
XInternAtom xutils.o (symbol belongs to implicit dependency /usr/lib/libX11.so.4)
ld: fatal: Symbol referencing errors. No output written to devilspie
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `devilspie'

Make should complete successfully without any further errors.

6. Install Devilspie - make install.

That's it. You should now be able to use Devilspie as detailed in the README supplied with the tarball.

FYI: You can remove GOB-2 if you want. It's only needed for the compilation of Devilspie. You can remove it by running "make uninstall" from the gob2 source directory (gob2-2.0.11by default).