Paul Northug | 1 Oct 2011 12:09
Picon

ctrl-c ctrl-c in shell or py-shell

If I am running an emacs shell or interactive python shell on the
local machine, I can use Ctrl-C Ctrl-C to interrupt something running
inside this shell.

However, if I do this on a shell running on a remote host through
tramp, Ctrl-C Ctrl-C kills the shell entirely rather than interrupting
the process running inside the shell as expected. Is there a way
around this behavior?

Thanks,
Paul.
Michael Albinus | 1 Oct 2011 13:28
Picon
Picon
Gravatar

Re: ctrl-c ctrl-c in shell or py-shell

Paul Northug <pnorthug <at> gmail.com> writes:

> If I am running an emacs shell or interactive python shell on the
> local machine, I can use Ctrl-C Ctrl-C to interrupt something running
> inside this shell.
>
> However, if I do this on a shell running on a remote host through
> tramp, Ctrl-C Ctrl-C kills the shell entirely rather than interrupting
> the process running inside the shell as expected. Is there a way
> around this behavior?

In short: no. This is a known problem, it belongs to the more general
problem how to send a signal to a remote process.

I'm sorry, but nobody has shown a possible solution (yet).

> Thanks,
> Paul.

Best regards, Michael.
Paul Northug | 8 Oct 2011 21:56
Picon

honoring gid of a directory for new file

When tramp is editing a new file over ssh, it does not seem to honor
the group id of the containing directory.

Here the directory is setgid to htpcgroup.

paul <at> htpc0:~/test$ ls -al

drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..

paul <at> htpc0:~/test$ touch test; ls -al

drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..
-rw-rw-r--  1 paul     htpcgroup    0 2011-10-08 13:42 test

But a new file created with tramp, test.tramp:

drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..
-rw-rw-r--  1 paul     htpcgroup    0 2011-10-08 13:42 test
-rw-rw-r--  1 paul     paul         3 2011-10-08 07:56 test.tramp

sshfs preserves the group id. Can this behavior be modified?

Thanks,
Paul.
Michael Albinus | 9 Oct 2011 11:01
Picon
Picon
Gravatar

Re: honoring gid of a directory for new file

Paul Northug <pnorthug <at> gmail.com> writes:

> When tramp is editing a new file over ssh, it does not seem to honor
> the group id of the containing directory.
>
> Here the directory is setgid to htpcgroup.
>
> paul <at> htpc0:~/test$ ls -al
>
> drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
> drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..
>
> paul <at> htpc0:~/test$ touch test; ls -al
>
> drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
> drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..
> -rw-rw-r--  1 paul     htpcgroup    0 2011-10-08 13:42 test
>
> But a new file created with tramp, test.tramp:
>
> drwxrwsrwx  9 htpcuser htpcgroup 4096 2011-10-08 13:41 .
> drwxrwsrwx 14 htpcuser htpcgroup 4096 2011-10-08 05:54 ..
> -rw-rw-r--  1 paul     htpcgroup    0 2011-10-08 13:42 test
> -rw-rw-r--  1 paul     paul         3 2011-10-08 07:56 test.tramp
>
> sshfs preserves the group id. Can this behavior be modified?

