X forwarding inside emacs without an extra terminal

2013-05-16 Thread Joseph Mingrone
I'm trying open a remote emacsclient with X forwarding without requiring a
local terminal sshed to the remote host.  When I say 'with X
forwarding' I mean that I open a terminal inside the remote emacs and
from there can open X programs.

If phe is the local host and gly is the remote host and I do

jrm@phe ~ % ssh -f gly 'emacsclient -nc'

the remote emacs opens and all is good.  However, from within that emacs
X forward doesn't work.  I get an error about the DISPLAY even though
the environment is correct.  A little investigation hints that the
problem is with the magic cookie exchange.

If I then open a local terminal and ssh to the remote host the X
forwarding inside the already-open remote emacsclient starts working.  I
can also open a terminal ssh to the remote host then start an
emacsclient.  Both of these solutions require a separate terminal open
to the remote host.

Is there a way to get this working without the extra terminal sshed to
the remote host?

Joseph

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding? Fixed?

2012-03-15 Thread Glynn Clements

gene heskett wrote:

  In my experience, enabling debugging on the server side (via the
  LogLevel directive in sshd_config) tends to be more useful than
  the debug information produced by the client.
 
 In this case 'server' I assume being the machine I am targeting, aka 
 'lathe'?

Yes; the machine running the sshd daemon.

The ssh client can only tell you what the ssh server tells it, and
it's in the nature of the secure shell protocol for the server not
to tell the client too much. It may tell it if something failed, but
probably not exactly how or why it failed.

-- 
Glynn Clements gl...@gclements.plus.com
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding? Fixed?

2012-03-15 Thread gene heskett
On Friday, March 16, 2012 12:29:58 AM Glynn Clements did opine:

 gene heskett wrote:
   In my experience, enabling debugging on the server side (via the
   LogLevel directive in sshd_config) tends to be more useful than
   the debug information produced by the client.
  
  In this case 'server' I assume being the machine I am targeting, aka
  'lathe'?
 
 Yes; the machine running the sshd daemon.

I _think_ its running but I will add that debug level to the config file 
the next time I boot it.  I need to get the motor controllers  power 
supplies assembled next.  This box will be running a cnc'd lathe when its 
all assembled.

 The ssh client can only tell you what the ssh server tells it, and
 it's in the nature of the secure shell protocol for the server not
 to tell the client too much. It may tell it if something failed, but
 probably not exactly how or why it failed.

I can understand that reticence.  I was out in the garage a bit ago, 
updated that machine  then shut it off, intending to get some beauty 
sleep.  Alas, I've fooled around and failed, not that it would do me much 
good with all the calendars I've thrown away. ;-)

Thanks Glynn.

Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
My web page: http://coyoteden.dyndns-free.com:85/gene
Don't vote -- it only encourages them!
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


x forwarding?

2012-03-14 Thread gene heskett
Greetings all;

2 supposedly identical machines, installed from the same ubuntu-10.04 LTS 
cd that is a special version for LinuxCNC (which used to be emc).

Machines are intel D525MW boards.

ssh -Y first machine works, and uses Display:10:0, ssh -Y second machine 
doesn't, tries  fails to use Display 0:0.

Where  what does it take to enable the 2nd one? (not normally at the same 
time)

Thanks.

Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
My web page: http://coyoteden.dyndns-free.com:85/gene
If you fail to plan, plan to fail.
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding?

2012-03-14 Thread Adam Jackson
On Wed, 2012-03-14 at 03:27 -0400, gene heskett wrote:

 ssh -Y first machine works, and uses Display:10:0, ssh -Y second machine 
 doesn't, tries  fails to use Display 0:0.
 
 Where  what does it take to enable the 2nd one? (not normally at the same 
 time)

Either:

a) The shell you launched ssh from for the second machine didn't have
$DISPLAY set,

b) sshd_config for the second machine doesn't have X11Forwarding yes
in it.

- ajax


signature.asc
Description: This is a digitally signed message part
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: x forwarding?

