Re: [dev] [dmenu] [patch] Display a multi-line text message before (or instead of) the prompt (was: xmessage replacement similar to dmenu)

From: Ciprian Dorin, Craciun <>
Date: Wed, 24 Nov 2010 21:36:20 +0200

On Wed, Nov 24, 2010 at 21:22, Moritz Wilhelmy <> wrote:
> Hi,
> If I see that correctly your dmenu can be either in "display message" or "menu"
> mode.

    Um. Not quite. As I've changed it, now it has a "classical-menu"
mode (just how it worked until now) and an
"explanatory-message-accompanied-menu" mode, in which the user also
has the ability to see an explanation (multi-lined) of what the menu
or choice is about.

    For example you could use it (And I actually intend to do this) to
implement an `sshpasswd` program that is used by the `ssh` client or
`ssh-agent` to interact with the user (assuming you use `ssh` from a
script and it can't directly interact with the user on tty). Thus if
I'm connecting to a server that doesn't have the key fingerprint
cached, it is going to ask me if it's ok (and the multi-line message
is the standard message written by `ssh`, but passed to the
`sshpasswd` tool), or if I'm using a key which needs confirmation it
should display me which ssh instance (pid, uid, gid, arguments, etc.)
is the one that wants to use the key. (This is not done by `ssh-agent`
but I can obtain this info by using `lsof` and the `ppid` of that

    Thus I will use `dmenu` from an `sshpasswd` compatible Bash script
just to interact with the user. I hope this clears my reasons, and why
dmenu is still used as a menu, but with a (mandatory needed)
elaborated message given to the user.

> I think you should rather split them into two single programs, one for
> displaying messages and the other one for being a menu.
> UNIX teaches us to do one thing well instead of clogging everything into a
> single binary. However, this is just my personal opinion.

    I completely agree with the UNIX KISS philosophy. But as I've
tried to explain above I'm not fusing two completely unrelated
behaviors in the same tool.

> Against which version
> of dmenu is the diff? tip? latest release?

    Ups. :) I've forgot to mention that. It's based on commit
a79e4a9cb167 from the official dmenu repository. (The head as of two
hours ago.)
changeset: 382:a79e4a9cb167
tag: tip
user: Anselm R Garbe <>
date: Sat Nov 20 09:25:08 2010 +0000
summary: Added tag 4.2.1 for changeset abb6579a324f

> Best,
> Moritz

Received on Wed Nov 24 2010 - 20:36:20 CET

This archive was generated by hypermail 2.2.0 : Wed Nov 24 2010 - 20:48:02 CET