Michael Albinus | 1 Jan 16:49 2010
Picon
Picon

Re: Remote filenames with non-ASCII chars and LC_ALL=C

Øyvind Stegard <oyvinst <at> ifi.uio.no> writes:

> Hello TRAMP developers,

Hi,

> I believe the default setting of "LC_ALL=C" in the
> `tramp-remote-process-environment' variable is causing problems for
> remote filenames with non-ASCII characters in them: Remote shell
> commands (at least 'ls') will simply replace all such chars with
> question marks when run under C locale with output to a terminal. I work
> primarily on hosts with UTF-8 as default locale encoding, but
> occasionally I have to edit remote files on systems which default to
> ISO-8859-1. The "LC_ALL=C" setting seems to break all non-ASCII setups,
> even when both local and remote system are using the same encoding (for
> instance local UTF-8 <--> remote UTF-8).
>
> IIRC, tramp worked properly with non-ASCII filenames in Emacs 22 by
> default, if both systems used the same locale encoding. This is not true
> for Emacs 23, that's why I'm reporting it here. Simply setting "LC_ALL="
> (explicitly unset the var) in the default remote process environment
> list makes things work again. (Curiously though, it wasn't enough to
> remove it from the list, I had to explicitly unset it. Maybe it's
> hardcoded somewhere else in tramp.el code as well.) I realise the
> variable is meant to be customized, so whatever "LC_ALL=C" fixes must be
> weighed against the fact that it breaks non-ASCII chars in filenames
> when it's there by default.

Recently, there was a discussion about the same topic. See
http://thread.gmane.org/gmane.emacs.devel/118789
(Continue reading)

Chris Withers | 4 Jan 10:14 2010
Picon

Re: editing a file on a remote host as root

Michael Albinus wrote:
> The "transit username" (my slang, sorry) is *also* a user on the remote
> host. Sudoing on another host is always done by two steps:
> 
> - Connect to the remote host with a username who is allowed to receive a
>   remote connection, by whatever method (ssh, rsh, telnet, ...). This
>   user I call "transit user".
> 
> - Inside that remote session, apply "su" or "sudo", as you like, to the
>   remote user you want to work as.
> 
> So there are two different users "in use" on the remote machine. Maybe a
> picture?
> 
>  +-----------+      +------------+
>  |           | ---> | transit <at>    |--+
>  | you <at>       | ssh  +------------+  | sudo
>  |           |      | user <at>       |<-+
>  +-----------+      +------------+
>    localhost          remotehost
> 
> In fact, this is needed only when the "remote user" cannot be accessed
> via the method used in the first step; otherwise you could just go this
> direct way.
> 
> Or, as you said, "when the transit username is the same as that of the
> user on the remote machine", you just apply ssh to that user on the
> remote host, and no sudo is needed at all.

Okay, I understand this now, but why does the (more sensible and 
(Continue reading)

Michael Albinus | 4 Jan 15:54 2010
Picon
Picon

Re: editing a file on a remote host as root

Chris Withers <chris <at> simplistix.co.uk> writes:

> Okay, I understand this now, but why does the (more sensible and
> explicit) option of doing:
>
> /transit <at> remotehost:sudo:user:/
>
> ...not work?

This syntax was used in Tramp 2.0. It has been obsoleted in Tramp 2.1.

> cheers,
>
> Chris

Best regards, Michael.
Chris Withers | 4 Jan 16:20 2010
Picon

Re: editing a file on a remote host as root

Michael Albinus wrote:
> Chris Withers <chris <at> simplistix.co.uk> writes:
> 
>> Okay, I understand this now, but why does the (more sensible and
>> explicit) option of doing:
>>
>> /transit <at> remotehost:sudo:user:/
>>
>> ...not work?
> 
> This syntax was used in Tramp 2.0. It has been obsoleted in Tramp 2.1.

So, what is the new syntax that has replaced it that enables me to get 
the same effect without the convoluted changing of config files?!

Chris

--

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk
Michael Albinus | 4 Jan 16:53 2010
Picon
Picon

Re: editing a file on a remote host as root

Chris Withers <chris <at> simplistix.co.uk> writes:

> So, what is the new syntax that has replaced it that enables me to get
> the same effect without the convoluted changing of config files?!

None. Use tramp-default-proxies-alist.

Maybe we can check your needs concretely; likely the configuration is
not such convoluted as it looks like.

Starting with Emacs 23.1.91/23.2 you could use eshell, which configures
tramp-default-proxies-alist silently in the background.

> Chris

Best regards, Michael.
Chris Withers | 6 Jan 12:02 2010
Picon

Re: editing a file on a remote host as root

Michael Albinus wrote:
> Chris Withers <chris <at> simplistix.co.uk> writes:
> 
>> So, what is the new syntax that has replaced it that enables me to get
>> the same effect without the convoluted changing of config files?!
> 
> None. Use tramp-default-proxies-alist.

Wow. Why was a nice clear and obvious syntax replaced with a bunch of 
mess in config files?

> Maybe we can check your needs concretely; likely the configuration is
> not such convoluted as it looks like.

It's certainly less explicit, and all roads appear to lead to needing 
several lines involving hard coding usernames in config files :-(

> Starting with Emacs 23.1.91/23.2 you could use eshell, which configures
> tramp-default-proxies-alist silently in the background.

I don't particularly like the look of eschell from what I've seen so 
far, but I guess I have to get used to it :-(

Also, bear in mind that Emacs 23 won't install on my Mac, so like many 
others, I use Aquamacs, which means the above doesn't currently help me...

Chris

--

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
(Continue reading)

Michael Albinus | 6 Jan 14:29 2010
Picon
Picon

Re: editing a file on a remote host as root

Chris Withers <chris <at> simplistix.co.uk> writes:

>>> So, what is the new syntax that has replaced it that enables me to get
>>> the same effect without the convoluted changing of config files?!
>>
>> None. Use tramp-default-proxies-alist.
>
> Wow. Why was a nice clear and obvious syntax replaced with a bunch of
> mess in config files?

http://thread.gmane.org/gmane.emacs.tramp/5883

>> Maybe we can check your needs concretely; likely the configuration is
>> not such convoluted as it looks like.
>
> It's certainly less explicit, and all roads appear to lead to needing
> several lines involving hard coding usernames in config files :-(

Let's try it. Seriously, I offer to support you.

> Chris

Best regards, Michael.
Martin Apel | 7 Jan 09:29 2010
Picon

Re: Problem saving modified tramp buffers

Hi Michael,

Michael Albinus wrote:
Martin Apel <martin.apel <at> simpack.de> writes:
I'm experiencing a problem with not being able to save buffers using tramp anymore. This used to work before, and I suspect that the network configuration changed somehow, which now irritates tramp, so it cannot save anymore. But this may also be a wrong track.
I don't believe so. Tramp tries to open the connection "/scp:apel <at> scp:", which simply does not exist. >From the traces it is not clear why it does. My guess is that you have set a wrong backup directory name or something like this. You can test this by starting "emacs -Q", and checking whether there are still problems.
Sorry for the delay on my side, I was on vacation.

Using 'emacs -Q' was a good tip. I finally found the culprit: I had added a line
(shadow-initialize)
in my .emacs file, which seems to cause the problem. File Shadowing and Tramp do not seem to get along well, I
already filed a bug report (#4846) for file shadowing in the emacs bug database. I tried to use file shadowing for files on a FTP server opened via Tramp.
I disabled file shadowing completely now, and saving tramp buffers works again.

Martin
_______________________________________________
Tramp-devel mailing list
Tramp-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/tramp-devel
mehul choube | 7 Jan 11:47 2010

Re: emacs hangs entering password

Hi Michael,

i am now able to view/edit files from pinky :-)

i am now using opensuse 11.2 as my desktop OS and the emacs is GNU Emacs
23.1.1 (i586-suse-linux-gnu, GTK+ Version 2.18.1). Also i had to put
bash command in the .cshrc on pinky.

Thanks,
Mehul

On 11/19/2009 12:05 PM, Mehul Choube wrote:
>>>> Have you set ´tramp-shell-prompt-pattern' this time? Tramp does not accept your "pinky [1]: "
prompt, again.
>>>>         
>>> My .emacs:
>>>
>>> (require 'tramp)
>>>
>>> (custom-set-variables '(tramp-verbose 10))
>>>
>>> (setq tramp-debug-buffer t)
>>>
>>> ;; (setq shell-prompt-pattern "[A-Za-z]* \[1\]: ")
>>>
>>> ;; (setq tramp-shell-prompt-pattern "\\(?:^\\| \\)[^:#$%>\n]*[:#$%>]
*\\(^[\\[[0-9;]*[a-zA-Z] *\\)*")
>>> ;;                                 "\\(?:^\\| \\)[^#$%>\n]*[#$%>] *\\(^[\\[[0-9;]*[a-zA-Z] *\\)*"
>>>
>>> (setq tramp-shell-prompt-pattern
>>>       (base64-decode-string
>>>        
>>> "XCg/Ol5cfA1cKVteOiMkJT4KXSpbOiMkJT5dICpcKBtcW1swLTk7XSpbYS16QS1aXSAqX
>>> Ckq"))
>>>       
>> Then I don't know what to do, without debugging. Sorry.
>>     
> Thanks man I really appreciate your effort.
>
>
>
> Thanks,
> Mehul
>
>
>
> _______________________________________________
> Tramp-devel mailing list
> Tramp-devel <at> gnu.org
> http://lists.gnu.org/mailman/listinfo/tramp-devel
>   
Michael Albinus | 7 Jan 13:45 2010
Picon
Picon

Re: Problem saving modified tramp buffers

Martin Apel <martin.apel <at> simpack.de> writes:

> Hi Michael,

Hi Martin,

> in my .emacs file, which seems to cause the problem. File Shadowing and
> Tramp do not seem to get along well, I
> already filed a bug report (#4846) for file shadowing in the emacs bug
> database. I tried to use file shadowing for files on a FTP server opened
> via Tramp.

Thanks for the hint, I didn't notice that bug. I've added "reworking
shadowfile.el" on my Todo list, but this has to wait until after the
23.2. release.

> Martin

Best regards, Michael.

Gmane