[xmonad] darcs patch: SshShell prompt

Gwern Branwen gwern0 at gmail.com
Sun Nov 2 22:20:16 EST 2008

Hash: SHA512

On Sun, Nov 2, 2008 at 10:05 PM, Matt Brown  wrote:
> Hello all,
> attached is a new module, XMonad.Prompt.SshShell, which allows you to
> launch X apps directly from xmonad (via passwordless ssh).  There are
> two prompts defined in this module:
> sshShellPrompt -- given a login (user at host), prompts for a program and
> arguments to run remotely
> sshSelectLoginPrompt --  prompts for a login, then creates an
> sshShellPrompt for that login
> This is adapted from XMonad.Prompt.Shell (as you might have guessed),
> by simply tweaking each function to use ssh where necessary.
> Completion works (both command and filename), with one caveat: for
> each completion (i.e., each keypress), a new ssh session is spawned.
> So it's pretty laggy (not too bad over lan, haven't tried yet for long
> latency connections).  Should be able to improve upon that by using
> spawnPipe, which I'll be working towards.

I'm not a ssh expert, but isn't there an OpenSSH feature called
'controlmaster' which is supposed to let you do the simple thing of
just opening up new ssh sessions while under the hood concatenating
them all into a single fast session? Maybe it'd be better to have the
user do that instead - it would let the code remain as simple as it is
now, and presumably it would benefit the user in all
non-XMonad-related activities.

> Another note:  I've copied two functions from XMonad.Prompt.Shell
> verbatim: escape, and isSpecialChar.  They aren't exported, and I
> didn't want to mess with Shell prompt in this patch.  I'll clean that
> up too later, if this patch is accepted.
> -matt

Yes, I think it would be a good idea to have those sorts of functions
in a common area - especially given the hard-wired information inside
'isSpecialChar'. But maybe not in XMonad.Util.*. How about
XMonad.Prompt? That is already something of a grabbag, and these
functions are being used in multiple prompt-related modules. :)

- --

Version: GnuPG v1.4.9 (GNU/Linux)


More information about the xmonad mailing list