2012-03-14 Thread gene heskett
On Wednesday, March 14, 2012 11:11:14 AM Adam Jackson did opine:

 On Wed, 2012-03-14 at 03:27 -0400, gene heskett wrote:
  ssh -Y first machine works, and uses Display:10:0, ssh -Y second
  machine doesn't, tries  fails to use Display 0:0.
  
  Where  what does it take to enable the 2nd one? (not normally at the
  same time)
 
 Either:
 
 a) The shell you launched ssh from for the second machine didn't have
 $DISPLAY set,
 
Same shell on this machine. login to shop works, to lathe doesn't. If its 
the login shell on the second machine, how do I set that?  And why should 
it be different since the install cd was the exact same cd?

I had to completely blacklist/disable ipv6 on the machine the XForward 
isn't working on.

 b) sshd_config for the second machine doesn't have X11Forwarding yes
 in it.

Contains, apparently by default:

X11Forwarding yes
X11DisplayOffset 10 

 - ajax

I was pointed at the xauth command to fix this, but that man page has to 
rank near the top for all time obtuseness, and when executed on the non-
working machine, returns:

gene@lathe:~$ pwd
/home/gene
gene@lathe:~$ xauth list
xauth:  creating new authority file /home/gene/.Xauthority
gene@lathe:~$ cat .Xauthority
cat: .Xauthority: No such file or directory

for as many times as you want to hit the up-arrow  return.

Any better ideas?

Thanks all.

Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
My web page: http://coyoteden.dyndns-free.com:85/gene
Only a fool fights in a burning house.
-- Kank the Klingon, Day of the Dove, stardate unknown
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding?

2012-03-14 Thread walter harms


Am 14.03.2012 16:24, schrieb gene heskett:
 On Wednesday, March 14, 2012 11:11:14 AM Adam Jackson did opine:
 
 On Wed, 2012-03-14 at 03:27 -0400, gene heskett wrote:
 ssh -Y first machine works, and uses Display:10:0, ssh -Y second
 machine doesn't, tries  fails to use Display 0:0.

 Where  what does it take to enable the 2nd one? (not normally at the
 same time)

 Either:

 a) The shell you launched ssh from for the second machine didn't have
 $DISPLAY set,
  
 Same shell on this machine. login to shop works, to lathe doesn't. If its 
 the login shell on the second machine, how do I set that?  And why should 
 it be different since the install cd was the exact same cd?
 
 I had to completely blacklist/disable ipv6 on the machine the XForward 
 isn't working on.
 

There is an issue with ipv6 an certain ssh configurations. I had this problem
you can see some strange errors in /var/log/

 b) sshd_config for the second machine doesn't have X11Forwarding yes
 in it.
 
 Contains, apparently by default:
 
 X11Forwarding yes
 X11DisplayOffset 10 
 
 - ajax
 
 I was pointed at the xauth command to fix this, but that man page has to 
 rank near the top for all time obtuseness, and when executed on the non-
 working machine, returns:
 
 gene@lathe:~$ pwd
 /home/gene
 gene@lathe:~$ xauth list
 xauth:  creating new authority file /home/gene/.Xauthority
 gene@lathe:~$ cat .Xauthority
 cat: .Xauthority: No such file or directory
 
 for as many times as you want to hit the up-arrow  return.
 

This is strange, when ssh starts it should create the files.
i assume you did the ssh -v ?

re,
 wh


 Any better ideas?
 
 Thanks all.
 
 Cheers, Gene
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding?

