<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cat brain.stuff &#62; wordpress &#187; screen</title>
	<atom:link href="http://famvdploeg.com/blog/tag/screen/feed/" rel="self" type="application/rss+xml" />
	<link>http://famvdploeg.com/blog</link>
	<description>A simple look on things</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:09:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sending commands to detached screens</title>
		<link>http://famvdploeg.com/blog/2007/11/sending-commands-to-detached-screens/</link>
		<comments>http://famvdploeg.com/blog/2007/11/sending-commands-to-detached-screens/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 12:40:22 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[execute]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=26</guid>
		<description><![CDATA[For running Azureus headless on my linux machine I use screen so it runs in a separate screen. The command to do this is the following: screen -d -m -S azureus su -p azureus -c &#34;/opt/azureus/azureus.sh&#34; This will create a detached screen with the name &#8220;azureus&#8221; which will run the command &#8220;su -p azureus -c [...]]]></description>
			<content:encoded><![CDATA[<p>For running Azureus headless on my linux machine I use screen so it runs in a separate screen.</p>
<p>The command to do this is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">screen -d -m -S azureus su -p azureus -c &quot;/opt/azureus/azureus.sh&quot;</pre></div></div>

<p>This will create a detached screen with the name &#8220;azureus&#8221; which will run the command &#8220;su -p azureus -c &#8220;/opt/azureus/azureus.sh&#8221;</p>
<p>To send a command to this detached screen we can use the following command structure: (Which I use to tidily close the process)</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">screen -S azureus -p 0 -X eval 'stuff quit\015'</pre></div></div>

<p>-p 0 tells screen to use window 0 on the specified screen. Using the eval function makes sure the \015 char will be evaluated back into an enter character. The stuff command is used to fill the input buffer of the screen program.</p>
<p>After this the command &#8220;quit&#8221; is sent to the azureus client which will cause it to quit and close the attached screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2007/11/sending-commands-to-detached-screens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

