<?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>Yari</title>
	<atom:link href="http://www.yari.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.yari.net/blog</link>
	<description>Io non ho un blog perchè non ne ho motivo e probabilmente neanche tu</description>
	<lastBuildDate>Sun, 01 Aug 2010 10:28:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Zenity!</title>
		<link>http://www.yari.net/blog/?p=65</link>
		<comments>http://www.yari.net/blog/?p=65#comments</comments>
		<pubDate>Mon, 21 Dec 2009 20:25:24 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[geekotopia]]></category>
		<category><![CDATA[padsp]]></category>
		<category><![CDATA[wine]]></category>
		<category><![CDATA[world of warcraft]]></category>
		<category><![CDATA[zenity]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=65</guid>
		<description><![CDATA[Probabilmente tutti già conoscevano zenity tranne me. Si tratta di un tool con cui poter &#8220;dialogare&#8221; con Gnome per mandare notifiche all&#8217;utente da riga di comando (fondamentalmente popup con vari widget). Ad ogni modo mi sono trovato ad avere il seguente problema. Io e mio figlio Filippo (7 anni) condividiamo lo stesso desktop a casa [...]]]></description>
			<content:encoded><![CDATA[<p>Probabilmente tutti già conoscevano zenity tranne me. Si tratta di un tool con cui poter &#8220;dialogare&#8221; con Gnome per mandare notifiche all&#8217;utente da riga di comando (fondamentalmente popup con vari widget). Ad ogni modo mi sono trovato ad avere il seguente problema. Io e mio figlio Filippo (7 anni) condividiamo lo stesso desktop a casa (c&#8217;è crisi&#8230;) e siccome tutti e due giochiamo a World of Warcraft e il desktop in questione ha come sistema operativo Ubuntu 9.04 mi sono ritrovato ad avere qualche problema per via del tempo necessario per far partire Wow con wine senza dare alcun feedback (Filippo ha il click un po&#8217; compulsivo e si ritrovava con 4 finestre&#8230;). Dopo vari test e copia-incolla qua e là ho preparato uno script per far partire il gioco che &#8220;cerca&#8221; di evitare gli startup &#8220;concorrenti&#8221; e al tempo da un feedback minimo all&#8217;utente (grazie a zenity che a tale scopo si è dimostrato fenomenale) <img src='http://www.yari.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre><textarea cols="52" rows="50" readonly="readonly">#!/bin/bash
(
PID_FILE=~/.wow.pid
LOG_FILE=~/.wow.log
LOCK_FILE=~/.wow.lock
ZENITY=/usr/bin/zenity
ALREADY_RUNNING=0
if [ -f $LOCK_FILE ]; then
	#echo 100
	#zenity --info --text "World of Warcraft è già in esecuzione \(cod. 1\)"
	zenity --question --text "World of Warcraft potrebbe essere in fase di esecuzione, vuoi sbloccare l'avvio?"
	if [ $? -eq 0 ]; then
		rm -rf $LOCK_FILE
	else
		echo 100
		exit 1
	fi
fi
echo "true" &gt; $LOCK_FILE
if [ -f $PID_FILE ]; then
	RUNNING_PID=`cat $PID_FILE`
	echo "Running process PID: $RUNNING_PID"
	echo 1
	sleep 1
	CHECK_PROCESS=`ps -p $RUNNING_PID|grep -v 'PID TTY          TIME CMD'`
	echo 2
	sleep 1
	echo "Running process details: $CHECK_PROCESS"
	if [ "$CHECK_PROCESS" = "" ]; then
		echo "PID no longer used by Wow.exe"
	else
		ALREADY_RUNNING=1
		echo "Wow.exe is already running with PID=$RUNNING_PID [$CHECK_PROCESS]" &gt;&gt; $LOG_FILE
		#zenity --info --text "World of Warcraft è già in esecuzione\n(PID=$RUNNING_PID [$CHECK_PROCESS])"
	fi
	echo 3
	sleep 1
fi
if [ "$ALREADY_RUNNING" = "1" ]; then
	echo "Wow.exe is already running"
	sleep 1
	echo 100
	rm -rf $LOCK_FILE
	zenity --info --text "World of Warcraft è già in esecuzione (cod. 2)"
	exit 1
fi
echo "Starting Wow.exe"
echo 4
env WINE_CURSOR=anything padsp wine "C:\World of Warcraft\Wow.exe" -opengl &gt; $LOG_FILE 2&gt;&amp;1 &amp;
echo $! &gt; $PID_FILE
rm -rf $LOCK_FILE
for a in `seq 5 100` ;
do
echo $a;
sleep 0.10;
done
)| zenity --auto-close --progress --text="Avvio di World of Warcraft in corso..." --title="World of Warcraft"
</textarea></pre>
<p>Alcune note:</p>
<p>- la variabile &#8220;WINE_CURSOR&#8221; serve per una patch che ho applicato a wine per poter avere il cursore hardware (altrimenti assente in WOW quando lanciato in modalità opengl)</p>
<p>- padsp è un wrapper pulse per OSS (migliora le performance sonore altrimenti un po&#8217; scadenti)</p>
<p>- i vari &#8220;echo &lt;numero&gt;&#8221; servono a far avanzare la progress bar di zenity (in pratica lo script vero e proprio è quello tra parentesi tonde, viene messo in pipe con zenity che interpreta le righe con numero per far avanzare la barra)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>L&#8217;uomo dell&#8217;anno</title>
		<link>http://www.yari.net/blog/?p=61</link>
		<comments>http://www.yari.net/blog/?p=61#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:23:15 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[Art]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=61</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/zZN1puUwH0c&amp;hl=it_IT&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/zZN1puUwH0c&amp;hl=it_IT&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Democratico dissenso</title>
		<link>http://www.yari.net/blog/?p=42</link>
		<comments>http://www.yari.net/blog/?p=42#comments</comments>
		<pubDate>Wed, 25 Nov 2009 16:37:23 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[berlusconi]]></category>
		<category><![CDATA[bersani]]></category>
		<category><![CDATA[disegni]]></category>
		<category><![CDATA[pd]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=42</guid>
		<description><![CDATA[Chiaramente l&#8217;immagine è frutto del genio di Stefano Disegni.]]></description>
			<content:encoded><![CDATA[<p><a href="http://s37.photobucket.com/albums/e79/yarilc/?action=view&amp;current=disegni_20091121.jpg" target="_blank"><img src="http://i37.photobucket.com/albums/e79/yarilc/disegni_20091121.jpg" border="0" alt="Photobucket" width="440" height="368" /></a></p>
<p>Chiaramente l&#8217;immagine è frutto del genio di Stefano Disegni.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lezione di cinema</title>
		<link>http://www.yari.net/blog/?p=24</link>
		<comments>http://www.yari.net/blog/?p=24#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:02:57 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Crap]]></category>
		<category><![CDATA[calamari wrestler]]></category>
		<category><![CDATA[sea monsters]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=24</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/bYdjTrRPPAI&amp;hl=it_IT&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/bYdjTrRPPAI&amp;hl=it_IT&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capolavoro assoluto</title>
		<link>http://www.yari.net/blog/?p=18</link>
		<comments>http://www.yari.net/blog/?p=18#comments</comments>
		<pubDate>Fri, 13 Nov 2009 14:59:30 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Crap]]></category>
		<category><![CDATA[giant octopus]]></category>
		<category><![CDATA[mega shark]]></category>
		<category><![CDATA[sea monsters]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=18</guid>
		<description><![CDATA[Non posso fare a meno di guardare e riguardare questi filmati.]]></description>
			<content:encoded><![CDATA[<p>Non posso fare a meno di guardare e riguardare questi filmati.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/iqIBCQur5E0&amp;hl=it_IT&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/iqIBCQur5E0&amp;hl=it_IT&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/axPItX6liRM&amp;hl=it_IT&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/axPItX6liRM&amp;hl=it_IT&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Fa7ck5mcd1o&amp;hl=it_IT&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/Fa7ck5mcd1o&amp;hl=it_IT&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metti che&#8230;</title>
		<link>http://www.yari.net/blog/?p=3</link>
		<comments>http://www.yari.net/blog/?p=3#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:58:58 +0000</pubDate>
		<dc:creator>Yari</dc:creator>
				<category><![CDATA[Crap]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[fuffa]]></category>

		<guid isPermaLink="false">http://www.yari.net/blog/?p=3</guid>
		<description><![CDATA[Nel caso qualcuno pensasse che questo dominio non è in uso ho preferito metterci almeno un blog, pieno di niente (come la maggior parte dei blog esistenti ofc).]]></description>
			<content:encoded><![CDATA[<p>Nel caso qualcuno pensasse che questo dominio non è in uso ho preferito metterci almeno un blog, pieno di niente (come la maggior parte dei blog esistenti ofc).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yari.net/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