2012-03-14 Thread gene heskett
On Wednesday, March 14, 2012 11:41:22 AM walter harms did opine:

 Am 14.03.2012 16:24, schrieb gene heskett:
  On Wednesday, March 14, 2012 11:11:14 AM Adam Jackson did opine:
  On Wed, 2012-03-14 at 03:27 -0400, gene heskett wrote:
  ssh -Y first machine works, and uses Display:10:0, ssh -Y second
  machine doesn't, tries  fails to use Display 0:0.
  
  Where  what does it take to enable the 2nd one? (not normally at
  the same time)
  
  Either:
  
  a) The shell you launched ssh from for the second machine didn't have
  $DISPLAY set,
  
  Same shell on this machine. login to shop works, to lathe doesn't. If
  its the login shell on the second machine, how do I set that?  And
  why should it be different since the install cd was the exact same
  cd?
  
  I had to completely blacklist/disable ipv6 on the machine the XForward
  isn't working on.
 
 There is an issue with ipv6 an certain ssh configurations. I had this
 problem you can see some strange errors in /var/log/
 
  b) sshd_config for the second machine doesn't have X11Forwarding
  yes in it.
  
  Contains, apparently by default:
  
  X11Forwarding yes
  X11DisplayOffset 10
  
  - ajax
  
  I was pointed at the xauth command to fix this, but that man page has
  to rank near the top for all time obtuseness, and when executed on
  the non- working machine, returns:
  
  gene@lathe:~$ pwd
  /home/gene
  gene@lathe:~$ xauth list
  xauth:  creating new authority file /home/gene/.Xauthority
  gene@lathe:~$ cat .Xauthority
  cat: .Xauthority: No such file or directory
  
  for as many times as you want to hit the up-arrow  return.
 
 This is strange, when ssh starts it should create the files.
 i assume you did the ssh -v ?
 
Which gets noisy, but the last 2 lines are:
debug1: Requesting X11 forwarding with authentication spoofing.
X11 forwarding request failed on channel 0

Thanks.  And I'll have to get back to this later, I am putting a new engine 
in my pickup too.
 re,
  wh
 
  Any better ideas?
  
  Thanks all.
  
  Cheers, Gene


Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
My web page: http://coyoteden.dyndns-free.com:85/gene
Anything is possible on paper.
-- Ron McAfee
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: x forwarding?

2012-03-14 Thread Johannes Truschnigg
On Wed, Mar 14, 2012 at 11:43:01AM -0400, gene heskett wrote:
 On Wednesday, March 14, 2012 11:41:22 AM walter harms did opine:
 [...]
 Which gets noisy, but the last 2 lines are:
 debug1: Requesting X11 forwarding with authentication spoofing.
 X11 forwarding request failed on channel 0

Check if you have the xauth(1) program installed on the remote host you're
connecting to, and install it if it's not there yet. It missing has been the
reason for X11 forwarding not to work for me (with similar symptoms as you are
experiencing) in the past. ssh(1) tries to execute xauth on the remote side of
the connection if X11 forwardinf is requested by the client, and will not
explicitly state it has failed doing so.

-- 
with best regards:
- Johannes Truschnigg ( johan...@truschnigg.info )

www:   http://johannes.truschnigg.info/
phone: +43 650 2 17
xmpp:  johan...@truschnigg.info

Please do not bother me with HTML-email or attachments. Thank you.


signature.asc
Description: Digital signature
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: x forwarding?

2012-03-14 Thread Alan Coopersmith

On 03/14/12 08:24 AM, gene heskett wrote:

I was pointed at the xauth command to fix this, but that man page has to
rank near the top for all time obtuseness, and when executed on the non-
working machine, returns:

gene@lathe:~$ pwd
/home/gene
gene@lathe:~$ xauth list
xauth:  creating new authority file /home/gene/.Xauthority
gene@lathe:~$ cat .Xauthority
cat: .Xauthority: No such file or directory


That's a misleading message, fixed a couple years ago in the xauth sources:
http://cgit.freedesktop.org/xorg/app/xauth/commit/?id=1c701094169b6e33f7faf21a269e949bf134a326
and included in xauth-1.0.5 and later releases.

Also note that a number of systems now no longer use $HOME/.Xauthority but
instead set the XAUTHORITY environment variable in your session to a
session specific file in /var for a variety of reasons, and if you're trying
to access xauth cookies from outside that session you'll need to find the
XAUTHORITY value in that session to match it.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com