Re: Connect to the ssh and execute any command

2013-10-07 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael,

Hi Andrey,

 Please send me lisp/Makefile.

 Attached to this mail.

Hmm. Still doesn't tell me what's up. Everything looks fine.

OK, let it be for the time being. We could recheck later.

 Yep. And you haven't sent the traces level 6. If you would send them, I
 could analyze.

 Sorry. I attached it also.

No, you haven't. If tramp-verbose is set to 6, a buffer
*debug tramp/...* will be created. If I ask for traces (now and in the
future), I need the full contents of this buffer.

 Best regards,
 Andrey.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-07 Thread Andrey Tykhonov
On Mon, Oct 07, 2013 at 08:46:52AM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
  Hi Michael,
 
 Hi Andrey,

Hi Michael,

 
  Please send me lisp/Makefile.
 
  Attached to this mail.
 
 Hmm. Still doesn't tell me what's up. Everything looks fine.
 
 OK, let it be for the time being. We could recheck later.

Ok

 
  Yep. And you haven't sent the traces level 6. If you would send them, I
  could analyze.
 
  Sorry. I attached it also.
 
 No, you haven't. If tramp-verbose is set to 6, a buffer
 *debug tramp/...* will be created. If I ask for traces (now and in the
 future), I need the full contents of this buffer.

Ah ok. 
I believed that everything puts to the *Messages* buffer. So I attached full 
outputs of *debug tramp/...* to this mail. In eshell I just did:

cd /ssh:username@hostname:/data/bin/

and then

ls -la


Best regards,
Andrey

 
  Best regards,
  Andrey.
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-07 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael,

Hi Andrey,

 So I attached full outputs of *debug tramp/...* to this mail.

I don't see it.

 Best regards,
 Andrey

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-07 Thread Andrey Tykhonov
On Mon, Oct 07, 2013 at 11:29:19AM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
  Hi Michael,
 
 Hi Andrey,
 
  So I attached full outputs of *debug tramp/...* to this mail.
 
 I don't see it.

Hi Michael,

I'm sorry. Now attached.


Best regards,
Andrey.

 
  Best regards,
  Andrey
 
 Best regards, Michael.
;; GNU Emacs: 24.3.1 Tramp: 2.2.6-24.3 -*- mode: outline; -*-
08:43:58.463949 tramp-maybe-open-connection (3) # Opening connection for 
username@hostname using ssh...
08:43:58.477537 tramp-maybe-open-connection (6) # /bin/sh -i
08:43:58.478821 tramp-wait-for-regexp (6) # 
#$ 
08:43:58.480142 tramp-maybe-open-connection (3) # Sending command `exec ssh -l 
username  -o ControlPath=/tmp/tramp.14312iAH.%r@%h:%p -o ControlMaster=auto -e 
none hostname'
08:43:58.480605 tramp-send-command (6) # exec ssh -l username  -o 
ControlPath=/tmp/tramp.14312iAH.%r@%h:%p -o ControlMaster=auto -e none hostname
08:43:58.484366 tramp-process-actions (3) # Waiting for prompts from remote 
shell...
08:43:58.971221 tramp-process-one-action (5) # Looking for regexp \(.*ogin\( 
.*\)?: *\)\' from remote shell
08:43:58.971865 tramp-process-one-action (5) # Looking for regexp 
\(^.*\([pP]assword\|[pP]assphrase\).*:? *\)\' from remote shell
08:43:58.972300 tramp-process-one-action (5) # Looking for regexp 
\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification 
failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported 
authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try 
again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal 
[0-9]+\).*\)\' from remote shell
08:43:58.972770 tramp-process-one-action (5) # Looking for regexp \(^[^#$%
]*[#$%] *\)\' from remote shell
08:43:58.973177 tramp-process-one-action (5) # Looking for regexp \(\(?:^\|
\)[^]#$%
]*#?[]#$%] *\(\[[0-9;]*[a-zA-Z] *\)*\)\' from remote shell
08:43:58.973658 tramp-process-one-action (5) # Looking for regexp \(\(Are you 
sure you want to continue connecting (yes/no)\?\)\s-*\)\' from remote shell
08:43:58.974204 tramp-process-one-action (5) # Looking for regexp 
\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels 
connectio\)n)\)\s-*\)\' from remote shell
08:43:58.974608 tramp-process-one-action (5) # Looking for regexp \(\(TERM = 
(.*)\|Terminal type\? \[.*\]\)\s-*\)\' from remote shell
08:43:58.974995 tramp-process-one-action (5) # Looking for regexp \(\)\' from 
remote shell
08:43:58.975409 tramp-process-one-action (5) # Call `tramp-action-process-alive'
08:43:58.979014 tramp-process-one-action (5) # Looking for regexp \(.*ogin\( 
.*\)?: *\)\' from remote shell
08:43:58.979662 tramp-process-one-action (5) # Looking for regexp 
\(^.*\([pP]assword\|[pP]assphrase\).*:? *\)\' from remote shell
08:43:58.980116 tramp-process-one-action (5) # Looking for regexp 
\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification 
failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported 
authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try 
again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal 
[0-9]+\).*\)\' from remote shell
08:43:58.980613 tramp-process-one-action (5) # Looking for regexp \(^[^#$%
]*[#$%] *\)\' from remote shell
08:43:58.981026 tramp-process-one-action (5) # Looking for regexp \(\(?:^\|
\)[^]#$%
]*#?[]#$%] *\(\[[0-9;]*[a-zA-Z] *\)*\)\' from remote shell
08:43:58.981430 tramp-process-one-action (5) # Call `tramp-action-succeed'
08:43:58.981819 tramp-process-actions (6) # 
Last login: Mon Oct  7 08:40:09 2013 from 10.63.65.80
Copyright (c) 2001-2011, Cisco Systems, Inc.


