<?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>soledad penadés &#187; trick</title>
	<atom:link href="http://soledadpenades.com/tag/trick/feed/" rel="self" type="application/rss+xml" />
	<link>http://soledadpenades.com</link>
	<description>repeat 4[fd 100 rt 90]</description>
	<lastBuildDate>Sun, 29 Jan 2012 23:03:40 +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>A hack to parse RSS feeds with php</title>
		<link>http://soledadpenades.com/2012/01/21/a-hack-to-parse-rss-feeds-with-php/</link>
		<comments>http://soledadpenades.com/2012/01/21/a-hack-to-parse-rss-feeds-with-php/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 17:19:37 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3883</guid>
		<description><![CDATA[Just happened to assemble this script hack recently, out of the requirement for a quick&#8217;n'dirty feed parsing feature: $feed_contents = file_get_contents&#40;$feed_url&#41;; $xml = simplexml_load_string&#40;$feed_contents, LIBXML_NOCDATA&#41;; $feed_array = json_decode&#40;json_encode&#40;$xml&#41;&#41;; print_r&#40;$feed_array&#41;; // Surprise!! Now this evidently is not SimplePie or Magpie RSS or whatever feed reader library tickles your fancy*, but assuming the feed will never be [...]]]></description>
			<content:encoded><![CDATA[<p>Just happened to assemble this <del datetime="2012-01-21T16:52:31+00:00">script</del> hack recently, out of the requirement for a quick&#8217;n'dirty feed parsing feature:</p>
<div class="syhi_block"><code><span style="color: #000088;">$feed_contents</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/simplexml_load_string"><span style="color: #990000;">simplexml_load_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_contents</span><span style="color: #339933;">,</span> LIBXML_NOCDATA<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
<span style="color: #000088;">$feed_array</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/json_decode"><span style="color: #990000;">json_decode</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/json_encode"><span style="color: #990000;">json_encode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Surprise!!</span></code></div>
<p>Now this evidently is <em>not</em> <a href="http://simplepie.org/">SimplePie</a> or <a href="http://magpierss.sourceforge.net/">Magpie RSS</a> or whatever feed reader library tickles your fancy<a href="http://www.phrases.org.uk/bulletin_board/5/messages/888.html"><super>*</super></a>, but assuming the feed will never be malformed, it can save you lots of time! Isn&#8217;t that what php was meant for? :-P<br />
<span id="more-3883"></span><br />
At first it surprised me that it would even work&#8211;but it seems that the JSON module interoperates very nicely with SimpleXML objects. At the end you get an associative array in $feed_array which is a nice representation of the RSS 2 feed. It&#8217;s important to highlight the <strong>LIBXML_NOCDATA</strong> parameter, as it makes sure the CDATA nodes are read as text. Otherwise you would just get empty feed items, etc.</p>
<p>Obviously for this to work you need both the JSON and SimpleXML modules installed and enabled in your server. Since that&#8217;s something that always worries me, I wrote another quick script to test whether the hack would work on the server:</p>
<div class="syhi_block"><code><span style="color: #000088;">$functions</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'simplexml_load_string'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'json_decode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$functions</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$f</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$f</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' exists? '</span> <span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'yes'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'no'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></code></div>
<p>It should output something like&#8230;</p>
<div class="syhi_block"><code>simplexml_load_string yes<br />
json_decode yes</code></div>
<p>Happy hacking! :-P</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3883&amp;md5=15f8fcbbdc06d67bd17dfd2a232b5df0" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2012/01/21/a-hack-to-parse-rss-feeds-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix the &#8220;fluxgui is already running, exiting&#8221; error</title>
		<link>http://soledadpenades.com/2011/08/01/fix-the-fluxgui-is-already-running-exiting-error/</link>
		<comments>http://soledadpenades.com/2011/08/01/fix-the-fluxgui-is-already-running-exiting-error/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 06:42:07 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[flux]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3599</guid>
		<description><![CDATA[It seems fluxgui had crashed previously, or maybe I had killed it some days ago and forgot about it entirely. When I tried to restart it, it didn&#8217;t do anything. Launching it from the command line returned the &#8220;Fix the &#8220;fluxgui is already running, exiting&#8221;" message. Looking at the most recent version of fluxgui code, [...]]]></description>
			<content:encoded><![CDATA[<p>It seems fluxgui had crashed previously, or maybe I had killed it some days ago and forgot about it entirely. When I tried to restart it, it didn&#8217;t do anything. Launching it from the command line returned the &#8220;Fix the &#8220;fluxgui is already running, exiting&#8221;" message.</p>
<p>Looking at <a href="https://github.com/Kilian/f.lux-indicator-applet/blob/master/src/fluxgui/fluxgui.py">the most recent version</a> of fluxgui code, I thought there would be some sort of .pid file in my home directory:</p>
<div class="syhi_block"><code><span style="color: #008000;">self</span>.<span style="color: black;">pidfile</span> = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">expanduser</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;~/.fluxgui.pid&quot;</span><span style="color: black;">&#41;</span></code></div>
<p>but I was wrong; there wasn&#8217;t any fluxgui.pid file in my directory. The git version is not the same that is published in the <a href="http://stereopsis.com/flux/linux.html">PPA</a>, and as such there might have been some changes to where the PID file is saved.</p>
<p>I found mine was actually in <strong>/tmp</strong>, so the only thing I needed doing was deleting the file:</p>
<div class="syhi_block"><code><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fluxgui_sole.pid</code></div>
<p>Obviously, unless your username is <em>sole</em> too, the name of your file will be different, so have a look at /tmp before trying to delete anything :-P</p>
<div class="syhi_block"><code>sole<span style="color: #000000; font-weight: bold;">@</span>courgette:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>flux<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> sole sole <span style="color: #000000;">4</span> <span style="color: #000000;">2011</span>-08-01 08:<span style="color: #000000;">21</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fluxgui_sole.pid<br />
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> sole sole <span style="color: #000000;">0</span> <span style="color: #000000;">2011</span>-08-01 08:<span style="color: #000000;">21</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fluxlog.txt</code></div>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3599&amp;md5=042a0d5b08bde88ca0b1572bc3c5daf1" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/08/01/fix-the-fluxgui-is-already-running-exiting-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android&#8217;s activity stack and pressing HOME</title>
		<link>http://soledadpenades.com/2011/06/14/androids-activity-stack-and-pressing-home/</link>
		<comments>http://soledadpenades.com/2011/06/14/androids-activity-stack-and-pressing-home/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 10:53:21 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[activity]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[stack overflow]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3545</guid>
		<description><![CDATA[I was having a huge issue with the application I&#8217;m working on. The idea is to have a MainActivity and a GameActivity; when you&#8217;re in MainActivity and click on a certain button, you get GameActivity. So far so good. The problem was that if I pressed HOME and then clicked again on the application launcher, [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a huge issue with the application I&#8217;m working on. The idea is to have a <em>MainActivity</em> and a <em>GameActivity</em>; when you&#8217;re in <em>MainActivity</em> and click on a certain button, you get <em>GameActivity</em>. So far so good.</p>
<p>The problem was that if I pressed <em>HOME</em> and then clicked again on the application launcher, I was brought to the <em>MainActivity</em> instead of <em>GameActivity</em>. The expected behaviour by default in Android would be to return to <em>GameActivity</em>, which was the top activity in the application&#8217;s activity stack. So why wasn&#8217;t this working?</p>
<p>After looking for hours and reading in detail everything in the documentation regarding the <a href="http://developer.android.com/guide/topics/manifest/activity-element.html">activity</a> section in the AndroidManifest.xml and <a href="http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html">tasks stack</a>, I decided to dare ask my first ever Stack Overflow <a href="http://stackoverflow.com/questions/6337217/how-to-return-to-the-latest-launched-activity-when-re-launching-application-after">question</a>, and went to sleep.</p>
<p>This morning, I found that two people had answered the question already. Yay! Unfortunately their answers were <strong>only tangentially related</strong> to my question. It&#8217;s amazing how complicated human language is: you ask something, people answer what they understand&#8211;and it might be completely different to what you meant to answer. </p>
<p>But I had earned an <strong>student badge</strong> and five points thanks to asking a question! Yay! Awesome! My reputation had increased to SIX points! Woooo!</p>
<p>Encouraged by this marvelous self-achievement, I decided to further pursue my quest for a proper answer, and I began to examine the list of questions related to my question. Lucky as I was, there was a particular <a href="http://stackoverflow.com/questions/2280361/app-always-starts-fresh-from-root-activity-instead-of-resuming-background-state">one</a> that answered mine!</p>
<p>So I have ended up answering my first ever Stack Overflow question, but I can&#8217;t accept my own answer yet. Booh!</p>
<p>However since this is <em>my</em> blog I&#8217;ll write my answer here and you&#8217;ll have to believe it&#8217;s the right one. So there we go.</p>
<h3>And the Answer is&#8230;</h3>
<p>I was launching the app by using IntelliJ, and it seems it launches the application in a different way than a user, clicking a home screen widget, would launch. It&#8217;s explained in the answer to another Stack Overflow <a href="http://stackoverflow.com/questions/2280361/app-always-starts-fresh-from-root-activity-instead-of-resuming-background-state">question</a>:</p>
<blockquote><p>This is due to the intents being used to start the app being different. Eclipse starts an app using an intent with no action and no category. The Launcher starts an app using an intent with android.intent.action.MAIN action and android.intent.category.LAUNCHER category. The installer starts an app with the android.intent.action.MAIN action and no category.</p></blockquote>
<p>So I&#8217;ve manually killed the application in the phone, and relaunched it again from the home screen widget. Then opened the GameActivity, and pressed HOME. Now, when relaunching it the GameActivity is still visible and keeping its UI state as it was when I left it.</p>
<p>And I guess that the reason why a new instance of the activity was created when pressing the shortcut before was due to a different Intent being used for starting the activity.</p>
<blockquote><p>In other words: when things go awry with your activities, make sure you kill your application and start anew, launching it from the phone and not from your favourite development environment.</p></blockquote>
<p>Now, I&#8217;m back to the code! \o/</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3545&amp;md5=161bd730660c58050be17a7fe767e9ea" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/06/14/androids-activity-stack-and-pressing-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to hide the camera preview in Android</title>
		<link>http://soledadpenades.com/2011/04/07/how-to-hide-the-camera-preview-in-android/</link>
		<comments>http://soledadpenades.com/2011/04/07/how-to-hide-the-camera-preview-in-android/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:18:19 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3438</guid>
		<description><![CDATA[It actually was something that intrigued me to no end. No tutorial that I&#8217;ve read explained how to do it; there were only vague (and incorrect) mentions to not setting PUSH_BUFFERS in the SurfaceHolder, but yet there were apps who were totally hiding the camera preview, such as the famous &#8220;spy camera&#8221; style apps (those [...]]]></description>
			<content:encoded><![CDATA[<p>It actually was something that intrigued me to no end. No tutorial that I&#8217;ve read explained how to do it; there were only vague (and incorrect) mentions to not setting PUSH_BUFFERS in the SurfaceHolder, but yet there were apps who were totally hiding the camera preview, such as the famous &#8220;spy camera&#8221; style apps (those that look like an innocently looking web page but actually are recording everything). So there should be a way, and I just had to find it.</p>
<p><span id="more-3438"></span></p>
<p>Things that <strong>do not work</strong>:</p>
<ul>
<li>Placing the preview outside the screen, yet still in the current layout</li>
<li>Placing another element on top of the preview &#8211;since the preview must be a <a href="http://developer.android.com/reference/android/view/SurfaceView.html">SurfaceView</a> type of View, its behaviour is to &#8220;crop&#8221; the area of screen that is in, and draw it self. So it would be visible anyway, through the &#8220;hole&#8221; it punched in the elements on top of it.</li>
<li>Setting the preview to INVISIBLE or GONE</li>
<li>Setting the preview size to a small size of 1&#215;1 (<a href="http://soledadpenades.com/2011/04/05/native-startpreview-failed-on-nexus-s-check-your-preview-size/">here&#8217;s why</a> it doesn&#8217;t work&#8230; sometimes)</li>
</ul>
<p>Can you think of yet another way of hiding the preview? :-D</p>
<p>Anyway, the <strong>solution</strong> is to follow a series of steps&#8211;it&#8217;s not a static process. Ready? </p>
<p>This is <strong>the solution</strong>:</p>
<p><em>Before</em> starting the camera preview&#8230;</p>
<ul>
<li><a href="http://developer.android.com/reference/android/hardware/Camera.html#setPreviewDisplay(android.view.SurfaceHolder)">Set</a> the camera&#8217;s preview display to the preview&#8217;s SurfaceHolder</li>
<li>Set the preview surface to VISIBLE</li>
</ul>
<p>And <em>after</em> starting the camera preview&#8230;</p>
<ul>
<li>Set the preview surface to GONE or INVISIBLE</li>
</ul>
<p>This process must be repeated each time the camera needs to start previewing. So if you stop it for whatever the reason (e.g. in onPause), remember to repeat the &#8220;before&#8221; steps, or you won&#8217;t be able to re-start the preview again. </p>
<p>If you&#8217;re lucky, it will just do nothing, because since the surface is hidden it won&#8217;t trigger surfaceChanged or surfaceCreated events. In a bad case, it can even throw a huge exception in native code, and &#8220;force close&#8221; your app, which you know drives people crazy :-P</p>
<h3>Warning, rants ahead!</h3>
<p><img src="/imgs/2011/fu.png" alt="FUUUUU" /></p>
<p>I don&#8217;t know if this &#8220;show and hide&#8221; game must be played because of&#8230;</p>
<ol>
<li>some silly restriction such as the one that mandates that camera phones have to emit an annoying <a href="http://code.google.com/p/android/issues/detail?id=9854">shutter</a> sound,</li>
<li>or if it&#8217;s just some technical restriction</li>
</ol>
<p>The first hypothesis sounds so myopically short-sighted that it actually seems quite feasible: politicians would strongly agree on it, and programmers would just make the surface so small that no hypothetical subject would notice being spied upon. Job done.</p>
<p>The second hypothesis sounds equally silly: why, oh why, do we have to assign a preview surface for the camera driver to output its frames to it if we are also requesting the raw YUV420 frames too in order to decode and process them? It&#8217;s really idiotic that the camera driver has to decode the frames and scale them in order to fit into a minuscule preview surface.</p>
<p>But whatever the reason is&#8211;I don&#8217;t really care. </p>
<p><strong>All I care about is making great stuff. And this kind of non-trivial issues prevent me from doing so.</strong></p>
<p>Imagine you&#8217;re the camera driver, and you&#8217;re requested to start a preview, right? Then if you&#8217;re provided with an output surface, output your frames there, scaling as required. If you&#8217;re provided with a preview callback, then call that method and send your raw frames there as you get them. You&#8217;re only allowed to fail and crash if you don&#8217;t get ANYTHING (no surface, no callback).</p>
<p>It&#8217;s that simple.</p>
<p>It&#8217;s reasonable, and easier to program and use. And it probably uses less processor resources if only the preview callback is used, because there&#8217;s nothing to be blitted to the preview surface, no area to be invalidated and redrawn, nothing.</p>
<p>Now we <em>simply</em> need to get the Android Camera API changed, plus all the drivers in all the phones upgraded to reflect this extremely sensible and logical approach.</p>
<p>Oh well&#8230; sometimes dreaming is the only thing that is left ^^</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3438&amp;md5=0902347dca819ba33024ec150d80c489" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/04/07/how-to-hide-the-camera-preview-in-android/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using shared network printers in Ubuntu</title>
		<link>http://soledadpenades.com/2011/01/26/using-shared-network-printers-in-ubuntu/</link>
		<comments>http://soledadpenades.com/2011/01/26/using-shared-network-printers-in-ubuntu/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 12:32:13 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printers]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3342</guid>
		<description><![CDATA[NOTE: Full credit should go to mrdoob, who found out about this. I&#8217;m just documenting it! Our home server is a Mac Mini running Ubuntu (yes, this one) with a RAID external disk for backups, and it&#8217;s also got a printer connected to it. We always wondered why did we have to install drivers in [...]]]></description>
			<content:encoded><![CDATA[<p><em>NOTE: Full credit should go to <a href="http://mrdoob.com">mrdoob</a>, who found out about this. I&#8217;m just documenting it!</em></p>
<p>Our home server is a Mac Mini running Ubuntu (yes, <a href="http://soledadpenades.com/2007/11/01/diy-replace-your-intel-mac-minis-hard-disk-drive/">this one</a>) with a RAID external disk for backups, and it&#8217;s also got a printer connected to it. We always wondered why did we have to install drivers in the rest of computers in order to print from them. It was silly: if the server already knows how to communicate with the printer, why can&#8217;t we just communicate with the server?</p>
<p>Turns out it&#8217;s just a problem of <strong>a checkbox not being set by default</strong>. Once it&#8217;s set, all <strong>the shared printers in the network will show up</strong> and you can <strong>send documents to them</strong> from virtually all computers!</p>
<p><span id="more-3342"></span></p>
<p>First, go to <em>System ⟶ Administration ⟶ Printing</em>. Then choose <em>Server ⟶ Settings</em>. And when you get the following dialog, just check the <q>Show printers shared by other systems</q> checkbox.</p>
<p><img src="/imgs/2011/ubuntu_network_printer_sharing_01.png" alt="" /></p>
<p>If no printer shows up yet, click the <q>Reload</q> button (i.e. the blue round arrow which is more or less under the <q>Group</q> menu option in the screenshot).</p>
<p>And voilà, your shared network printer(s) will appear in the list of available printers. You don&#8217;t need to <q>Add</q> the printer, since it&#8217;s shared by the server.</p>
<p><img src="/imgs/2011/ubuntu_network_printer_sharing_02.png" alt="" /></p>
<p>Now you can print from your favourite program in your computer&#8211;just select the network printer in the printer dialog. Yay!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3342&amp;md5=729cfb5a140edbc6af6295a5739ac27a" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/01/26/using-shared-network-printers-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

