* enabling ido requires sudo authentication
@ 2010-03-23 6:20 Eric Abrahamsen
2010-03-23 8:35 ` Thierry Volpiatto
2010-03-24 2:34 ` Óscar Fuentes
0 siblings, 2 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2010-03-23 6:20 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I'm having a very weird problem: I recently switched from a Mac to
Ubuntu, and at some point during the tweaking and adjusting and fixing,
ido-mode started requiring my administrative password, via tramp. I have
ido turned on via the customize interface, and commenting out:
'(ido-mode (quote both) nil (ido))
in the customize variable list fixes the problem. It also turns off
ido-mode, obviously, and re-enabling it via M-x ido-mode once again
prompts for my sudo password (I see "Password for /sudo:root@mymachine:"
in the minibuffer).
My password entered, ido-mode is enabled and all is well. This leaves me
with an open buffer called *tramp/sudo root@mymachine*, the contents of
which is this single line:
(("`/etc/'") 155 0 0 1269322750.0 1269322641.0 1269322641.0 12288.0
"drwxr-xr-x" t 16386.0 -1)
This is deeply mysterious to me (I have no open file or dired buffers
under /etc/), but it sure looks meaningful and I hope someone here will
have a clue as to what's going on.
I have recentf and desktop-mode enabled; there are no root-owned files
in recentf or desktop, and while desktop's "file-name-history" variable
had some sudo files, setting that variable to the empty list and
restarting didn't change anything.
Any and all help appreciated!
Eric
GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) of
2009-09-27 on crested, modified by Debian
These are all my other ido-related customizations, I don't have any
non-customize ido variables set:
'(ido-auto-merge-work-directories-length -1)
'(ido-create-new-buffer (quote always))
'(ido-enable-flex-matching t)
'(ido-enable-tramp-completion nil)
'(ido-everywhere t)
'(ido-max-work-directory-list 10)
'(ido-mode (quote both) nil (ido)) ;this is requiring sudo
'(ido-record-ftp-work-directories nil)
'(ido-show-dot-for-dired t)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: enabling ido requires sudo authentication
2010-03-23 6:20 enabling ido requires sudo authentication Eric Abrahamsen
@ 2010-03-23 8:35 ` Thierry Volpiatto
2010-03-23 9:45 ` Juanma Barranquero
2010-03-24 12:24 ` Thamer Mahmoud
2010-03-24 2:34 ` Óscar Fuentes
1 sibling, 2 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2010-03-23 8:35 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Eric Abrahamsen <girzel@gmail.com> writes:
> Hi,
>
> I'm having a very weird problem: I recently switched from a Mac to
> Ubuntu, and at some point during the tweaking and adjusting and fixing,
> ido-mode started requiring my administrative password, via tramp. I have
> ido turned on via the customize interface, and commenting out:
>
> '(ido-mode (quote both) nil (ido))
>
> in the customize variable list fixes the problem. It also turns off
> ido-mode, obviously, and re-enabling it via M-x ido-mode once again
> prompts for my sudo password (I see "Password for /sudo:root@mymachine:"
> in the minibuffer).
>
> My password entered, ido-mode is enabled and all is well. This leaves me
> with an open buffer called *tramp/sudo root@mymachine*, the contents of
> which is this single line:
>
> (("`/etc/'") 155 0 0 1269322750.0 1269322641.0 1269322641.0 12288.0
> "drwxr-xr-x" t 16386.0 -1)
>
> This is deeply mysterious to me (I have no open file or dired buffers
> under /etc/), but it sure looks meaningful and I hope someone here will
> have a clue as to what's going on.
>
> I have recentf and desktop-mode enabled; there are no root-owned files
Are you sure?
If desktop-mode is enabled and you have a buffer like /etc opened as
sudo in your saved buffer in desktop, at each time you restart emacs,
desktop will open this buffer and you will be prompted for sudo
password.
So you have to kill these buffers before quitting emacs.
You can try to set `desktop-files-not-to-save', but it never worked for
me. :-(
So i use this:(add to .emacs)
,----
| (defun tv-list-tramp-buffer-file-name ()
| (let ((desktop-info-list (mapcar #'desktop-buffer-info (buffer-list))))
| (loop for i in desktop-info-list
| if (and (listp i)
| (stringp (car (nth 8 i)))
| (string-match "^/su:.*\\|^/sudo:.*\\|^/ssh:.*" (car (nth 8 i))))
| collect (nth 2 i))))
|
| (add-hook 'desktop-save-hook #'(lambda ()
| (let ((del-buf-list (tv-list-tramp-buffer-file-name)))
| (dolist (i del-buf-list) (kill-buffer i)))))
`----
> in recentf or desktop, and while desktop's "file-name-history" variable
> had some sudo files, setting that variable to the empty list and
> restarting didn't change anything.
>
> Any and all help appreciated!
>
> Eric
>
> GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) of
> 2009-09-27 on crested, modified by Debian
>
> These are all my other ido-related customizations, I don't have any
> non-customize ido variables set:
>
> '(ido-auto-merge-work-directories-length -1)
> '(ido-create-new-buffer (quote always))
> '(ido-enable-flex-matching t)
> '(ido-enable-tramp-completion nil)
> '(ido-everywhere t)
> '(ido-max-work-directory-list 10)
> '(ido-mode (quote both) nil (ido)) ;this is requiring sudo
> '(ido-record-ftp-work-directories nil)
> '(ido-show-dot-for-dired t)
>
>
>
>
>
>
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: enabling ido requires sudo authentication
2010-03-23 8:35 ` Thierry Volpiatto
@ 2010-03-23 9:45 ` Juanma Barranquero
2010-03-23 10:07 ` Thierry Volpiatto
2010-03-24 12:24 ` Thamer Mahmoud
1 sibling, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2010-03-23 9:45 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: help-gnu-emacs
On Tue, Mar 23, 2010 at 09:35, Thierry Volpiatto
<thierry.volpiatto@gmail.com> wrote:
> You can try to set `desktop-files-not-to-save', but it never worked for
> me. :-(
Could you please report that as a bug with M-x report-emacs-bug?
Juanma
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: enabling ido requires sudo authentication
2010-03-23 8:35 ` Thierry Volpiatto
2010-03-23 9:45 ` Juanma Barranquero
@ 2010-03-24 12:24 ` Thamer Mahmoud
1 sibling, 0 replies; 6+ messages in thread
From: Thamer Mahmoud @ 2010-03-24 12:24 UTC (permalink / raw)
To: help-gnu-emacs
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> If desktop-mode is enabled and you have a buffer like /etc opened as
> sudo in your saved buffer in desktop, at each time you restart emacs,
> desktop will open this buffer and you will be prompted for sudo
> password.
> So you have to kill these buffers before quitting emacs.
I think someone brought up this issue some time ago (either here on this
list or in EmacsWiki). Based on that discussion, I added the following
hook to my .emacs, and I no longer see a prompt at startup:
(add-hook 'desktop-save-hook 'tramp-cleanup-all-buffers)
I'm using the tramp version included in Emacs 23.
hth,
Thamer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: enabling ido requires sudo authentication
2010-03-23 6:20 enabling ido requires sudo authentication Eric Abrahamsen
2010-03-23 8:35 ` Thierry Volpiatto
@ 2010-03-24 2:34 ` Óscar Fuentes
1 sibling, 0 replies; 6+ messages in thread
From: Óscar Fuentes @ 2010-03-24 2:34 UTC (permalink / raw)
To: help-gnu-emacs
Eric Abrahamsen <girzel@gmail.com> writes:
> I'm having a very weird problem: I recently switched from a Mac to
> Ubuntu, and at some point during the tweaking and adjusting and fixing,
> ido-mode started requiring my administrative password, via tramp. I have
> ido turned on via the customize interface, and commenting out:
>
> '(ido-mode (quote both) nil (ido))
>
> in the customize variable list fixes the problem. It also turns off
> ido-mode, obviously, and re-enabling it via M-x ido-mode once again
> prompts for my sudo password (I see "Password for /sudo:root@mymachine:"
> in the minibuffer).
Somethig similar happened to me recently. The solution was to remove
$HOME/.ido.last That file keeps a history of visited files. I suspect
that if you ever visited a file as root via TRAMP, the fact is recorded
and when ido-mode is activated on the next emacs session somehow it
tries to access the file, or at least test for its existence, which
activates TRAMP.
There are other issues with ido-mode and TRAMP. For instance, sometimes
ido loads TRAMP for no reason, as in Windows the first time you enter a
path containing a colon. ido-mode has some variables for avoiding
loading TRAMP but they doesn't work on that case. I perused the source
code without success. I guess that ido invokes some generic facility
which is TRAMP-aware, that is, the problem is not in ido.el itself but
on some emacs API.
[snip]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-24 12:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-23 6:20 enabling ido requires sudo authentication Eric Abrahamsen
2010-03-23 8:35 ` Thierry Volpiatto
2010-03-23 9:45 ` Juanma Barranquero
2010-03-23 10:07 ` Thierry Volpiatto
2010-03-24 12:24 ` Thamer Mahmoud
2010-03-24 2:34 ` Óscar Fuentes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).