AsyncOS 8.3 for Cisco IronPort M670 build 142

Welcome to the Cisco IronPort M670 Security Management(tm) Appliance
hostname:username 1] 
08:43:58.982499 tramp-process-actions (3) # Waiting for prompts from remote 
shell...done
08:43:58.983009 tramp-maybe-open-connection (3) # Found remote shell prompt on 
`hostname'
08:43:59.015264 tramp-open-shell (5) # Opening remote shell `/bin/sh'...
08:43:59.015693 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' 
PS1=\#\$\  PS2='' PS3='' /bin/sh 
08:43:59.018274 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.018670 tramp-send-command (6) # PS1=\#\$\ 
08:43:59.019819 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.020197 tramp-send-command (6) # PS2=''
08:43:59.021249 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.021591 tramp-send-command (6) # PS3=''
08:43:59.022573 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.022973 tramp-send-command (6) # PROMPT_COMMAND=''
08:43:59.023999 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.024342 tramp-open-shell (5) # Opening remote shell `/bin/sh'...done
08:43:59.024674 tramp-open-connection-setup-interactive-shell (5) # Setting up 
remote shell environment
08:43:59.025030 tramp-send-command (6) # stty -inlcr -echo kill '^U' erase '^H'
08:43:59.028822 tramp-wait-for-regexp (6) # 
#$ 
08:43:59.029196 tramp-send-command (6) # echo foo
08:43:59.030308 

Re: Connect to the ssh and execute any command

2013-10-07 Thread Andrey Tykhonov
On Mon, Oct 07, 2013 at 03:40:21PM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
  Hi Michael,
 
  I'm sorry. Now attached.
 
 Well, the traces don't show any hint. However, you've said you have
 applied in eshell 
 
 cd /ssh:username@hostname:/data/bin/
 ls -la
 
 IIRC, ls in eshell is an internal command. Could you, please, apply
 instead:
 
 cd /ssh:username@hostname:/data/bin/
 *ls -la
 
 In case of problems, please show the traces from their debug buffer.


No issues with the *ls -la. eshell outputs list with files as was
expected.


Best regards,
Andrey.

 
  Best regards,
  Andrey.
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-07 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 No issues with the *ls -la. eshell outputs list with files as was
 expected.

So it works for you now? No further problems?

 Best regards,
 Andrey.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-06 Thread Andrey Tykhonov
On Fri, Oct 04, 2013 at 08:31:56PM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
 Hi Andrey,
 

Hi Michael,

  I hope you did also autoconf; ./configure. 
 
  No. I just tried it and got errors:
 
  $ autoconf; ./configure
  configure: WARNING: texi2dvi not found
 
 You miss a texinfo installation.

