<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get remote X Windows working in Ubuntu Karmic</title>
	<atom:link href="http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/</link>
	<description>Attention in software development</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:38:21 -0700</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ben Hyde</title>
		<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/comment-page-1/#comment-385</link>
		<dc:creator>Ben Hyde</dc:creator>
		<pubDate>Thu, 29 Jul 2010 17:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://gregorygrubbs.com/?p=391#comment-385</guid>
		<description>I am not absolutely certain this is correct, but it has worked for me.

The problem I wanted to solve was to ssh from my laptop to a ubuntu server and then invoke emacsclient to obtain a x window&#039;s frame on my lap top served up from the emacs running on the ubuntu server.  The xauth inside emacs is the one into which I needed to add the xauth credentials.  The following worked, at least once :)

This script resides on the ubuntu server is run after you ssh to the server, forwarding your
laptop&#039;s X display.

&lt;pre&gt;
#!/bin/bash

# First we need to add to xauth of the server emacs
# permission to throw up windows on our X server.
# But .Xauthorization accumlates so we have to auth
# more than you&#039;d think.
xauth -f ~/.Xauthority list &#124; grep -v &#039;:0&#039; &#124; while read foo; do
  emacsclient -e &quot;(shell-command \&quot;xauth add $foo\&quot;)&quot;
done

# Ok, now we should now be able to connect.
emacsclient -c
&lt;/pre&gt;

