root権限でファイルを開けません。
Find file: /sudo::/etc/hosts すると
Process *tramp/sudo root@ubuntu-virtualbox* exited abnormally with code 255
というエラーが出て開けません。
/su::/etc/hosts でも同様です。
端末では sudo も su もできます。
Emacs内でリモートファイルをsshで開くこともできます。
/nannde@example.com:/etc/hosts =>OK
どこが間違っているのでしょうか?
Ubuntu 9.04
Emacs 23.0.91.1
tramp 2.1.15
参考
http://q.hatena.ne.jp/1220192864
http://www.gnu.org/software/tramp/tramp_ja-emacs.html#Inline-methods
ではお言葉に甘えまして。
無事に解決したようで何よりです。
------
Debugger entered--Lisp error: (file-error "Process died")
signal(file-error ("Process died"))
completion--some(#[(table) "Ä \n$" [action table string pred complete-with-action] 5] (completion--embedded-envvar-table completion--file-name-table))
#[(G83807 string pred action) "ÁÂJ\"" [G83807 completion--some #[... "Ä \n$" [action table string pred complete-with-action] 5]] 3](--tables-- "/sudo::/etc/hosts" nil lambda)
apply(#[(G83807 string pred action) "ÁÂJ\"" [G83807 completion--some #[... "Ä \n$" [action table string pred complete-with-action] 5]] 3] --tables-- ("/sudo::/etc/hosts" nil lambda))
read-file-name-internal("/sudo::/etc/hosts" nil lambda)
test-completion("/sudo::/etc/hosts" read-file-name-internal nil)
minibuffer-complete-and-exit()
call-interactively(minibuffer-complete-and-exit nil nil)
completing-read("Find file: " read-file-name-internal nil confirm-after-completion "/su:root@ubuntu-virtualbox:/" file-name-history "/su:root@ubuntu-virtualbox:/")
read-file-name("Find file: " nil "/su:root@ubuntu-virtualbox:/" confirm-after-completion)
find-file-read-args("Find file: " confirm-after-completion)
byte-code("ÀÁÂ \"" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
call-interactively(find-file nil nil)
バッファの内容はどのようになっていますか?
気づくの遅れてすみませんm(_ _)m
*Messages*
----------
Tramp: Opening connection for root@ubuntu-virtualbox using sudo...
Tramp: Waiting 60s for local shell to come up...
Tramp: Sending command `ssh ubuntu-virtualbox -q -e none && exit || exit'
Tramp: Waiting for prompts from remote shell
File error: Process died
Entering debugger...
----------
*tramp/sudo root@ubuntu-virtualbox*
------------
Process *tramp/sudo root@ubuntu-virtualbox* exited abnormally with code 255
------------
という感じです。
お気づきの点、ご助言いただければ幸いです。
(progn (require 'tramp)
(assoc "sudo" tramp-methods))
を評価 (C-j) すると何が返って来ますか?
↓が返りました。
("sudo" (tramp-login-program "sudo")
(tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:")))
(tramp-remote-sh "/bin/sh")
(tramp-copy-program nil)
(tramp-copy-args nil)
(tramp-copy-keep-date nil)
(tramp-password-end-of-line nil))
お付き合いありがとうございます m(__)m
$ ssh localhost
#=> Connection refused
sshサーバを起動させてないとrootで開けない
ということでしょうか?
ssh を起動しようとしてるところがおかしいという所までは
分かるのですが、そうなる理由が残念ながら分かりませんでした。
古いtrampや古いEmacsでバイトコンパイルされたファイルが混ざっていたり、
何か特殊な設定はされていないでしょうか?
探してみます。
おっしゃるとおりでした。
tramp関係の設定をはずして試したら見事大成功しました。
ありがとうございました。
お礼させていただきたいので、「回答」に何か送っていただけませんでしょうか?
内容は無くてかまいませんので。