On Thu, Nov 21 2002 at 05:42:19PM BRST, Kai Gro�johann
<[EMAIL PROTECTED]> wrote:
> Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> writes:
>
> > However, having to type "/[root@localhost]" is getting old faster
> > and faster :)
>
> Yes, indeed. Well, the most recent version of Tramp has a variable
> tramp-default-method-alist which allows you to configure some
> things. By default, root is the default user for the `su' method,
> for example, so /[su/localhost] should be enough.
>
> Oh, on XEmacs the default value is nil. Sorry.
Why is that?
> Then the host name may be empty, so that /[su/root@] might work. But
> don't count on it...
I did, and it worked! :)
Actually, I put in my ~/.xemacs/init.el (minus the comments):
; Setting tramp-default-method-alist won't work if tramp isn't already
; loaded
(require 'tramp)
; Default method
(setq tramp-default-method "sudo")
; Set defaults for "sudo" method
(add-to-list 'tramp-default-method-alist '("localhost" "root" "sudo"))
And then it works just like I suggested! "C-x C-f /[]/etc/fstab RET"
works like a charm :) Default method and, with it, its default user and
host. Hurra!
> And then, you can always do (setenv "X" "/[root@localhost]") and type
> C-x C-f $X/etc/passwd RET...
I must say, while this works perfectly, I don't think it's too
elegant. I'd use it, of course, except that the above worked :)
Anyway, I tested some more and, in comparison with what I originally
suggested, we have (with the above settigns):
/[]/etc/fstab -- works
/[sudo/]/etc/fstab -- works
/[sudo/root@]/etc/fstab -- works
/[sudo/localhost]/etc/fstab -- works
/[localhost]/etc/fstab -- works
/[root@]/etc/fstab -- DOESN'T work, I don't know why
5 out of 6, looks good for something I tought wasn't implemented yet
;)
Thanks a lot,
rbp
--
______________________________________________________________________
Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]>
http://www.linuxsp.org.br
GPG: <0x81F85A48> 7E62 9CA2 C95B FC86 B334 203E C011 2E4D 81F8 5A48
A Quantum Physicist is like a blind man in a dark room,
looking for a black cat that isn't there.
_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.nongnu.org/mailman/listinfo/tramp-devel