Thanks for the hint!</description>
		<content:encoded><![CDATA[<p>I am not absolutely certain this is correct, but it has worked for me.</p>
<p>The problem I wanted to solve was to ssh from my laptop to a ubuntu server and then invoke emacsclient to obtain a x window&#8217;s frame on my lap top served up from the emacs running on the ubuntu server.  The xauth inside emacs is the one into which I needed to add the xauth credentials.  The following worked, at least once <img src='http://gregorygrubbs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This script resides on the ubuntu server is run after you ssh to the server, forwarding your<br />
laptop&#8217;s X display.</p>
<pre>
#!/bin/bash

# First we need to add to xauth of the server emacs
# permission to throw up windows on our X server.
# But .Xauthorization accumlates so we have to auth
# more than you'd think.
xauth -f ~/.Xauthority list | grep -v ':0' | while read foo; do
  emacsclient -e "(shell-command \"xauth add $foo\")"
done

# Ok, now we should now be able to connect.
emacsclient -c
</pre>
<p>Thanks for the hint!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel J. Adamson</title>
		<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/comment-page-1/#comment-365</link>
		<dc:creator>Joel J. Adamson</dc:creator>
		<pubDate>Thu, 21 Jan 2010 20:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://gregorygrubbs.com/?p=391#comment-365</guid>
		<description>It works!</description>
		<content:encoded><![CDATA[<p>It works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel J. Adamson</title>
		<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/comment-page-1/#comment-364</link>
		<dc:creator>Joel J. Adamson</dc:creator>
		<pubDate>Thu, 21 Jan 2010 20:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://gregorygrubbs.com/?p=391#comment-364</guid>
		<description>Howdy,

I&#039;ve been working on this same problem too.  I submitted an Emacs
bug(#5434) and was given this explanation by one of the respondents:

,----
&#124; 
&#124; &gt; Okay, I&#039;ll try that, but a quick question: should an xauth problem result
&#124; &gt; in failures for every X application I try to run?  Other applications
&#124; &gt; (other than emacsclient) run just fine.
&#124; 
&#124; There is a difference.  When you start other clients, you do it from
&#124; the shell started by the ssh login process.  When you do emacsclient
&#124; -c it only tells your emacs daemon to open a frame on your DISPLAY.
&#124; The emacs daemon is not started from your ssh shell.
&#124; 
&#124; Try starting another X client from a shell not related to the ssh
&#124; shell with the ssh-forwarded display (localhost:10) and see what you
&#124; get.  You should get permission denied.  But your Emacs daemon may
&#124; have other displays opened, that can influence matters also.
`----

All my machines (two Fedora 12, one Ubuntu Karmic Koala) have the
newest gnome, and I confirm the same bizarre xauth locations as you
do.

I&#039;m at least glad I&#039;m not the only one!

Joel</description>
		<content:encoded><![CDATA[<p>Howdy,</p>
<p>I&#8217;ve been working on this same problem too.  I submitted an Emacs<br />
bug(#5434) and was given this explanation by one of the respondents:</p>
<p>,&#8212;-<br />
|<br />
| &gt; Okay, I&#8217;ll try that, but a quick question: should an xauth problem result<br />
| &gt; in failures for every X application I try to run?  Other applications<br />
| &gt; (other than emacsclient) run just fine.<br />
|<br />
| There is a difference.  When you start other clients, you do it from<br />
| the shell started by the ssh login process.  When you do emacsclient<br />
| -c it only tells your emacs daemon to open a frame on your DISPLAY.<br />
| The emacs daemon is not started from your ssh shell.<br />
|<br />
| Try starting another X client from a shell not related to the ssh<br />
| shell with the ssh-forwarded display (localhost:10) and see what you<br />
| get.  You should get permission denied.  But your Emacs daemon may<br />
| have other displays opened, that can influence matters also.<br />
`&#8212;-</p>
<p>All my machines (two Fedora 12, one Ubuntu Karmic Koala) have the<br />
newest gnome, and I confirm the same bizarre xauth locations as you<br />
do.</p>
<p>I&#8217;m at least glad I&#8217;m not the only one!</p>
<p>Joel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregory Grubbs</title>
		<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/comment-page-1/#comment-235</link>
		<dc:creator>Gregory Grubbs</dc:creator>
		<pubDate>Thu, 12 Nov 2009 15:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://gregorygrubbs.com/?p=391#comment-235</guid>
		<description>@erikr, I have logged on to several Linux machines to determine their default Xauthority database location, using xauth -v.  On Debian machines, I always get ~/.Xauthority.  I get that result even on a server that has been upgraded to Karmic, but which does not have Gnome.  On my laptop, however, I get  /var/run/gdm/auth-for-gregj-3sy6gB/database.  That path changes every time I log in, with different salt.  Since everything else looks to your home .Xauthority file, this causes your emacsclient session to fail to authenticate.  

I might try messing around with setting the XAUTHORITY environment variable, but I&#039;m not sure that would work for Gnome.</description>
		<content:encoded><![CDATA[<p>@erikr, I have logged on to several Linux machines to determine their default Xauthority database location, using xauth -v.  On Debian machines, I always get ~/.Xauthority.  I get that result even on a server that has been upgraded to Karmic, but which does not have Gnome.  On my laptop, however, I get  /var/run/gdm/auth-for-gregj-3sy6gB/database.  That path changes every time I log in, with different salt.  Since everything else looks to your home .Xauthority file, this causes your emacsclient session to fail to authenticate.  </p>
<p>I might try messing around with setting the XAUTHORITY environment variable, but I&#8217;m not sure that would work for Gnome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erikr</title>
		<link>http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/comment-page-1/#comment-226</link>
		<dc:creator>erikr</dc:creator>
		<pubDate>Wed, 11 Nov 2009 04:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://gregorygrubbs.com/?p=391#comment-226</guid>
		<description>Greg, I have this same problem, too. Is this xauth stuff really the &quot;official&quot; solution? I unfortunately know nothing about xauth. 

I can ssh to my remote box with X forwarding and run &quot;xeyes&quot; just fine, and even emacs runs fine.  My only problem is when I run emacsclient and try to create a new frame, I get the same error as you... I will try your solution! Thank you!

P.S. Everything did work fine until the upgrade to karmic...</description>
		<content:encoded><![CDATA[<p>Greg, I have this same problem, too. Is this xauth stuff really the &#8220;official&#8221; solution? I unfortunately know nothing about xauth. </p>
<p>I can ssh to my remote box with X forwarding and run &#8220;xeyes&#8221; just fine, and even emacs runs fine.  My only problem is when I run emacsclient and try to create a new frame, I get the same error as you&#8230; I will try your solution! Thank you!</p>
<p>P.S. Everything did work fine until the upgrade to karmic&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