I installed textinfo and make now founds texi2dvi. But I still getting
errors:

$ autoconf; ./configure
configure: Tramp 2.2.8
checking for gmake... gmake
checking for reasonable gmake version... ok
checking whether gmake sets $(MAKE)... yes
checking for emacs... yes
checking for emacs flavor... emacs
checking for emacs gvfs support... no
checking for emacs gateway support... yes
checking for emacs version... ok
checking for base64.el... ok
checking for format-spec.el... ok
checking for password.el... skipped
checking for socks.el... ok
checking for makeinfo... makeinfo
checking for reasonable makeinfo version... ok
checking for texi2dvi... texi2dvi
checking for reasonable texi2dvi version... ok
checking for install-info... install-info
checking for installation chapter... yes
checking prefix ... /usr/local
checking datarootdir... ${prefix}/share
checking datadir... ${datarootdir}
checking lispdir... ${datadir}/emacs/site-lisp
checking infodir... ${prefix}/share/info
checking for ftp-upload... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating contrib/Makefile
config.status: creating lisp/Makefile
config.status: creating lisp/trampver.el
config.status: creating texi/Makefile
config.status: creating texi/trampver.texi
configure: regenerate autoloads
Makefile, line 50: Missing dependency operator
Makefile, line 52: Need an operator
Makefile, line 55: Missing dependency operator
Makefile, line 57: Need an operator
Makefile, line 60: Missing dependency operator
Makefile, line 62: Need an operator
Makefile, line 64: Need an operator
Makefile, line 69: Missing dependency operator
Makefile, line 71: Need an operator
Makefile, line 73: Need an operator
Error expanding embedded variable.


For sorry, I have no idea (I would like to know) how resolve all 
dependencies which needs for correct make. So, I just execute
autoconf; ./configure on another machine on which it performs without
errors. And copied tramp folder. But I didn't notice any changes how
tramp behaves. It behaves in the same way as I described in previous
mail.



Best regards,
Andrey.

 
  Could I make autoconf; ./configure on another linux-machine on which
  it performs without errors and just copy tramp folder to the machine
  on which I test emacs with dev-tramp?
 
 Could work.
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-06 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael,

Hi Andrey,

 Makefile, line 50: Missing dependency operator
 Makefile, line 52: Need an operator
 Makefile, line 55: Missing dependency operator
 Makefile, line 57: Need an operator
 Makefile, line 60: Missing dependency operator
 Makefile, line 62: Need an operator
 Makefile, line 64: Need an operator
 Makefile, line 69: Missing dependency operator
 Makefile, line 71: Need an operator
 Makefile, line 73: Need an operator
 Error expanding embedded variable.

Please send me lisp/Makefile.

 For sorry, I have no idea (I would like to know) how resolve all 
 dependencies which needs for correct make. So, I just execute
 autoconf; ./configure on another machine on which it performs without
 errors. And copied tramp folder. But I didn't notice any changes how
 tramp behaves. It behaves in the same way as I described in previous
 mail.

Yep. And you haven't sent the traces level 6. If you would send them, I
could analyze.

 Best regards,
 Andrey.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-06 Thread Andrey Tykhonov
On Sun, Oct 06, 2013 at 08:24:22PM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
  Hi Michael,
 
 Hi Andrey,

Hi Michael,

 
  Makefile, line 50: Missing dependency operator
  Makefile, line 52: Need an operator
  Makefile, line 55: Missing dependency operator
  Makefile, line 57: Need an operator
  Makefile, line 60: Missing dependency operator
  Makefile, line 62: Need an operator
  Makefile, line 64: Need an operator
  Makefile, line 69: Missing dependency operator
  Makefile, line 71: Need an operator
  Makefile, line 73: Need an operator
  Error expanding embedded variable.
 
 Please send me lisp/Makefile.

Attached to this mail.

 
  For sorry, I have no idea (I would like to know) how resolve all 
  dependencies which needs for correct make. So, I just execute
  autoconf; ./configure on another machine on which it performs without
  errors. And copied tramp folder. But I didn't notice any changes how
  tramp behaves. It behaves in the same way as I described in previous
  mail.
 
 Yep. And you haven't sent the traces level 6. If you would send them, I
 could analyze.

Sorry. I attached it also.

 
  Best regards,
  Andrey.
 
 Best regards, Michael.


Best regards,
Andrey.
# -*- coding: utf-8; -*-
# Emacs Makefile for TRAMP
# lisp/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1998-2013 Free Software Foundation, Inc.

# Author: Kai Großjohann kai.grossjoh...@gmx.net
# Michael Albinus michael.albi...@gmx.de
# Keywords: comm, processes

# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.

# This Makefile requires GNU make.

EMACS   = emacs
EMACS_GVFS  = no
EMACS_GW= yes
EMACS_INFO  = emacs
INSTALL = install -m644
MKDIR   = @mkdir -p
RM  = -rm -f

builddir= /data/home/atykhono/.emacs.d/tramp/lisp
prefix  = /usr/local
datarootdir = ${prefix}/share
datadir = ${datarootdir}
lispdir = ${datadir}/emacs/site-lisp
DESTDIR =

CONTRIB_FILES   = 
CLEAN_FILES = .\\\#* \\\#* .*~ *~ *.aux *.cp *.cps *.diff *.dvi *.elc *.fn 
*.fns *.html *.info *.ky *.log *.pg *.tmp *.toc *.tp *.vr *.vrs

# trampver.el and tramp.el must be handled first due to dependencies.
LISP_FILES  = trampver.el tramp.el tramp-adb.el tramp-cache.el  \
  tramp-cmds.el tramp-compat.el tramp-sh.el \
  tramp-smb.el tramp-uu.el

# tramp-gvfs.el needs Emacs 23 at least.
ifeq ($(EMACS_GVFS), yes)
  LISP_FILES += tramp-gvfs.el
endif

# tramp-gw.el needs Emacs 22 at least.
ifeq ($(EMACS_GW), yes)
  LISP_FILES += tramp-gw.el
endif

# tramp-ftp.el and tramp-efs.el are useful for Emacs resp XEmacs only.
ifeq ($(EMACS_INFO), emacs)
  LISP_FILES += tramp-ftp.el
else
  LISP_FILES += tramp-efs.el
endif

INSTALL_FILES   = $(LISP_FILES) $(CONTRIB_FILES) tramp-loaddefs.el \
  $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))

ifeq ($(EMACS_INFO), emacs)
  EM = $(EMACS) --no-site-file -batch
else
  EM = $(EMACS) -no-autoloads -batch -l cl-macs
endif


.PHONY: all autoloads install clean distclean tramp xemacs

.SUFFIXES: .elc .el

all: autoloads $(addsuffix .elc, $(basename $(LISP_FILES) $(CONTRIB_FILES)))

autoloads: $(builddir)/tramp-loaddefs.el
$(builddir)/tramp-loaddefs.el: $(LISP_FILES)
# XEmacs must be advised to put tramp.el definitions at the beginning.
# We redefine `autoload-trim-file-name', therefore.
$(EM) -l autoload   \
  --eval (setq generate-autoload-cookie \;;;###tramp-autoload\) \
  --eval (setq generated-autoload-file \
(expand-file-name \tramp-loaddefs.el\))  \
  --eval (setq make-backup-files nil) \
  --eval (unless (string-equal \$(EMACS_INFO)\ \emacs\)\
(defalias 'autoload-trim-file-name  \
  'file-name-sans-extension))  \
  -f batch-update-autoloads .
# XEmacs uses hard coded feature `lisp-autoloads'.
@sed -e s/lisp-autoloads/tramp-loaddefs/g $@ $@. \
  mv -f $@. $@
# Emacs 22 does not add the `provide' form to the generated loaddefs.el.
@grep -q provide $@ || echo (provide 'tramp-loaddefs) $@

%.elc: %.el
$(EM) -l bytecomp \

Re: Connect to the ssh and execute any command

2013-10-04 Thread Andrey Tykhonov
On Thu, Sep 19, 2013 at 12:40:23PM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
 Hi Andrey,
 
  Well, looks also good. I will add both alternatives (perl-based and
  python-based) to Tramp. When finished, I'll ask you for test :-)
 
  Looking forward for these changes!
 
 I have committed a respective patch to Tramp's repository. I couldn't
 use Python's os.getlogin(), because Tramp has no terminal when connected
 to the remote host. So I have used pwd.getpwuid(os.getuid())[0]
 
 Cloning of Tramp from the git repository is described in
 http://www.gnu.org/software/tramp/#Obtaining-Tramp. Your local manual
 might be out-of-date; likely it describes downloading via cvs, which is
 not supported anymore.

Hi Michael!

Thank you!

I just recently get a chance to test these changes.

I cloned git://git.savannah.gnu.org/tramp.git git repository to the 
~/.emacs.d/tramp/ and added 

(add-to-list 'load-path ~/.emacs.d/tramp/lisp/)

and 

(setq tramp-verbose 6)

on top of my .emacs.

I tried again:

cd /ssh:username@hostname:/var/log/

And then ls -la. I'm not getting error as before but in each folder
where I made ls -la instead of file list I get total 0:

/ssh:username@hostname:/var/log $ ls -la
total 0

But indeed there are files.

Then I tried:

C-x C-f

and I can change folders but when I open some file I get:

Tramp: Inserting
`/ssh:username@hostname:/some/path/some-file.py'...failed   
  
File exists, but cannot be read


I suppose that that gonna be a hard task to make tramp workable in my
case. This seems require a lot of debugging and tracing all code and
check step by step where there are issues and then fix them.



Anyway, thank you very much Michael!



Best regards,
Andrey

 
  Thank you, Michael! :-)
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-10-04 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael!

Hi Andrey,

 I just recently get a chance to test these changes.

 I cloned git://git.savannah.gnu.org/tramp.git git repository to the 
 ~/.emacs.d/tramp/ and added 

 (add-to-list 'load-path ~/.emacs.d/tramp/lisp/)

 and 

 (setq tramp-verbose 6)

 on top of my .emacs.

I hope you did also autoconf; ./configure. This is needed in order to
get a proper tramp-loaddefs.el file.

 I tried again:

 cd /ssh:username@hostname:/var/log/

 And then ls -la. I'm not getting error as before but in each folder
 where I made ls -la instead of file list I get total 0:

 /ssh:username@hostname:/var/log $ ls -la
 total 0

 But indeed there are files.

Sorry, I'm a little bit lost. How have you performed cd
/ssh:username@hostname:/var/log/? In an eshell buffer? 

 Then I tried:

 C-x C-f

 and I can change folders but when I open some file I get:

 Tramp: Inserting
 `/ssh:username@hostname:/some/path/some-file.py'...failed
 File exists, but cannot be read

 I suppose that that gonna be a hard task to make tramp workable in my
 case. This seems require a lot of debugging and tracing all code and
 check step by step where there are issues and then fix them.

Let's see, how far we go. Keep tramp-verbose 6. Everytime, a command
fails, tell me exactly what you have done (I must go the same steps),
and show mw the whole Tramp debug buffer.

 Anyway, thank you very much Michael!

 Best regards,
 Andrey

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-19 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

Hi Andrey,

 Well, looks also good. I will add both alternatives (perl-based and
 python-based) to Tramp. When finished, I'll ask you for test :-)

 Looking forward for these changes!

I have committed a respective patch to Tramp's repository. I couldn't
use Python's os.getlogin(), because Tramp has no terminal when connected
to the remote host. So I have used pwd.getpwuid(os.getuid())[0]

Cloning of Tramp from the git repository is described in
http://www.gnu.org/software/tramp/#Obtaining-Tramp. Your local manual
might be out-of-date; likely it describes downloading via cvs, which is
not supported anymore.

 Thank you, Michael! :-)

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael!

Hi Andrey,

 Your remote host does not find a proper id command. What happens, if
 you call the following commands in a shell on that remote host:
 
 # id -u

 id: Command not found.

 # whereis id

 whereis: Command not found.

 I also didn't find 'id' by means of

 find / -name id

 As I understand TRAMP is not able to work without 'id'. Therefore TRAMP is
 not suitable for me...

 # uname -a

 FreeBSD {hostname} 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Sep 13
 21:22:42 PDT 2013 auto-build@{hostname}:{some/path/} amd64

Strange. `id' (and also `whereis') belong to FreeBSD proper. See for
example http://www.freebsd.org/cgi/man.cgi?query=idamp;sektion=1

You might check with your remote host why it is not installed.

 Best regards,
 Andrey

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael!

Hi Andrey,

 This is not surprise for me as such hosts are very custom. They are not
 sterling FreeBSD. I'm not sure if I can install something there. But
 even I can then I'll be needed to install these things again, again and
 again, because such hosts has very short life, they reinstalls very
 often, from the scratch, from template which I'm not able to change...

I see. However, Tramp is not fixed to use `id' and nothing else. It
needs `id' to recognize the user's uid and gid. If you could tell me,
what the counterparts of the respective commands are on the remote host,
I could teach Tramp to use them. Tramp needs to call the following
commands, which would require a replacement:

# id -u
# id -un
# id -g
# id -gn

 Best regards,
 Andrey

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread yary
I'm not sure if perl is on Andrey's remote host, but I recall that
other parts of Tramp uses it. So here are perl-based alternates to
id:

# id -u:
perl -le 'print$'

# id -un
perl -le 'print scalar getpwuid($)'

# id -g
perl -le 'print($)=~/(\d+)/)'

# id -gn
perl -le 'print scalar getgrgid($))'
-y


On Wed, Sep 18, 2013 at 6:09 AM, Michael Albinus michael.albi...@gmx.de wrote:
 Andrey Tykhonov atykho...@gmail.com writes:

 Hi Michael!

 Hi Andrey,

 This is not surprise for me as such hosts are very custom. They are not
 sterling FreeBSD. I'm not sure if I can install something there. But
 even I can then I'll be needed to install these things again, again and
 again, because such hosts has very short life, they reinstalls very
 often, from the scratch, from template which I'm not able to change...

 I see. However, Tramp is not fixed to use `id' and nothing else. It
 needs `id' to recognize the user's uid and gid. If you could tell me,
 what the counterparts of the respective commands are on the remote host,
 I could teach Tramp to use them. Tramp needs to call the following
 commands, which would require a replacement:

 # id -u
 # id -un
 # id -g
 # id -gn

 Best regards,
 Andrey

 Best regards, Michael.

 ___
 Tramp-devel mailing list
 Tramp-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/tramp-devel

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread Andrey Tykhonov
On Wed, Sep 18, 2013 at 12:09:55PM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
  Hi Michael!
 
 Hi Andrey,
 
  This is not surprise for me as such hosts are very custom. They are not
  sterling FreeBSD. I'm not sure if I can install something there. But
  even I can then I'll be needed to install these things again, again and
  again, because such hosts has very short life, they reinstalls very
  often, from the scratch, from template which I'm not able to change...
 
 I see. However, Tramp is not fixed to use `id' and nothing else. It
 needs `id' to recognize the user's uid and gid. If you could tell me,
 what the counterparts of the respective commands are on the remote host,
 I could teach Tramp to use them. Tramp needs to call the following
 commands, which would require a replacement:

Hi Michael,


for sorry I didn't find any counterparts of the respective commands on
the remote host. I investigated /etc/passwd and see that all users which
I need (for login or file modifications) has 0 uid and 0 guid. So all
users which I need are roots. All files on the remote host belongs to
root:wheel.

So, the following commands could return such values:

 
 # id -u

0

 # id -un

a) Client's username (on remote host there are such usernames as
usernames on client hosts from which I will be used Tramp) 

b) 'testuser' (there is such 'test' username on the remote host).  

c) Hmmm... Or it can be just a 'root'?..

'testuser' -- seems will be suitable enough.

 # id -g

0

 # id -gn

wheel


Could these values be used by Tramp as constants? In other case I could just
create a little bash script which will return all these values. However
seems constants is more preferable as in case of script I'll be needed
to always upload it on the remote host.


Best regards,
Andrey


 
  Best regards,
  Andrey
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread Andrey Tykhonov
On Wed, Sep 18, 2013 at 03:04:10PM +0200, Michael Albinus wrote:
 yary not@gmail.com writes:
 
  I'm not sure if perl is on Andrey's remote host, but I recall that
  other parts of Tramp uses it. So here are perl-based alternates to
  id:
 
  # id -u
  perl -le 'print$'
 
  # id -un
  perl -le 'print scalar getpwuid($)'
 
  # id -g
  perl -le 'print($)=~/(\d+)/)'
 
  # id -gn
  perl -le 'print scalar getgrgid($))'
 
 Looks good, thanks! Andrey, do you have Perl there?

I haven't perl, but there is python.

So, python-based alternates to id could looks like:

# id -u

python -c 'import os; print os.getuid()'

# id -un

python -c 'import os; print os.getlogin()'

# id -g

