<?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"
	>
<channel>
	<title>Comments on: Popping up the GNOME &#8220;Run Application&#8221; dialog from a script</title>
	<atom:link href="http://darkness.codefu.org/wordpress/2004/07/24/152/feed" rel="self" type="application/rss+xml" />
	<link>http://darkness.codefu.org/wordpress/2004/07/24/152</link>
	<description></description>
	<pubDate>Wed, 10 Mar 2010 11:21:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: ubuntu update to 9.04 :: missing alt+f2 &#124; yet another draggy weblog</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-75742</link>
		<dc:creator>ubuntu update to 9.04 :: missing alt+f2 &#124; yet another draggy weblog</dc:creator>
		<pubDate>Sun, 14 Jun 2009 12:02:03 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-75742</guid>
		<description>[...] this page gave me the first hint, but i have had to change following line &#8220;event.data.l[1] = (Time)0;&#8221; to following &#8220;event.data.l[1] = (Time) time(NULL);&#8221; to get a auto-focused window! [...]</description>
		<content:encoded><![CDATA[<p>[...] this page gave me the first hint, but i have had to change following line &#8220;event.data.l[1] = (Time)0;&#8221; to following &#8220;event.data.l[1] = (Time) time(NULL);&#8221; to get a auto-focused window! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sözcü</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-74056</link>
		<dc:creator>Sözcü</dc:creator>
		<pubDate>Sat, 11 Apr 2009 07:37:05 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-74056</guid>
		<description>Optional to make it work like Windows’ Start-Run command
- Right-click “Applications” menu in Panel.
- Click Edit Menus
- Click New Item
- In the Create Launcher window type Name: Run, Command: gnome-run,</description>
		<content:encoded><![CDATA[<p>Optional to make it work like Windows’ Start-Run command<br />
- Right-click “Applications” menu in Panel.<br />
- Click Edit Menus<br />
- Click New Item<br />
- In the Create Launcher window type Name: Run, Command: gnome-run,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ciantic</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-70433</link>
		<dc:creator>Ciantic</dc:creator>
		<pubDate>Fri, 27 Feb 2009 21:08:49 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-70433</guid>
		<description>Uhh, always on top? Anyone?</description>
		<content:encoded><![CDATA[<p>Uhh, always on top? Anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yyj</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-36616</link>
		<dc:creator>yyj</dc:creator>
		<pubDate>Mon, 21 Apr 2008 07:36:43 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-36616</guid>
		<description>see all the comment here,still not find a way to popup the run dialog</description>
		<content:encoded><![CDATA[<p>see all the comment here,still not find a way to popup the run dialog</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allan Bogh</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-35175</link>
		<dc:creator>Allan Bogh</dc:creator>
		<pubDate>Tue, 18 Mar 2008 18:33:23 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-35175</guid>
		<description>This worked great, but bee was right that it needed to be set to the current time. Try this:

- Copy gnome-run.c to a folder.
- Edit gnome-run.c, line 37: 
    "event.data.l[1] = (Time)0;" 
    change to "event.data.l[1] = (Time)(time(NULL) * 1000);"
- Open terminal window
- Navigate to folder with gnome-run.c
- Type:  gcc gnome-run.c -o gnome-run -L/usr/X11R6/lib -lX11
- Type:  sudo mv gnome-run /usr/bin/

Optional to make it work like Windows' Start-Run command
- Right-click "Applications" menu in Panel.
- Click Edit Menus
- Click New Item
- In the Create Launcher window type Name: Run, Command: gnome-run, press OK
- In Main Menu window move the Run command to the top if your panel is at the top of your screen, or to whatever other location you want.
- You can repeat this process for gksu and call it "Run As"</description>
		<content:encoded><![CDATA[<p>This worked great, but bee was right that it needed to be set to the current time. Try this:</p>
<p>- Copy gnome-run.c to a folder.<br />
- Edit gnome-run.c, line 37:<br />
    &#8220;event.data.l[1] = (Time)0;&#8221;<br />
    change to &#8220;event.data.l[1] = (Time)(time(NULL) * 1000);&#8221;<br />
- Open terminal window<br />
- Navigate to folder with gnome-run.c<br />
- Type:  gcc gnome-run.c -o gnome-run -L/usr/X11R6/lib -lX11<br />
- Type:  sudo mv gnome-run /usr/bin/</p>
<p>Optional to make it work like Windows&#8217; Start-Run command<br />
- Right-click &#8220;Applications&#8221; menu in Panel.<br />
- Click Edit Menus<br />
- Click New Item<br />
- In the Create Launcher window type Name: Run, Command: gnome-run, press OK<br />
- In Main Menu window move the Run command to the top if your panel is at the top of your screen, or to whatever other location you want.<br />
- You can repeat this process for gksu and call it &#8220;Run As&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harrison</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-34338</link>
		<dc:creator>Harrison</dc:creator>
		<pubDate>Sun, 24 Feb 2008 23:14:20 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-34338</guid>
		<description>Try this shell command too:

`zenity --entry --text="Run command:" --width=400`</description>
		<content:encoded><![CDATA[<p>Try this shell command too:</p>
<p>`zenity &#8211;entry &#8211;text=&#8221;Run command:&#8221; &#8211;width=400`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gnome&#8217;s Run Command Dialog &#171; Bee.ography</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-29871</link>
		<dc:creator>Gnome&#8217;s Run Command Dialog &#171; Bee.ography</dc:creator>
		<pubDate>Thu, 29 Nov 2007 04:53:16 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-29871</guid>
		<description>[...] google took me to this blog. The blog owner has a small program to pop up Gnome&#8217;s Run Command dialog. As it&#8217;s a [...]</description>
		<content:encoded><![CDATA[<p>[...] google took me to this blog. The blog owner has a small program to pop up Gnome&#8217;s Run Command dialog. As it&#8217;s a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkness</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-29867</link>
		<dc:creator>darkness</dc:creator>
		<pubDate>Wed, 28 Nov 2007 23:22:37 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-29867</guid>
		<description>&gt; It doesn't make sense. Of course it's not rude, because you click it on purpose. It's user driven event.

I guess the idea is that the run dialog should always have focus?  In general, just because I "click" on something does not mean I want it to be in the front and have focus.  For example, if you start up some program that takes a while to run (say, oowriter) you may have already gone off to do something else (e.g. work on an e-mail in a terminal window).  It would be annoying if, mid-keystroke, oowriter took focus (which it does anyway, harumph).  I guess the run dialog could be special, though.

Anyway, the way in which it's decided what should and shouldn't get focus is clearly something I don't understand.  I'm guessing that this "time" you speak of indicates when the event was sent, and if something like a focus change happens after that time (the time of the last focus change, or some other event, presumably being tracked by the X server and/or window manager?) focus is not changed?  So by setting it to the current time, especially on a fast computer, you should have no problems.  That's just my guess though.

At any rate, thanks for looking in to this and posting your results here.  I'm sure others will find it helpful (maybe including me).</description>
		<content:encoded><![CDATA[<p>> It doesn&#8217;t make sense. Of course it&#8217;s not rude, because you click it on purpose. It&#8217;s user driven event.</p>
<p>I guess the idea is that the run dialog should always have focus?  In general, just because I &#8220;click&#8221; on something does not mean I want it to be in the front and have focus.  For example, if you start up some program that takes a while to run (say, oowriter) you may have already gone off to do something else (e.g. work on an e-mail in a terminal window).  It would be annoying if, mid-keystroke, oowriter took focus (which it does anyway, harumph).  I guess the run dialog could be special, though.</p>
<p>Anyway, the way in which it&#8217;s decided what should and shouldn&#8217;t get focus is clearly something I don&#8217;t understand.  I&#8217;m guessing that this &#8220;time&#8221; you speak of indicates when the event was sent, and if something like a focus change happens after that time (the time of the last focus change, or some other event, presumably being tracked by the X server and/or window manager?) focus is not changed?  So by setting it to the current time, especially on a fast computer, you should have no problems.  That&#8217;s just my guess though.</p>
<p>At any rate, thanks for looking in to this and posting your results here.  I&#8217;m sure others will find it helpful (maybe including me).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bee</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-29863</link>
		<dc:creator>bee</dc:creator>
		<pubDate>Wed, 28 Nov 2007 17:26:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-29863</guid>
		<description>&#62; It often seems rude when windows try to pop up front and take focus without my permission

It doesn't make sense. Of course it's not rude, because you click it on purpose. It's user driven event. After a few hours dug the xlib programming tutorials, I found the cause. It's because you set the launch time (l[1] argument) to zero! That's why the window never got focus. The window manager think that it was already clicked years ago! :D By setting it to current time, it works perfectly! Now I don't need to install devilspie or configure compiz's windows matches. Thanks for the code. :)</description>
		<content:encoded><![CDATA[<p>&gt; It often seems rude when windows try to pop up front and take focus without my permission</p>
<p>It doesn&#8217;t make sense. Of course it&#8217;s not rude, because you click it on purpose. It&#8217;s user driven event. After a few hours dug the xlib programming tutorials, I found the cause. It&#8217;s because you set the launch time (l[1] argument) to zero! That&#8217;s why the window never got focus. The window manager think that it was already clicked years ago! :D By setting it to current time, it works perfectly! Now I don&#8217;t need to install devilspie or configure compiz&#8217;s windows matches. Thanks for the code. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkness</title>
		<link>http://darkness.codefu.org/wordpress/2004/07/24/152#comment-29857</link>
		<dc:creator>darkness</dc:creator>
		<pubDate>Wed, 28 Nov 2007 13:49:35 +0000</pubDate>
		<guid isPermaLink="false">/?p=152#comment-29857</guid>
		<description>Good question.  I'm afraid I don't know what code would be necessary to make this pop to the front--or if that's even possible.  It often seems rude when windows try to pop up front and take focus without my permission, and I believe many window managers (including my window manager of choice, Sawfish) have options to try and prevent this.

Sawfish also has a "matched windows" functionality that allows you to match certain characteristics of windows, such as title, and perform certain actions on those windows, like bringing them to the front and focusing them when they appear.  I use this functionality to bring my gnome-run window to the front and focus it.  Other window managers may have something like this too; for example, Gnome's default window manager Metacity has Devil's Pie[1].

Sorry I couldn't be of more help.

darkness

[1] http://www.burtonini.com/blog/computers/devilspie</description>
		<content:encoded><![CDATA[<p>Good question.  I&#8217;m afraid I don&#8217;t know what code would be necessary to make this pop to the front&#8211;or if that&#8217;s even possible.  It often seems rude when windows try to pop up front and take focus without my permission, and I believe many window managers (including my window manager of choice, Sawfish) have options to try and prevent this.</p>
<p>Sawfish also has a &#8220;matched windows&#8221; functionality that allows you to match certain characteristics of windows, such as title, and perform certain actions on those windows, like bringing them to the front and focusing them when they appear.  I use this functionality to bring my gnome-run window to the front and focus it.  Other window managers may have something like this too; for example, Gnome&#8217;s default window manager Metacity has Devil&#8217;s Pie[1].</p>
<p>Sorry I couldn&#8217;t be of more help.</p>
<p>darkness</p>
<p>[1] <a href="http://www.burtonini.com/blog/computers/devilspie" rel="nofollow">http://www.burtonini.com/blog/computers/devilspie</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
