From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Federico Ramallo Newsgroups: gmane.emacs.help Subject: Re: how to use emacsclient with a remote host? Date: Wed, 26 Nov 2008 02:07:12 -0200 Message-ID: <1227672432.18710.50.camel@1420n> References: <3c5ef98d-4e2d-448a-a7ab-ae017bb9ee6d@k41g2000yqn.googlegroups.com> Reply-To: framallo@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227672470 14586 80.91.229.12 (26 Nov 2008 04:07:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2008 04:07:50 +0000 (UTC) Cc: help-gnu-emacs , Marcelo Serpa To: Juanma Barranquero Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 26 05:08:53 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L5Bht-00011w-0j for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2008 05:08:53 +0100 Original-Received: from localhost ([127.0.0.1]:52680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5Bgj-0004uO-Dg for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 23:07:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L5BgP-0004sD-EG for help-gnu-emacs@gnu.org; Tue, 25 Nov 2008 23:07:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L5BgO-0004rm-Rh for help-gnu-emacs@gnu.org; Tue, 25 Nov 2008 23:07:21 -0500 Original-Received: from [199.232.76.173] (port=55860 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5BgO-0004rg-Nw for help-gnu-emacs@gnu.org; Tue, 25 Nov 2008 23:07:20 -0500 Original-Received: from mail-qy0-f17.google.com ([209.85.221.17]:35426) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L5BgO-0005bJ-As for help-gnu-emacs@gnu.org; Tue, 25 Nov 2008 23:07:20 -0500 Original-Received: by qyk10 with SMTP id 10so452107qyk.18 for ; Tue, 25 Nov 2008 20:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=2XzXOs0Y+exRXSWqaFXGVNu0vUUQ3d8Uk5qZ18B7E4E=; b=u4v8BaO19eE26uQZMcXsVk2C6gYoUiMU9GZHUCMpeTOUu0FHFY1ys3wpFMycxvbIAh lWxfzFpaUhpEXHM9+VKWeCx+8iP8h6T0SAR6ToEh91giaswc/Xc9NM/044CbiW9sP1nF l82jcfLBusPlxJRtEYGSj9BcXzHx2qDufz94U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=xhtqvK4VcGZpR3ykiG3bXFIK+re7R9l3r9uXNYyNiTTEcIf+LyyLbrNeyO/IIe4D1/ 0YBRDgCTAIajfEK2Hh02VpOPcMXKmXTh/2cxF/myq6uBjwDWqxoZJSJVnyLJQrvJ7vyF tUwnE3SoV3Tgsyt2nZ9fsDHWZ/hdMObdtI2wM= Original-Received: by 10.215.66.17 with SMTP id t17mr4746023qak.230.1227672439140; Tue, 25 Nov 2008 20:07:19 -0800 (PST) Original-Received: from ?192.168.0.150? ([200.81.238.87]) by mx.google.com with ESMTPS id 8sm6788259ywg.6.2008.11.25.20.07.15 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Nov 2008 20:07:17 -0800 (PST) In-Reply-To: X-Mailer: Evolution 2.22.3.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60114 Archived-At: while doing this detailed steps, i could solve the original issue. however I can connect with a tty client, but not with a client on X. I'll show you the steps i did. I reduced this to a simplified test scenario: MY GOAL: i use screen to share emacs remotely. Now we are using screen and emacs on tty. But we want to improve it to have two emacs running on different hosts on X. Sharing buffers, but the process should run on the remote host and sync via tcp with server-mode. In ubuntu 8.04 and GNU Emacs 23.0.60.1 (check env below) I have 2 users on the same host: framallo and federico I'm logged in as framallo. I create two tabs on a terminal emulator. One has a screen session as framallo and the other i run: ssh federico@localhost -Y screen -S testingemacs Both user has the same on ~/.screenrc ... hardstatus on hardstatus alwayslastline hardstatus string "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f%t %?(%u)%?%{wk}%?%+Lw%?" vbell off defscrollback 1000 term xterm # enable scrolling in the xterm termcapinfo xterm|xterms|xs|rxvt ti@:te@ screen -t console screen -t emacs emacs -nw screen -t root sudo -s ------------------ On /home/framallo/.emacs (setq server-host "1420n") (setq server-use-tcp t) (server-start) ----------------- i run: framallo@1420n:~$ cat .emacs.d/server/server 127.0.0.1:34765 7483 ... (a one line text) framallo@1420n:~$ scp -r .emacs.d/server/server federico@1420n:.emacs.d/server Now i got to federico's tab: federico@1420n:~$ cat .emacs.d/server/server 127.0.0.1:34765 7483 ... (same one line text) federico@1420n:~$ emacsclient -c -t emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start". emacsclient: connected to remote socket at 192.168.0.150 Waiting for Emacs... (and a big wow! emacs client is working!) (But doesn't work with emacsclient running on X) federico@1420n:~$ emacsclient -c emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start". emacsclient: connected to remote socket at 192.168.0.150 Waiting for Emacs...^[[A *ERROR*: Display =1420n:10 can't be opened After playing around i had a Fatal error (11)Segmentation fault and everything crashed :( snif i was having so much fun I had problems with security on /dev/pts/1 (or other numbers) i solved it like this: chmod 777 /dev/pts -R It's unsecure, not fancy, but it works. ENV: root@1420n:~# aptitude search emacs | grep "i " i emacs-extra i emacs-intl-fonts i emacs-jabber i emacs-lisp-intro i emacs-snapshot i A emacs-snapshot-bin-common i A emacs-snapshot-common i emacs-snapshot-el i emacs-snapshot-gtk i emacs-snapshot-nox i emacs-wiki i A emacsen-common Any ideas how to debug the segmentation fault? Thanks Federico Ramallo > On Tue, 2008-11-25 at 17:05 +0100, Juanma Barranquero wrote: > On Tue, Nov 25, 2008 at 15:45, framallo wrote: > > > I got it so far, but it's not working. Says connection refused, even > > that netstat says it's there.... No firewall's issues. Am i missing > > something? > > > > any ideas? > > Could you supply more info? For example, the precise error message, > and the version of both the Emacs server (on A) and emacsclient (on > B)... > > Juanma -- Federico Ramallo