python -c 'import os; print os.getgid()'

# id -gn

python -c 'import os, grp; print grp.getgrgid(os.getgid())[0]'



Best regards, Andrey.


 
  -y
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-18 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

 I haven't perl, but there is python.

 So, python-based alternates to id could looks like:

Well, looks also good. I will add both alternatives (perl-based and
python-based) to Tramp. When finished, I'll ask you for test :-)

 Best regards, Andrey.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-17 Thread Michael Albinus
Andrey Tykhonov atykho...@gmail.com writes:

Hi Andrey,

 Tramp does not use FUSE for ssh connections. Please show an example
 connection to the remote host, and how it fails.

 Here I try to ls -la and get the following error:

 Couldn't find a POSIX `id' command

Your remote host does not find a proper id command. What happens, if
you call the following commands in a shell on that remote host:

# id -u
# id --version
# which id
# whereis id
# uname -a

 Best regards,
 Andrey.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-17 Thread Andrey Tykhonov
On Tue, Sep 17, 2013 at 08:54:51AM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
 Hi Andrey,

Hi Michael!

 
  Tramp does not use FUSE for ssh connections. Please show an example
  connection to the remote host, and how it fails.
 
  Here I try to ls -la and get the following error:
 
  Couldn't find a POSIX `id' command
 
 Your remote host does not find a proper id command. What happens, if
 you call the following commands in a shell on that remote host:
 
 # id -u

id: Command not found.

 # id --version

id: Command not found.

 # which id

id: Command not found.

 # whereis id

whereis: Command not found.

I also didn't find 'id' by means of

find / -name id

As I understand TRAMP is not able to work without 'id'. Therefore TRAMP is
not suitable for me...

 # uname -a

FreeBSD {hostname} 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Sep 13
21:22:42 PDT 2013 auto-build@{hostname}:{some/path/} amd64

Here I replaced real hostname by {hostname}.



Best regards,
Andrey


 
  Best regards,
  Andrey.
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Connect to the ssh and execute any command

2013-09-16 Thread Andrey Tykhonov
On Fri, Sep 13, 2013 at 08:45:02AM +0200, Michael Albinus wrote:
 Andrey Tykhonov atykho...@gmail.com writes:
 
 [Cc to tramp-devel@gnu.org, because I want to help with Tramp config]
 
  Hi all!
 
 Hi Andrey,
 
  During last several days I was trying to implement quite simple script
  which:
 
  1. Creates new buffer with the shell (M-x shell)
  2. Executes there ssh usern...@domain.com. As result -- the password
  prompt appears in the minibuffer. I manually input password.
  3. Then script executes any command in the recently created buffer
  (shell), for example: ls -la. So I expect to see directory listing on
  the domain.com.
 
  but, for sorry, I cannot to do so that ls -la will be executed!
 
  I googled, I have tried many different approaches but without any luck :-(
 
  Here I should mention quite important thing: I cannot use TRAMP because
  it does not work with the server to which the script connects and then
  on which executes ls -la. (I suppose that TRAMP uses FUSE, but for
  sorry FUSE does not work with mine server). So TRAMP is not available
  for me.
 
 Tramp does not use FUSE for ssh connections. Please show an example
 connection to the remote host, and how it fails.

First of all I added

(setq tramp-verbose 6)

to the ~/.emacs

Then M-x eshell, and then

cd /ssh:username@hostname:/some/existing/dir

I get password prompt, I put correct password, then get such prompt:

/ssh:username@hostname:/some/existing/dir $

Here I try to ls -la and get the following error:

Couldn't find a POSIX `id' command



Best regards,
Andrey.

 
 Prior to the test, you should apply
 
(setq tramp-verbose 6)
 
 This will create a Tramp debug buffer, which shall show the problem.
 
  Regards,
  Andrey
 
 Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel