LWN.net Logo

Openbox: A lightweight window manager (Linux.com)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 2, 2006 23:37 UTC (Thu) by carlos (guest, #3066)
Parent article: Openbox: A lightweight window manager (Linux.com)

Is great to see that the world of window managers is as alive as ever! As a user of Enlightenment, Window Maker, Blackbox, etc... I am looking forward to try it.

<rant>

As an offtopic comment, we should have a really nice xdm, that every Linux/BSD/etc. distribution could use. Instead we have kdm, gdm and a very poor xdm.

We should gave a single xterm, supporting all our reasonable needs, used by everyone. Instead, we have KDE and GNOME terminals and a few more around.

We should have a really nice simple app to monitor laptop battery, that everyone could use, from KDE, GNOME, GnuStep, OpenBox. Instead KDE and Gnome implement their own versions.

One thing is KDE, GNOME to develop their own Desktop, or a few large projects as Koffice, Abiword, Gnumeric. Other entirely different thing is to develop everything under the sun in duplicate. What is more, most of these little duplicated apps are not easy to call from a command line, unless you happen to guess their names...

What's next? K window system competing with G Window system? K server against G server?

We should merge things as much as possible under the X umbrella, not creating a big, bloated digital divide for the future.

</rant>


(Log in to post comments)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 0:39 UTC (Fri) by grouch (guest, #27289) [Link]

"We should ..."

Please, have at it. No one is stopping you and statues will be erected in your honor if you create the projects in your wish-list. In the meantime, enjoy the bounty and variety of software that has been generously shared with the world by its developers.

Or would you enslave such generous developers and force them to follow your One True Path to software perfection?

Openbox: A lightweight window manager (Linux.com)

Posted Feb 4, 2006 23:40 UTC (Sat) by carlos (guest, #3066) [Link]

I wrote already more than 180,000 lines of GPL C code, so I am contributing my fair share :-)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 7, 2006 8:57 UTC (Tue) by grouch (guest, #27289) [Link]

Naturally, all of those contributed lines were within the rigid constraints and directed toward the goals you proposed above weren't they? Surely you didn't contribute to the chaos of variety.

You scratch your itch and I'll scratch mine and if they happen to coincide with the itches of other people, that's wonderful. Combine those efforts with the multitude of projects which are funded and directed, and you get the current multiverse of software solutions.

This is not a bad thing. It does not need correcting. It does not need artificial, dictated throttling to conform to some person or committee's idea of what software should accomplish.

There are a great many GPL text editors because people wanted to create a great many; each originator and maintainer felt a need that was not previously satisfied. There are not so many GPL operating system kernels because not so many felt a need to start one or advance one.

Your vision of limitation inherent in your "we should" rant does not match mine. Apparently, it doesn't match many others, either. Perhaps, someday, in each of the areas you want limited, a single solution will evolve that satisfies most needs. Chaotic variety will reign until that time.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 2:39 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

By all means, go ahead and do all these wonderful things. Please! :-)

A few notes though:

xterm has goals that are opposite of gnome-terminal and konsole. xterm is much smaller and faster than its modern counterpart because it lacks I18N support for anything that doesn't act like US-ASCII (left-to-right single-sized character cells).

gkrellm (which needs GTK libraries) provides a framework for simple monitoring applets including, among other things, laptop battery status. The really nice thing about gkrellm is that you can run 'for x in host1 host2 host3 host4...; do ssh -X -f $x gkrellm; done' and fill the screen with status monitors. I haven't figured out how to do something equivalent with GNOME or KDE panel applets (anyone?). My big gkrellm wish at the moment is a proper cpufreq control.

There's nothing that says you need all of KDE or GNOME with kdm and gdm. I have a machine connected to a TV set which runs GDM (for reliable password-less X session setup), ratpoison, xterm, screen (my wireless remote control is a laptop with WiFi and ssh connected to mplayer's controlling TTY), and sometimes mplayer. It works wonderfully, and I didn't have to install 90% of GNOME to do it.

<rant>

Isn't it interesting how any time someone mentions window managers on LWN, we get so many offtopic comments with them? ;-)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 5:40 UTC (Fri) by bk (guest, #25617) [Link]

xterm has goals that are opposite of gnome-terminal and konsole. xterm is much smaller and faster than its modern counterpart because ...

I think you have it backwards. xterm is actually heavyweight compared to GNOME Terminal et al because it supports all sorts of crazy graphical terminal black magic that nobody really cares about these days. rxvt grew out of frustration with xterm's perceived bloat, GNOME Terminal and Konsole are modern derivatives of that same basic idea.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 6:47 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

xterm *heavier* than GNOME Terminal? Now that's humor...

gnome-terminal: RSS 13MB of 30MB total, starts in 624ms from warm cache.
konsole: RSS 16MB of 31MB in 570ms.
rxvt: RSS 1.9MB of 3.2MB in 21ms.
xterm: RSS 3.1MB of 5.6MB in 80ms.

Experience with machines under memory pressure suggests that gnome-terminal and konsole *need* their double-digit megabytes of RAM to function, whereas an xterm can do without most of its resident set if it's not using the scrollback buffer.

The scary thing is that xterm is the fastest of all of them in actual use.
xterm's crazy graphical terminal black magic is harmless unless it receives the necessary escape codes to activate it. rxvt is missing some of xterm's display update optimizations, so although rxvt starts sooner, it takes longer to scroll and uses more bandwidth for partial display updates.

IMHO rxvt's segfaulting bugs and missing features are not worth the 0.1% of system RAM and 60ms per terminal window that would be saved by using it instead of xterm. 13 years ago I came to the same conclusion about rxvt and xterm for the same reasons, even though both xterm and rxvt were half the size then that they are now.

Both xterm and rxvt are visibly faster than their GNOME and KDE counterparts even on modern hardware. On 3-year-old machines the newer applications are almost unusable. On 5-year-old machines the word "almost" can be dropped--it takes seconds for one of these to open even with a warm cache, and display update is slow enough that the latency annoys me while using vi.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 8:00 UTC (Fri) by bboissin (subscriber, #29506) [Link]

Actually, I think urxvt (rxvt-unicode) is a good alternative to xterm/rxvt.
It is derived from rxvt codebase, it supports utf-8, Xft, transparency.
It can be run in client/server mode where a daemon is launched (urxvtd) and you can request a new term from the server with urxvtc.
It is very stable, I can't remember last time it crashed.

http://software.schmorp.de/pkg/rxvt-unicode.html

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 9:01 UTC (Fri) by niner (subscriber, #26151) [Link]

Actually on my 4-year-old-not-even-top-of-the-line-back-then machine konsole takes about one second to start from cache.
Starting konsole and exiting it takes 0.76 CPU seconds according to time.

But how did you measure those startup times? Looks nice.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 13:28 UTC (Fri) by bronson (subscriber, #4806) [Link]

You use the word "actually" as if you were disputing the original poster but your numbers are very close to his (760ms vs 570ms). So, I don't understand what you're trying to say.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 4, 2006 14:14 UTC (Sat) by niner (subscriber, #26151) [Link]

I dispute this sentence: "On 3-year-old machines the newer applications are almost unusable."

I can hardly say that on a 3-year-old machine konsole is almost unusable, when on an even older one it takes not even a second to start.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 10:20 UTC (Fri) by nix (subscriber, #2304) [Link]

Personally I switched from xterm to konsole a while back, for one reason: the tabbing is hard to live without, and the user-interface for it (and ability to use all X keybindings as shortcuts to it) knocks that part of screen(1)'s functionality into a cocked hat. konsole (and probably gnome-terminal) are *much* less memory-hungry than xterm if you measure, say, a konsole with ten shells open versus ten xterms.

(Why yes, I do have a lot of tabs in most of my konsoles.)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 12:02 UTC (Fri) by errare_est (guest, #14275) [Link]

I use xterm + fluxbox's tab grouping (you may choose any wm with that feature, AFAIK Openbox does it), and I defined the keys as konsole to switch between tab's...

BTW, My computer can't stand KDE as an enviroment, so konsole isn't an alternative. I know, I know, but starting konsole *without* KDE is a memory-hungry option.

--
Regards,
Germán (pronounce it as "Ghermawn" ;)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 9, 2006 4:56 UTC (Thu) by hughmerz (guest, #34252) [Link]

I use fluxbox + tabbing as well, ever since the tabs have been merged into the title bar instead of hanging off the window. Personally I prefer aterm rather than xterm, mainly for the transparancy.

Don't see much of a point in xdm/gdm/etc.. on a single user machine. startx + ~/.xinitrc have always worked for me.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 14:55 UTC (Fri) by zooko (subscriber, #2589) [Link]

If you like tabbed terms, you might love GNU screen

http://www.gnu.org/software/screen/

One of the many advantages is that it keeps your state even if you detach (such as logging out) and allows you to reattach over ssh from a different terminal. It also allows you to share your session with other users so they can see what you are doing and even type into your session.

Finally, it is fully keyboard driven, so your work isn't interrupted by groping for the mouse, wiggling it to find the pointer, then dragging the pointer over to the tab you want, then clicking, then moving your hand back to the keyboard where it can do useful work. Instead you just hit, for example, "control-a 0" to go to the first screen.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 20:14 UTC (Fri) by nix (subscriber, #2304) [Link]

I am also a GNU screen fanatic, but it doesn't understand the full panoply of keys on the keyboard, so you have to use key sequences everywhere. I use left-windows-key and cursor keys to switch virtual desktops, and left-windows-key and , and . to switch konsoles, sort of thing.

I tend to use screen for things I want to outlast my X session (e.g. XEmacs).

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 20:17 UTC (Fri) by zooko (subscriber, #2589) [Link]

Does that mean you are running XEmacs in tty mode instead of in X mode?

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 21:51 UTC (Fri) by nix (subscriber, #2304) [Link]

Nah: run it with -unmapped in a screen session and run gnuserv; then connect via gnuclients with DISPLAY set. Bingo, one XEmacs, multiple displays. :)

XEmacs does not have the strict `tty mode' / `X mode' distinction of Emacs of yore; you can have frames on multiple X servers and ttys at the same time.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 6, 2006 17:47 UTC (Mon) by zooko (subscriber, #2589) [Link]

I tried this, but couldn't figure out how to run gnuserv without a UI. So then I tried -nw to get the text-mode UI and run gnuserv-start, and then run gnuclient to create a GUI window.

Alas when the X server goes away then the xemacs server dies with an ugly internal error stack trace, which means I don't get the advantages of a "stable, persistent, remotely reachable" xemacs that I was hoping for.

I guess I could script gnuserv-start to run automatically, for example by appending it to my .xemacs/custom.el file. I'll try that...

Openbox: A lightweight window manager (Linux.com)

Posted Feb 6, 2006 17:50 UTC (Mon) by zooko (subscriber, #2589) [Link]

Okay, so I tried starting xemacs like this, inside screen.

xemacs -unmapped -eval "(gnuserv-start)"

This correctly started it without creating a window, and I was able to run gnuclient to connect to it and create windows. However, still when the X server goes away, the xemacs process dies with a traceback (appended). Too bad.

Fatal error (13).

Your files have been auto-saved.
Use `M-x recover-session' to recover them.

Your version of XEmacs was distributed with a PROBLEMS file that may describe
your crash, and with luck a workaround. Please check it first, but do report
the crash anyway. Please report this bug by invoking M-x report-emacs-bug,
or by selecting `Send Bug Report' from the Help menu. If necessary, send
ordinary email to `xemacs-beta@xemacs.org'. *MAKE SURE* to include the XEmacs
configuration from M-x describe-installation, or equivalently the file
Installation in the top of the build tree.

*Please* try *hard* to obtain a C stack backtrace; without it, we are unlikely
to be able to analyze the problem. Locate the core file produced as a result
of this crash (often called `core' or `core.<process-id>', and located in
the directory in which you started XEmacs or your home directory), and type

gdb /usr/bin/xemacs core

then type `where' at the debugger prompt. No GDB on your system? You may
have DBX, or XDB, or SDB. (Ask your system administrator if you need help.)
If no core file was produced, enable them (often with `ulimit -c unlimited'
in case of future recurrance of the crash.

Lisp backtrace follows:

# (condition-case ... . error)
# (catch top-level ...)

Openbox: A lightweight window manager (Linux.com)

Posted Feb 7, 2006 8:19 UTC (Tue) by nix (subscriber, #2304) [Link]

What version of XEmacs was this? There were bugs causing this until fairly recently (and if you use Lesstif or Motif there are unavoidable bugs in those toolkits that will cause these symptoms).

Openbox: A lightweight window manager (Linux.com)

Posted Feb 7, 2006 15:30 UTC (Tue) by zooko (subscriber, #2589) [Link]

XEmacs 21.4 (patch 18) "Social Property" [Lucid] (amd64-debian-linux) of Wed Dec 21 2005 on yellow

If I could get your e-mail address from lwn.net, then we could move this conversation to another forum. You could write to me at <zooko@zooko.com> if you like. Thanks for your help!

I'm not sure what toolkit I'm using for my xemacs -- it is packaged by Ubuntu. I suppose if I install "xemacs21-gnome-nomule" instead of "xemacs21-nomule" then I'll get one that uses Gtk. I'll try that. Thanks!

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 18:52 UTC (Fri) by astrophoenix (guest, #13528) [Link]

you, sir, should check out 'screen'! then you can have as many shells as
you want running in 1 xterm, rather than merely 1 shell per xterm.
seriously, check it out, it totally rocks.

and if you want to display more than one shell simultaneously, you can
either split screen's display, or you can run 2 xterms and attach to the
same screen session in each xterm.


xterm rules

Posted Feb 3, 2006 10:54 UTC (Fri) by eru (subscriber, #2753) [Link]

Another reason why xterm still is an improvement over all of its successors is that it has the most reliable terminal emulation of them all. With all others I have had glitches with some character-mode app or other, never with xterm. No doubt this is partly because it has been around for long and apps (and libraries like curses) take its behaviour into account, but it still means the "competition" is at disadvantage (xterm emulates xterm perfectly, others just try to be compatible with it...).

xterm rules

Posted Feb 3, 2006 17:29 UTC (Fri) by tjw.org (guest, #20716) [Link]

I could probably count on one hand the number of days in the past decade that I have NOT used xterm. It terms of PID's it has to be the binary i've run the most in my life. That's all well and good, but what is truly mind bogglingly amazing is that this is probably the ONLY piece of software that I have used regularly that has NEVER segfaulted on me.

/me knocks on his desk

xterm rules

Posted Feb 3, 2006 19:26 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

I suspect you may have run /bin/sh slightly more often... ;-)

xterm rules

Posted Feb 3, 2006 20:22 UTC (Fri) by tjw.org (guest, #20716) [Link]

Nope. I used to use tcsh, but switched to zsh a few years ago :)

Unless you're counting processes that the system runs, then I would have to concede that I run init more than anything else.

xterm rules

Posted Feb 3, 2006 21:29 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

Ah, yes, the numbers are a little different when $SHELL != /bin/sh. When $SHELL = /bin/sh, we can assume that all those little scripts that glue a Unix system together contribute to the front-runner's score, rather than a competitor's.

According to sa, my most popular executable at the moment is '")', closely followed by 'B)'. Is there some patch to acct that makes it work with 2.6 kernels, or am I missing something?

xterm rules

Posted Feb 3, 2006 20:20 UTC (Fri) by nix (subscriber, #2304) [Link]

It's even more amazing if you look at the code. Good grief but it's awful, despite Thomas Dickey's valiant attempts to clean it up.

(That's another reason I use konsole: it's a from-scratch reimplementation with all that horrible xterm grot ditched. xterm may as well be closed source because nobody human can understand it ;) )

xterm rules

Posted Feb 3, 2006 19:40 UTC (Fri) by oak (subscriber, #2786) [Link]

I think scratchbox.org people still have some kind of a "prize"
for the person who discovers why large (distro-sized) compilations
die in the middle (of compiling X window system) when starting them
from the gnome-terminal and why compilations succeeded when done
from the xterm or linux console...

(It wasn't lack of memory, the machines had 1GB of ram. Doubling
memory from 1/2GB to full 1GB halved the re-compile time.)

Btw. I have the dim recollection that xterm should support unicode
characters (but not bi-directional text etc. that gnome-terminal
supports).

xterm rules

Posted Feb 14, 2006 5:18 UTC (Tue) by roelofs (guest, #2599) [Link]

Btw. I have the dim recollection that xterm should support unicode characters (but not bi-directional text etc. that gnome-terminal supports).

It can; see the uxterm script, for example. But I believe the upstream comment was about variable-width Unicode fonts, and I'm not sure xterm really supports those. Then again, I've never tried...I like fixed-width. :-)

Greg

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 10:22 UTC (Fri) by nix (subscriber, #2304) [Link]

Well, actually, you can do what you point out with procmeter, too. procmeter doesn't look as cool, but if like me you have bars for critical machines and localhost running down the right hand side of your screen, you don't want to waste any of that valuable space with eye-candy pixels.

gkrellm & KDE

Posted Feb 3, 2006 16:58 UTC (Fri) by rfunk (subscriber, #4054) [Link]

I use gkrellm in icewm, but in KDE I use the "Dock Application Bar",
which allows me to use all the various WindowMaker applets for status
monitoring.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 6:04 UTC (Fri) by jwb (guest, #15467) [Link]

What's wrong with xdm? I find it surprisingly useful. I use it on a headless machine at home to host the rooted X11 server on my Macintosh, and I use another headless server with xdm at the office to serve a half-dozen guest computers via LTSP, and I also use xdm on my personal workstation. So far I haven't run into any situations where xdm has failed.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 6:53 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

The big feature I miss is in xdm support for logging into some account without prompting for a password first. kdm (from KDE up to and including 3.3 at least) can do this but not reliably (it often fails and gives the usual login dialog). xdm (unless someone added the feature while I wasn't looking) doesn't do this at all. gdm supports this and seems to get it right.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 9:08 UTC (Fri) by job (guest, #670) [Link]

You've got something backwards. XDM is a graphical getty, it's purpose is authenticating a user and starting X11 for them. If you don't want a login prompt you don't want to run XDM.

To log in a user automatically, remove XDM from your init scripts and start X11 su'ed to that user instead.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 10:01 UTC (Fri) by oblio (guest, #33465) [Link]

GDM, starting from the next version which will be released with Gnome 2.14, will be Gnome *free*. It will only depend on GTK2 (of course, if you use a binary distribution which decides that you do need the Gnome dependencies, you will still get them).
So GDM is the closest to a small, full-purpose display manager. Another could be Slim, and in another class, but could be used for the same purpose, is Qingy.

As for Openbox, it's XML config could be better, but you don't configure it every day... It's a wonderful little WM, for those who don't enjoy too much KDE or Gnome (like I do), and want something simple. In this category you have Xfwm4, E17, Flux/BlackBox, FVWM2, Oroborus, Golem, JWM, ... But every one of them has their advantages.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 13:17 UTC (Fri) by oblio (guest, #33465) [Link]

Oh, and I forgot, for a terminal, use something like Mrxvt-unicode.
Reasonable choice, I'd say :)
I believe that Mrxvt isn't much bigger than Xterm, and it surely has more features. Another way to go would be Terminal, from Xfce. Although is comes from Xfce, it doesn't require too many Xfce libs, and anyway, these libs are small.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 16:09 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

I do want to run an XDMCP server and I want xauthority set up properly on the local console. Both of these rule out simple startx or 'su user -c "X..."'.

Openbox: A lightweight window manager (Linux.com)

Posted Feb 4, 2006 10:16 UTC (Sat) by job (guest, #670) [Link]

I'm not sure I understand. You have a thin client using XDCMP login against a server, and you want it to log in automatically? Why is XDMCMP required then?

*dm

Posted Feb 3, 2006 16:59 UTC (Fri) by rfunk (subscriber, #4054) [Link]

When I don't want to use kdm or gdm, I find that wdm works well. It
certainly beats xdm.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds