On 22-Feb-2002 Andy Kopciuch wrote:
> Hi,
>
> With the recent session management/bblaunch discussion, I did some playing
> around.
>
> I can use bblaunch for say aterm in workspace 4
>
> bblaunch -w 4 aterm
>
> That works fine, but when I use a KDE application, it fails
>
> bblaunch -w 4 konsole
>
> I get this error:
> "Warning: XGetCommand can't allocate enough memory"
>
note it is a warning, not an error. What is actually happening is the bblaunch
code is rather sloppy. The fix is easy.
diff -pruN bblaunch-0.0.1/bblaunch.c bblaunch-0.0.1.shaleh/bblaunch.c
--- bblaunch-0.0.1/bblaunch.c Wed Mar 14 18:03:38 2001
+++ bblaunch-0.0.1.shaleh/bblaunch.c Fri Feb 22 11:32:03 2002
@@ -1,4 +1,6 @@
#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
#include <unistd.h>
#include <stdlib.h>
@@ -83,6 +85,7 @@ int main (int argc, char **argv)
if (event.xclient.message_type == bbsma)
if ((Atom) event.xclient.data.l[0] == bbwinadd)
{
+ if (event.xclient.data.l[1] == bblwin) continue;
leader = getleader(display,(Window)event.xclient.data.l[1])
;
if ((int)leader)
{
The reason it is complaining is because it tries to read its own window which
does not have all of the hints set.
The message is spurious anyways. What is actually happening is the string
bblaunch is looking for does not exist, but the function it calls returns 0 for
any failure so it thinks it is out of memory.