LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

Openbox: A lightweight window manager (Linux.com)

Posted Feb 3, 2006 2:39 UTC (Fri) by zblaxell (subscriber, #26385)
In reply to: Openbox: A lightweight window manager (Linux.com) by carlos
Parent article: Openbox: A lightweight window manager (Linux.com)

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? ;-)


(Log in to post comments)

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 (subscriber, #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 (subscriber, #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.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.