I've been wanting a desktop calculator for some time. I'm sitting on the plane, trying to avoid real work, and decided to see if I could do this: 1. put a dc behind /srv/desk 2. start a rio in a window 3. window 1 becomes cat /srv/desk 4. other windows are stupid programs that, on mouse click, send text to /srv/desk. What they send is easily changed. voila. rpn calculator. Anyway, it's a hack right now, but I thought it might be fun for someone to take my hack and make it real or tell me that "it's already written" (that happens) or "here is a better way". Part of the goal is to show how to paste bits together with srv and such and make something go. So, step 1. put dc behind /srv/desk. What's a better way? #include #include void main(int, char **) { int fd, p[2]; pipe(p); fd = create("/srv/desk", OWRITE, 0666); fprint(fd, "%d", p[0]); close(fd); close(p[0]); dup(p[1], 0); dup(p[1], 1); execl("/bin/dc", "dc", 0); } step 2 you better know, as well as step 3. Step 4, attached, too much for inline. What the program (but.c) really ought to do is read //dev/text, but I don't know how to make that go. It reads /dev/label instead. So, to program a key, you can echo 8+p>/dev/label ./8.but And then you've got a "soft key" that can be anything you want, and you can change it at any time. I re-read /dev/label fd in the loop. You can obviously change the label external to the program. but.c shows the label value in the window. How to shrink the window down? How to get and LED font with demonic red color? My crude libdraw skills are probably pretty obvious. Anyway, I like the fact that I'm using a window manager and srv etc. to build a graphical calculator with soft keys in 1/10 the space that most X based calculators do it in. I would rather open a vein than try to do this in X11 -- I even tried using Glade once and it's hateful. thanks ron