[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[eev] manpages from remote machines
From: |
Eduardo Ochs |
Subject: |
[eev] manpages from remote machines |
Date: |
Sat, 12 Apr 2008 08:00:41 -0300 |
Hi Xavier,
> Is there an easy way to the equivalent (find-man "blah") remotely
> instead of the current machine ?
>
> For the e-script needs I mentionned earlier, I typed my commands
> through eepitch-shell on a HP-UX commands which had different
> commands than the one I am using here.
>
> For example, (find-man "newfs") could not work on my notebook
> whereas it could have been on the remote host.
You can use something like this...
(defun find-netbsdman (manpage &rest rest)
(let ((buffername (format "*netbsdman: %s*" manpage))
(format-string "ssh address@hidden \"sh -c 'PAGER=cat man %s'\"")
(command (format format-string manpage)))
(apply 'find-eoutput-reuse
buffername
`(progn (insert (find-sh0 ,command))
(Man-fontify-manpage))
rest)))
Note that the name of the remote machine is fixed ("caramelo"),
and that you will need to be able to run commands on the remote
mahine using ssh without it asking for a password... this is what
I use to make ssh copy the adequate authorization keys:
# (find-man "1 ssh-copy-id")
# (find-man "1 ssh")
# (find-fline "~/.ssh/")
# (find-sh "locate ssh-copy-id")
# (find-fline "/usr/bin/ssh-copy-id")
ssh-copy-id -i ~/.ssh/id_rsa.pub address@hidden
ssh-copy-id -i ~/.ssh/id_rsa.pub address@hidden
And here are some definitions to make it easier to access files on
remote machines (here for dekooning, not for caramelo):
;; (find-dekooningfile "")
(code-c-d "dekooning" "/scp:address@hidden:/home/edrx/")
(defun eepitch-dekooning () (interactive)
(eepitch '(find-comintprocess "dekooning" "ssh address@hidden")))
(defun eexterm-dekooning ()
(eexterm "dekooning" "ssh address@hidden"))
;; (find-node "(tramp)Password caching" "`password-cache-expiry'")
(setq password-cache-expiry nil)
A subtlety: tramp doesn't like my default zsh prompt, so I
created a second login ("edrxbash") on dekooning with the same
uid and gid as "edrx"...
Cheers,
Edrx
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [eev] manpages from remote machines,
Eduardo Ochs <=