[xmonad] darcs patch: SshShell prompt

Matt Brown deadguysfrom at gmail.com
Tue Nov 4 12:35:06 EST 2008

On Sun, Nov 2, 2008 at 7:20 PM, Gwern Branwen <gwern0 at gmail.com> wrote:
> 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.

following the simple instructions from
http://www.linux.com/articles/54498, I saw a big improvement.  thanks
for the tip!  will document that in the source.

>> 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. :)

sounds good to me. I'll send a patch for that soon.

> - --
> gwern
> Version: GnuPG v1.4.9 (GNU/Linux)
> iEUEAREKAAYFAkkObekACgkQvpDo5Pfl1oKL4wCcDV2EwCrvIhdgh7D+yjV0jdYR
> UYIAmJMb5GU7/Aw+B34hMLXStbr7vPk=
> =6kGt


More information about the xmonad mailing list