<?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: Running X apps (like zenity) from crontab (solving &#8220;cannot open display&#8221; problem)</title>
	<atom:link href="http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/</link>
	<description>my outsourced memory for your perusal</description>
	<lastBuildDate>Thu, 10 May 2012 12:34:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Christya</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-63513</link>
		<dc:creator>Christya</dc:creator>
		<pubDate>Fri, 04 May 2012 07:56:52 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-63513</guid>
		<description>I&#039;m from Russia and you help so much!!! THANKS!!! =)</description>
		<content:encoded><![CDATA[<p>I&#8217;m from Russia and you help so much!!! THANKS!!! =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-60523</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Tue, 03 Apr 2012 03:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-60523</guid>
		<description>Using ~/.bashrc for the xhost command is not robust. It will only work if one of the Bash Startup Files for an interactive logon shell sources ~/.bashrc. It is common practice to do so but not universal.

If xhost is run unconditionally, it will result in an error when the user logs on at a virtual terminal: xhost: unable to open display &quot;&quot;. Making it conditional on $DISPLAY being set avoids this.

The same code will work for all users by using $LOGNAME instead of a hard-coded user name string.

Putting this all together, put this in ~/.bash_profile:

[[ $DISPLAY ]] &amp;&amp; xhost +localhost:$LOGNAME</description>
		<content:encoded><![CDATA[<p>Using ~/.bashrc for the xhost command is not robust. It will only work if one of the Bash Startup Files for an interactive logon shell sources ~/.bashrc. It is common practice to do so but not universal.</p>
<p>If xhost is run unconditionally, it will result in an error when the user logs on at a virtual terminal: xhost: unable to open display &#8220;&#8221;. Making it conditional on $DISPLAY being set avoids this.</p>
<p>The same code will work for all users by using $LOGNAME instead of a hard-coded user name string.</p>
<p>Putting this all together, put this in ~/.bash_profile:</p>
<p>[[ $DISPLAY ]] &amp;&amp; xhost +localhost:$LOGNAME</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to accomplished to run zenity in cronjob? - The UNIX and Linux Forums</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-60508</link>
		<dc:creator>How to accomplished to run zenity in cronjob? - The UNIX and Linux Forums</dc:creator>
		<pubDate>Mon, 02 Apr 2012 19:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-60508</guid>
		<description>[...] you miss understand me about your answer in the other furom.  I found my answer on this link &quot; Running X apps on crontab&quot;  what i did was i add the --display=:0.0 option in the zenity   [...]</description>
		<content:encoded><![CDATA[<p>[...] you miss understand me about your answer in the other furom.  I found my answer on this link &quot; Running X apps on crontab&quot;  what i did was i add the &#8211;display=:0.0 option in the zenity   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: how to accomplished to run zenity in cronjob</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-60507</link>
		<dc:creator>how to accomplished to run zenity in cronjob</dc:creator>
		<pubDate>Mon, 02 Apr 2012 19:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-60507</guid>
		<description>[...] thanks for speedy reply  I was about to try your suggestion but some how i found this link &quot;Running X app from crontab&quot;  what i used was the --diplay=:0.0 option in the zenity which is   [...]</description>
		<content:encoded><![CDATA[<p>[...] thanks for speedy reply  I was about to try your suggestion but some how i found this link &quot;Running X app from crontab&quot;  what i used was the &#8211;diplay=:0.0 option in the zenity which is   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentin</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-52745</link>
		<dc:creator>Valentin</dc:creator>
		<pubDate>Thu, 20 Oct 2011 19:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-52745</guid>
		<description>Thanks a lot - I stumbled about this problem, too.</description>
		<content:encoded><![CDATA[<p>Thanks a lot &#8211; I stumbled about this problem, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavel</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-50729</link>
		<dc:creator>Pavel</dc:creator>
		<pubDate>Thu, 01 Sep 2011 15:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-50729</guid>
		<description>Yeah! Thanks a lot! It really works!</description>
		<content:encoded><![CDATA[<p>Yeah! Thanks a lot! It really works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: serpro</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-50229</link>
		<dc:creator>serpro</dc:creator>
		<pubDate>Thu, 18 Aug 2011 18:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-50229</guid>
		<description>YOU ARE THE BEST ONE</description>
		<content:encoded><![CDATA[<p>YOU ARE THE BEST ONE</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marianne</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-41158</link>
		<dc:creator>Marianne</dc:creator>
		<pubDate>Thu, 04 Nov 2010 13:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-41158</guid>
		<description>Hi, in reply to the latest pingback (comment #2; I&#039;m not signed up to the forum it links to) -- what exactly doesn&#039;t work for you? Note that &quot;mpromber&quot; in this line
&lt;pre&gt;xhost local:mpromber &gt; /dev/null&lt;/pre&gt;
is my username, so you&#039;d have to substitute your username.</description>
		<content:encoded><![CDATA[<p>Hi, in reply to the latest pingback (comment #2; I&#8217;m not signed up to the forum it links to) &#8212; what exactly doesn&#8217;t work for you? Note that &#8220;mpromber&#8221; in this line</p>
<pre>xhost local:mpromber > /dev/null</pre>
<p>is my username, so you&#8217;d have to substitute your username.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hello, Zenity + crontab</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-41157</link>
		<dc:creator>Hello, Zenity + crontab</dc:creator>
		<pubDate>Thu, 04 Nov 2010 13:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-41157</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: man</title>
		<link>http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/comment-page-1/#comment-36144</link>
		<dc:creator>man</dc:creator>
		<pubDate>Thu, 18 Mar 2010 09:41:58 +0000</pubDate>
		<guid isPermaLink="false">http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/#comment-36144</guid>
		<description>Wow, thanks this was frustrating to get it working.</description>
		<content:encoded><![CDATA[<p>Wow, thanks this was frustrating to get it working.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

