Desklaunch is a handy utility for X11 from the Oroborus Project. It allows you to put icons directly on your X root window, and then click on them to launch applications.

However, it doesn't really come with any icons. So you have to find or make your own. That's okay with most applications, as there are thousands of appropriate icons out there for launching things like web browsers and X terminals.

I put Desklaunch on my laptop, and I wanted to have icons to lock the screen, logout, restart & shutdown. I'm running the Oroborus window manager on the laptop, mainly because Oroborus is reasonably nice & low-memory, and my laptop's a 486. Oroborus doesn't have a root menu, so I run Desklaunch alongside, as running GNOME on a 486 is only slightly more enjoyable than slitting one's wrists. So anyway, maybe you would like my icons.

Here they are.

Desklaunch icon bar

That's what they look like on my laptop, anyway. In order to set things up so that your X11 desktop looks like mine, you have to do a few things.

First, my scripts depend on Desklaunch (obviously), xtoolwait, xlockmore (or xlock), gksu, and sudo (and maybe tcsh, although I think plain-vanilla csh ought to be fine - but I don't run it except when I really have to, and no scripts here have been tested on csh). They assume that users running X are listed in /etc/sudoers. You should be able to find all these pieces of software easily available on any Linux distribution or *BSD; I suspect that commercial UNIX systems also have them easily available (although the only one I use is OS X, and it doesn't need this kind of interface tweak.)

Here's the relevant parts of my .xsession:

osd_clock &
oroborus &
exec desklaunch

You can substitute your favourite window manager for Oroborus, and you don't need osd_clock, but I find it really handy. (It puts the time & date directly on the screen, no windows.) Or you can run without a window manager if you're obsessed, or maybe you have a 386. (Gadzooks.) The important thing though is that you exec desklaunch, instead of your window manager. This is a good thing for three reasons.

One: You can quit your window manager, and run something else, perhaps another window manager, in its place, with just simple kill commands.

Two: Desklaunch fights with the window manager a little bit if you boot the window manager after it. I have no idea why this is. Perhaps I should learn more about X. But anyway, desklaunch redraws its icons when you start the window manager, even if it has perfectly good icons on the screen anyway.

Three: The logout button kills desklaunch to logout. Thusly, desklaunch has to be the Process In Charge of X.

Here's the relevant parts of my .desklaunchrc:

icon=432:408:/usr/local/icons/icon1.lock.xpm:Lock:xlock
icon=480:408:/usr/local/icons/icon2.logout.xpm:Logout:desklaunch-logout
icon=528:408:/usr/local/icons/icon3.restart.xpm:Restart:gksudo --disable-grab --title "Restart" -m "Enter your password to restart" /sbin/reboot
icon=576:408:/usr/local/icons/icon4.shutdown.xpm:Shutdown:gksudo --disable-grab --title "Shutdown" -m "Enter your password to shutdown" /sbin/halt

That desklaunchrc puts the four icons down in the bottom right-hand corner of the screen, on a 640x480 display, which is - sadly - my laptop's maximum resolution. If you want them somewhere else, change the numbers, obviously. However, make sure that they're exactly 48 pixels apart, or they'll look funny.

You probably noticed the reference to desklaunch-logout. It's a csh script in my /usr/local/bin. Here's its contents:

#!/usr/bin/tcsh -f

kill `ps -l | tail -n 5 | head -n 1 | cut -c 16-21`

Soon, I will add a prompt to it. But not yet, sigh.

Note that this script has only been tested on Linux. It probably won't work on other platforms, due to variations in the way the ps command outputs. If in doubt, you can always use the command killall desklaunch in your .desklaunchrc - that'll work as long as you're only logged into one X session at a time (it'll kill all the desklaunch processes you own; if you've got 18 X sessions all running desklaunch, they'll all die at once :)

If you use startx to get into X, you may want to change the comment by Logout to something more appropriate, like Exit X. I use xdm.

The outlines of the icons were designed using Macromedia Flash, and output to a PNG. I then rendered a textured box up close in Strata 3DBase™ 3.5 (a now-discontinued promotional freeware raytracer for MacOS 9), and brought the Flash output into Macromedia Firewoks, where I then combined it with the TIFF that 3DBase made. Then I exported the PNG to XPM format using netpbm tools, and used jed to add transparency to the XPM (netpbm's PNG tools don't detect PNG transparency; as far as I know, the Macromedia tools are highly unusual in handling PNG transparency correctly, although most web browsers are now fine with it).

I have the four icons in a tarred gzip here. That should uncompress to four XPM files. You can stick them in /usr/local/icons and just use my scripts as is, or if you put them somewhere else, change the directory name in the .desklaunchrc.

If you would like to redesign them using my working files, here you go. Flash MX source Backdrop PNG Backdrop TIFF I don't seem to have kept the Strata model. Well anyway, it was just a cube with brick texture. :) Obviously you need Flash (which will only run on one *nix system in the world as far as I know, OS X) to edit the icons' outlines, but really, they weren't that hard to draw.

Made on a Mac Made with Macromedia Studio MX