This is likely a mount option of sshfs (don't know). For new files,
Tramp uses the primary group of the user on the remote host. Similar as
applying "touch test" as user "paul" on the remote host.
(Continue reading)

Harry Putnam | 9 Oct 2011 16:37
Favicon

Cannot connect with tramp when ssh works

Setup:  Emacs-24 compiles with mingw
        Running on windows 7
        tramp version 2.2.1-pre
        plink version 0.60

I can connect to all machines on my lan but 1.  I use plink since ssh
  attempts from emacs have failed long ago.

  /plink:user <at> host:/

That works on all but 1.

That machine is a netbook running windows 7 starter.

On that one I get prompted for a password, It appears to be accepted
and tells me I'm connecting to HOST by way of plink, then the little
timer bar spins and spins 

I can connect to that same machine with ssh from a terminal anywhere
on the lan with no problem.

Plink fails in emacs/tramp and from a terminal.

When I try using the plink utility from a terminal to connect to the
problem machine, the password is rejected over and over.

First here is the ssh output from a terminal on the lan:

ssh harry <at> 192.168.0.147 "ls pym.txt"
  harry <at> 192.168.0.147's password: xxxxxxx <RET> 
(Continue reading)

Michael Albinus | 9 Oct 2011 16:57
Picon
Picon
Gravatar

Re: Cannot connect with tramp when ssh works

Harry Putnam <reader <at> newsguy.com> writes:

> Setup:  Emacs-24 compiles with mingw
>         Running on windows 7
>         tramp version 2.2.1-pre
>         plink version 0.60
>
> I can connect to all machines on my lan but 1.  I use plink since ssh
>   attempts from emacs have failed long ago.
>
>   /plink:user <at> host:/
>
> That works on all but 1.

I guess it connects with native PuTTY, doesn't it?

In this case, you might consider to use the Tramp method "plinkx", which
requires as host name the plink session name.

Best regards, Michael.
Harry Putnam | 9 Oct 2011 19:30
Favicon

Re: Cannot connect with tramp when ssh works

Michael Albinus <michael.albinus <at> gmx.de> writes:

> Harry Putnam <reader <at> newsguy.com> writes:
>
>> Setup:  Emacs-24 compiles with mingw
>>         Running on windows 7
>>         tramp version 2.2.1-pre
>>         plink version 0.60
>>
>> I can connect to all machines on my lan but 1.  I use plink since ssh
>>   attempts from emacs have failed long ago.
>>
>>   /plink:user <at> host:/
>>
>> That works on all but 1.
>
> I guess it connects with native PuTTY, doesn't it?

Yes

> In this case, you might consider to use the Tramp method "plinkx", which
> requires as host name the plink session name.

Not sure what that is or how it might look, can show a brief example
of what you mean?
Harry Putnam | 9 Oct 2011 19:32
Favicon

Re: Cannot connect with tramp when ssh works

Michael Albinus <michael.albinus <at> gmx.de> writes:

> In this case, you might consider to use the Tramp method "plinkx", which
> requires as host name the plink session name.

If you just mean:

/plinkx:harry <at> HOST:/

Then what happens there is it just keeps rejecting the password
Michael Albinus | 9 Oct 2011 19:36
Picon
Picon
Gravatar

Re: Cannot connect with tramp when ssh works

Harry Putnam <reader <at> newsguy.com> writes:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> Harry Putnam <reader <at> newsguy.com> writes:
>>
>>> Setup:  Emacs-24 compiles with mingw
>>>         Running on windows 7
>>>         tramp version 2.2.1-pre
>>>         plink version 0.60
>>>
>>> I can connect to all machines on my lan but 1.  I use plink since ssh
>>>   attempts from emacs have failed long ago.
>>>
>>>   /plink:user <at> host:/
>>>
>>> That works on all but 1.
>>
>> I guess it connects with native PuTTY, doesn't it?
>
> Yes
>
>> In this case, you might consider to use the Tramp method "plinkx", which
>> requires as host name the plink session name.
>
> Not sure what that is or how it might look, can show a brief example
> of what you mean?

In PuTTY, you save/load a session under a name, let's say
"host-session". In Tramp, you use then /plinkx:host-session:/
(Continue reading)

Sean Whitton | 10 Oct 2011 17:22
Gravatar

Re: TRAMP hanging on "Waiting for prompts"

Dear Michael,

On 30 Sep 2011 at 11:06Z, Michael Albinus wrote:

> I don't believe this is because of root permissions. Rather a
> configuration issue.

> Move your .profile and friends away. Move all of your files in .ssh/
> away, except the key file. Check permissions in /tmp. Log out. Log
> in. Try it again, with "emacs -Q".

> If that works, you can start to bring back the moved files, one after
> the other. By this, you could find out what's the problem.

After much messing about I have identified the culprit: the following
lines (or, I imagine, just one of them) in my .inputrc:

,----
| set completion-ignore-case on
| set completion-prefix-display-length 2
| Control-j: menu-complete
| Control-k: menu-complete-backward
| set show-all-if-ambiguous on
| set show-all-if-unmodified on
| set completion-map-case on
`----

I don’t use bash very often (zsh) so I’ve just commented them out for
now.  Thank you for all your help.

(Continue reading)


Gmane