<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>dcop &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/dcop/</link>
	<description>Feed of posts on WordPress.com tagged "dcop"</description>
	<pubDate>Sat, 05 Dec 2009 16:15:11 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Music track for pidgin with Listen]]></title>
<link>http://tuxomaniac.wordpress.com/2009/09/26/music-track-for-pidgin-with-listen/</link>
<pubDate>Sat, 26 Sep 2009 13:22:23 +0000</pubDate>
<dc:creator>Cyriac</dc:creator>
<guid>http://tuxomaniac.wordpress.com/2009/09/26/music-track-for-pidgin-with-listen/</guid>
<description><![CDATA[If you have heard that dcop has been withdrawn, that is right. My old script for tracking music for ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you have heard that dcop has been withdrawn, that is right. My old script for <a href="http://tuxomaniac.wordpress.com/2008/12/30/amarok-music-tracker-for-pidgin/" target="_self">tracking music for pidgin from amarok</a> has stopped working, and I navigated from amarok to listen. So I had to write a new one. The script keeps your current status message and updates the song to the end of the status message. So here is the script.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-252" title="pidgin+listen" src="http://tuxomaniac.wordpress.com/files/2009/09/pidglisten.png" alt="pidgin+listen" width="277" height="155" /></p>
<p><strong>pidginstatusupdater</strong></p>
<p style="padding-left:30px;"><em>pcurrstatus=`purple-remote getstatus`<br />
pcurrstatusmsg=`purple-remote getstatusmessage`<br />
pcurrstatusmsg=`echo $pcurrstatusmsg&#124; cut -d&#8217;:&#8217; -f1`<br />
listen=`listen -c`<br />
purple-remote &#8220;setstatus?status=$pcurrstatus&#38;message=$pcurrstatusmsg :: Currently listening to &#8211; $listen&#8221;<br />
olisten=$listen<br />
while [ TRUE ]; do<br />
if [ "$olisten" != "$listen" ]<br />
then<br />
purple-remote &#8220;setstatus?status=$pcurrstatus&#38;message=$pcurrstatusmsg :: Currently listening to &#8211; $listen&#8221;<br />
olisten=$listen<br />
fi<br />
listen=`listen -c`<br />
pcurrstatus=`purple-remote getstatus`<br />
pcurrstatusmsg=`purple-remote getstatusmessage`<br />
pcurrstatusmsg=`echo $pcurrstatusmsg&#124; cut -d&#8217;:&#8217; -f1`</em><br />
<em> done</em></p>
<p>To autostart the pidgin along with tracker i wrote a new script to start both of them, named pidgin and placed it in the first location of $PATH.</p>
<p>It is <strong>pidgin</strong></p>
<p style="padding-left:30px;"><em>/home/openhappiness/pidgin/bin/pidgin&#38; </em><strong>my pidgin installation</strong><br />
<em>sleep 5<br />
/home/openhappiness/pidginstatus </em><strong>my musictracker location</strong></p>
<p>Having problems? Do ping me.</p>
<p>NOTE: make sure that there is no other instance of <strong>pidginstatusupdater </strong>running.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Buying time]]></title>
<link>http://bashinglinux.wordpress.com/2009/08/21/buying-time/</link>
<pubDate>Fri, 21 Aug 2009 16:08:05 +0000</pubDate>
<dc:creator>malkodan</dc:creator>
<guid>http://bashinglinux.wordpress.com/2009/08/21/buying-time/</guid>
<description><![CDATA[Wearing both hats of developer and SysAdmin, I believe you shouldn&#8217;t work hard as a SysAdmin. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Wearing both hats of developer and SysAdmin, I believe you shouldn&#8217;t work hard as a SysAdmin. It is for a reason that sometimes developers look at SysAdmins as inferior. It&#8217;s not because SysAdmins are really inferior, or has an easier job. I think it is mainly because a large portion of their workload could be automated. And if it can&#8217;t be automated (very little things), you should at least be able to do it quickly.</p>
<p>Obviously, we cannot buy time, but we can at least be efficient. In the following post I&#8217;ll introduce a few of my most useful aliases (or functions) I&#8217;d written and used in the last few years. Some of them are development related while the others could make you a happy SysAdmin.<br />
You may find them childish &#8211; but trust me, sometimes the most childish alias is your best friend.</p>
<h4>Jumping on the tree</h4>
<p>Our subversion trunk really reminds me of a tree sometimes. The trunk is very thick, but it has many branches and eventually many leaves. While dealing with the leaves is rare, jumping on the branches is very common. Many times i have found myself typing a lot of &#8216;cd&#8217; commands, where some are longer than others, repeatedly, just to get to a certain place. Here my stupid aliases come to help me.</p>
<p><strong>lib</strong> takes me straight away to our libraries sub directory, where <strong>sim</strong> takes me to the simulators sub directory. Not to mention <strong>tr</strong> (shortcut for trunk), which takes me exactly to the sub directory where the sources are checked out. Oh, and <strong>pup</strong> which takes me to my puppet root, on my puppet master. Yes, I&#8217;m aware to the fact that you probably wonder now &#8220;Hey, is this guy going to teach me something new today? &#8211; Aliases are for babies!!&#8221;, I can identify. I didn&#8217;t come to teach you how to write aliases, I&#8217;m here to preach you to start using aliases. Ask yourself how many useful day-to-day aliases you really have defined. Do you have any at all? &#8211; Don&#8217;t be shy to answer <em>no</em>.</p>
<p>*nix jobs are diverse and heterogeneous, but let&#8217;s see if I can encourage you to write some useful aliases after all.<br />
In case you need some ideas for aliases, run the following:<br />
<code><br />
$ history &#124; tr -s ' ' &#124; cut -d' ' -f3- &#124; sort &#124; uniq -c &#124; sort -n<br />
</code><br />
Yes, this will show the count of the most recent commands you have used. Still not getting it? &#8211; OK, I&#8217;ll give you a hint, it should be similar to this:<br />
<code><br />
$ alias recently_used_commands="history &#124; tr -s ' ' &#124; cut -d' ' -f3- &#124; sort &#124; uniq -c &#124; sort -n"<br />
</code><br />
If you did it &#8211; you&#8217;ve just kick-started your way to liberation. Enjoy.<br />
As a dessert &#8211; my last childish alias:<br />
<code><br />
$ alias rsrc='source ~/.bashrc'<br />
</code><br />
Always useful if you want to re-source your .bashrc while working on some new aliases.</p>
<p>Two more things I must mention though:</p>
<ol>
<li>Enlarge your history size, I guess you can figure out alone how to do it.</li>
<li>If you&#8217;re feeling generous &#8211; periodically collect the history files from your fellow team members (automatically of course, with another alias) and create aliases that will suit them too.</li>
</ol>
<h4>The serial SSHer</h4>
<p>Our network is on 192.168.8.0/24. Many times I&#8217;ve found myself issuing commands like:<br />
<code><br />
$ ssh root@192.168.8.1<br />
$ ssh root@192.168.8.2<br />
$ ssh root@192.168.8.3<br />
</code><br />
Dozens of these in a single day. It was really frustrating. One day I decided to make an end to it:</p>
<pre><code>
# function for easier ssh
# $1 - network
# $2 - subnet
# $3 - host in subnet
_ssh_specific_network() {
	local network=$1; shift
	local subnet=$1; shift
	local host=$1; shift
	ssh root@$network.$subnet.$host
}

# easy ssh to 192.168.8.0/24
# $1 - host
_ssh_net_192_168_8() {
	local host=$1; shift
	_ssh_specific_network 192.168 8 $host
}
alias ssh8='_ssh_net_192_168_8'
</code></pre>
<p>Splendid, now I can run the following:<br />
<code><br />
$ ssh8 1<br />
</code><br />
Which is equal to:<br />
<code><br />
$ ssh root@192.168.8.1<br />
</code><br />
Childish, but extremely efficient. Do it also for other commands you would like to use, such as <em>ping</em>, <em>telnet</em>, <em>rdesktop</em> and many others.</p>
<h4>The cop</h4>
<p>Using KDE&#8217;s konsole? &#8211; I really like DCOP, let&#8217;s add some spice to the above function, we&#8217;ll rename the session name to the host we&#8217;ll ssh to, and then restore the session name back after logging out:</p>
<pre><code>
# returns session name
_konsole_get_session_name() {
	# using dcop - obtain session name
	dcop $KONSOLE_DCOP_SESSION sessionName
}

# renames a konsole session
# $1 - session name
_konsole_rename_session_name() {
	local session_name=$1; shift
	_konsole_store_session_name `_konsole_get_session_name`
	dcop $KONSOLE_DCOP_SESSION renameSession "$session_name"
}

# store the current session name
_konsole_store_session_name() {
	STORED_SESSION_NAME=`_konsole_get_session_name`
}

# restores session name
_konsole_restore_session_name() {
	if [ x"$STORED_SESSION_NAME" != x ]; then
		_konsole_rename_session_name "$STORED_SESSION_NAME"
	fi
}

# function for easier ssh
# $1 - network
# $2 - subnet
# $3 - host in subnet
_ssh_specific_network() {
	local network=$1; shift
	local subnet=$1; shift
	local host=$1; shift
	# rename the konsole session name
	_konsole_rename_session_name .$subnet.$host
	ssh root@$network.$subnet.$host
	# restore the konsole session name
	_konsole_restore_session_name
}
</code></pre>
<p>Extend it as needed, this is only the tip of the iceberg! I can assure you that my aliases are much more complex than these.</p>
<h4>Finders keepers</h4>
<p>For the next one I&#8217;m not taking full credit &#8211; this one belongs to Uri Sivan &#8211; obviously one of the better developers I&#8217;ve met along the way.<br />
Grepping cpp files is essential, many times I&#8217;ve found myself looking for a function reference on all of our cpp files.<br />
The following usually does it:<br />
<code><br />
$ find . -name "*.cpp" &#124; xargs grep -H -r 'HomeCake'<br />
</code><br />
But seriously, do I look like someone that likes to work hard?</p>
<pre><code>
# $* - string to grep
grepcpp() {
	local grep_string="$*";
	local filename=""
	find . -name "*.cpp" -exec grep -l "$grep_string" "{}" ";" &#124; while read filename; do
		echo "=== $filename"
		grep -C 3 --color=AUTO "$grep_string" "$filename"
		echo ""
	done
}
</code></pre>
<p>OK, let&#8217;s generalize it:</p>
<pre><code>
# grepping made easy, taken from the suri
# grepext - grep by extension
# $1 - extension of file
# $* - string to grep
_grepext() {
	local extension=$1; shift
	local grep_string="$*"
	local filename=""
	find . -name "*.${extension}" -exec grep -l "$grep_string" "{}" ";" &#124; while read filename; do
		echo "=== $filename"
		grep -C 3 --color=AUTO "$grep_string" "$filename"
		echo ""
	done
}

# meta generate the grepext functions
declare -r GREPEXT_EXTENSIONS="h c cpp spec vpj sh php html js"
_meta_generate_grepext_functions() {
	local tmp_grepext_functions=`mktemp`
	local extension=$1; shift
	for extension in $GREPEXT_EXTENSIONS; do
		echo "grep$extension() {" &#62;&#62; $tmp_grepext_functions
		echo '  local grep_string=$*' &#62;&#62; $tmp_grepext_functions
		echo '  _grepext '"$extension"' "$grep_string"' &#62;&#62; $tmp_grepext_functions
		echo "}" &#62;&#62; $tmp_grepext_functions
	done
	source $tmp_grepext_functions
	rm -f $tmp_grepext_functions
}
</code></pre>
<p>After this, you have all of your C++/Bash/PHP/etc developers happy!</p>
<h4>Time to showoff</h4>
<p>My development environment is my theme park, here is my proof:<br />
<code><br />
$ (env; declare -f; alias) &#124; wc -l<br />
2791<br />
</code><br />
I encourage you to run this as well, if my line count is small and I&#8217;m bragging about something I shouldn&#8217;t &#8211; <strong>let me know!</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fedora y KDE: ERROR: Couldn’t attach to DCOP server!]]></title>
<link>http://mirutalibre.wordpress.com/2009/07/28/fedora-y-kde-error-couldn%e2%80%99t-attach-to-dcop-server/</link>
<pubDate>Tue, 28 Jul 2009 20:50:04 +0000</pubDate>
<dc:creator>zuargo</dc:creator>
<guid>http://mirutalibre.wordpress.com/2009/07/28/fedora-y-kde-error-couldn%e2%80%99t-attach-to-dcop-server/</guid>
<description><![CDATA[Actualización: 28 de Julio de 2009. Con la salida de KDE4 DCOP fue sustituido por DBUS. Me entero a ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;"><img class="alignright size-full wp-image-160" title="executable-script" src="http://mirutalibre.wordpress.com/files/2009/07/executable-script.png" alt="executable-script" width="128" height="128" /></p>
<p style="text-align:justify;"><strong><span style="color:#ff0000;">Actualización:</span> 28 de Julio de 2009. <a href="http://www.kdedevelopers.org/node/2058" target="_blank">Con la salida de KDE4 DCOP fue sustituido por DBUS</a>.</strong></p>
<p style="text-align:justify;">Me entero a través de <a href="http://chgonzalez.blogspot.com/" target="_blank">Cristian</a> (mirar primer comentario de esta entrada)  que KDE ya no usa <a href="http://es.wikipedia.org/wiki/DCOP" target="_blank">DCOP</a> sino que ahora usa <a href="http://es.wikipedia.org/wiki/D-BUS" target="_blank">DBUS</a>. <a href="http://www.kdedevelopers.org/node/2058" target="_blank">Fué sustituido en KDE4.</a> Por lo tanto, si a alguien le llegara a ocurrir un problema similar al mencionado en esta entrada debería ponerse en contacto con el creado del script o del programa para indicarle, a el, que <a href="http://es.wikipedia.org/wiki/DCOP" target="_blank">DCOP</a> está obsoleto en KDE y que ahora se usa <a href="http://es.wikipedia.org/wiki/D-BUS" target="_blank">DBUS</a>.</p>
<p style="text-align:justify;">Ayer me disponía a instalar un <a href="http://kde-look.org/content/show.php/AdriX+KDE+Icon+Theme?content=84261" target="_blank">nuevo tema de íconos</a> para mi KDE4. Dicho tema de íconos trae un script sh (¿así se dice o no?) que se debe ejecutar para que se generen los íconos correspondientes a nuestra distribución. Al momento de ejecutar el archivo sh me apareció el siguiente error:</p>
<blockquote><p><code>$ ./buildset.sh</code><br />
AdriX KDE icon theme buildscript<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Checking dependencies&#8230;</p>
<p>Checking for bzip2&#8230;   found /usr/bin/bzip2<br />
Checking for tar&#8230;     found /bin/tar<br />
Checking for convert&#8230; found /usr/bin/convert<br />
Checking for bc&#8230;      found /usr/bin/bc<br />
checking for kdialog&#8230; found /usr/bin/kdialog</p>
<p>Dependencies met.</p>
<p>./buildset.sh: line 415: 23632 Terminado               display -immutable kmenu_icons.png<br />
ERROR: Couldn&#8217;t attach to DCOP server!<br />
ERROR: Couldn&#8217;t attach to DCOP server!<br />
ERROR: Couldn&#8217;t attach to DCOP server!<br />
ERROR: Couldn&#8217;t attach to DCOP server!<br />
./buildset.sh: line 216: [: ==: se esperaba un operador unario<br />
ERROR: Couldn't attach to DCOP server!<br />
./buildset.sh: line 216: [: ==: se esperaba un operador unario<br />
ERROR: Couldn't attach to DCOP server!</p></blockquote>
<p style="text-align:justify;">Googlee un buen rato y encontré varias soluciones, casi todas relacionadas al mismo error pero que ocurre cuando se inicia una sesión en KDE. Por supuesto esas soluciones, pensé, no me servirían de mucho, ya que mi problema ocurría al tratar de ejecutar un script y no al iniciar una sesión.</p>
<p style="text-align:justify;">Finalmente dí con un blog que contiene <a href="http://www.microdevsys.com/WordPress/2008/12/04/fedora-9-kde-4x-error-couldnt-attach-to-dcop-server/" target="_blank">esta</a> entrada, en la cual se enumeran una serie de soluciones. A continuación paso a explicar cuál funcionó para mi sistema.</p>
<p style="text-align:justify;">DCOP es el mecanismo de IPC/RPC de KDE. Si comprendes lo que significa esta frase, puedes saltarte el siguiente párrafo.<sup>[1]</sup></p>
<p style="text-align:justify;">El nombre DCOP deriva de las siglas de Desktop Communications Protocol (Protocolo de comunicaciones de escritorio), IPC viene de las siglas de Inter-Process Communication (Comunicación entre procesos); RPC son las siglas de Remote Procedure Call (Llamada a Procedimiento Remoto). Basicamente, son formas en que dos programas pueden comunicarse entre sí, ya sea dos procesos que se encuentran en la misma máquina o a través de una red.<sup>[1]</sup> Esencialmente, DCOP es un sistema de <a href="http://wapedia.mobi/es/Control_remoto" target="_blank">control remoto</a> , que permite a una aplicación o <a href="http://wapedia.mobi/es/Script" target="_blank">script</a> solicitar ayuda de otras aplicaciones.<sup>[2]</sup> En este sentido, DCOP es similar al OLE Automation de Microsoft: proporciona a los desarrolladores una forma simple de facilitar el acceso a las funciones disponibles en una aplicación.<sup>[1]</sup></p>
<p style="text-align:justify;">El error que mencioné anteriormente se produce porque, al momento de ejecutar un script, que necesita ayuda de otras aplicaciones, DCOP no se está ejecutando. Para corroborar esto simplemente escribimos en la terminal <em>dcop</em>:</p>
<p><code>$ dcop</code><br />
<code>ERROR: Couldn't attach to DCOP server!</code></p>
<p style="text-align:justify;">Esto confirma lo dicho anteriormente. Para solucionarlo, es decir, para que DCOP inicie debemos ejecutar <em>kdeinit</em>:</p>
<p><code>$ /usr/bin/kdeinit</code></p>
<p style="text-align:justify;">Ahora volvemos a escribir <em>dcop</em> en la terminal y veremos los programas que lo están utilizando (o al menos no debiéramos recibir algún error). Esto indica que <em>dcop</em> ya está en funcionamiento.</p>
<p>Saludos</p>
<p><sup>[1]</sup><a href="http://mundogeek.net/traducciones/oregan2.html" target="_blank">MundoGeek: Usando DCOP desde línea de comandos.</a></p>
<p><sup>[2]</sup><a href="http://wapedia.mobi/es/DCOP" target="_blank">Wapedia:DCOP</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Simple Picture frame using Qt and DCOP]]></title>
<link>http://ssendilkumar.wordpress.com/2009/02/18/simple-picture-frame-using-qt-and-dcop/</link>
<pubDate>Wed, 18 Feb 2009 04:17:23 +0000</pubDate>
<dc:creator>ssk</dc:creator>
<guid>http://ssendilkumar.wordpress.com/2009/02/18/simple-picture-frame-using-qt-and-dcop/</guid>
<description><![CDATA[Truly speaking, do we really admire our desktop wallpapers a lot ???.  I have large collection of de]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Truly speaking, do we really admire our desktop wallpapers a lot ???.  I have large collection of desktop wallpapers and use the &#8220;Slide Show&#8221; mode for my  wallpaper. I am talking about my KDE 3.5 desktop <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Most of the time my <a title="Matlab Home page" href="http://mathworks.com" target="_blank">Matlab</a>, kdevelop or my <a title="Latex + Emacs Front-End" href="http://texmacs.org/" target="_blank">texmacs</a> would be in use. So I miss to see the nice desktop wallpapers running behind. So I wrote this piece of code using the DCOP and Qt.</p>
<p><strong>Simple steps:</strong></p>
<p>a) Get the current wallpaper name using dcop interface</p>
<blockquote><p><em>dcop kdesktop KBackgroundIface currentWallpaper 3</em></p></blockquote>
<p>This returns the current wallpaper from desktop number 3.</p>
<blockquote><p>e.g /home/abcd/Pictures/image1.jpg</p></blockquote>
<p>b) Create a QWidget and a QLabel object to it. Set the pixmap property of the QLabel with the QPixmap object.</p>
<blockquote><p><em>QPixmap pixmap(filename);<br />
label-&#62;setPixmap(pixmap);</em></p></blockquote>
<p>c) Additionally, If you desktop wallpaper changes as a slideshow,  you can add a QTimer object and connect the timeout signal of the timer to a function (slot) to update the <em>pixmap</em> of the QLabel.</p>
<p>Thats all floks !!</p>
<p>Source Files : <a href="http://www.box.net/shared/jipzhsk377">picviewer.zip</a> (2.4KB)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SED, DCOP e outras coisas que só o Linux faz para você]]></title>
<link>http://qualquertecla.wordpress.com/2008/07/19/dcop-sed-e-outras-coisas-que-so-o-linux-faz-para-voce/</link>
<pubDate>Sat, 19 Jul 2008 05:27:14 +0000</pubDate>
<dc:creator>edsonpatricio</dc:creator>
<guid>http://qualquertecla.wordpress.com/2008/07/19/dcop-sed-e-outras-coisas-que-so-o-linux-faz-para-voce/</guid>
<description><![CDATA[Não costumo fazer guerra religiosa com sistemas operacionais. Sempre ouço falar das facilidades que ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Não costumo fazer guerra religiosa com sistemas operacionais. Sempre ouço falar das facilidades que certos sistemas operacionais oferecem, e tenho que admitir que o Linux às vezes peca na usabilidade. Mesmo me considerando um usuário de Linux avançado, a instalação e configuração de um modem pode se tornar uma tarefas tortuosa. Mesmo assim, usar uma das <a href="http://distrowatch.com/dwres.php?resource=major" target="_blank">principais distribuições Linux</a>, para a grande maioria dos casos é fácil e agradável. Muitas coisas no Linux não são mais difíceis, só diferentes. O problema é que tolerar diferenças nunca foi uma das maiores virtudes naturais dos seres humanos.</p>
<p>Difícil ou fácil, o que faz o Linux assunto obrigatório para um profissional de Informática é tornar possível tarefas muito difíceis. A meu pedido recebo alguns boletos bancários em PDF (para evitar gasto de papel desnecesário), pago-os pelo sítio na Internet do banco que sou cliente. O código do boleto é algo como:</p>
<blockquote><p>23792.37205 66281.169319 11011.260004 1 00000000000000</p></blockquote>
<p>Não posso simplesmente copiar do boleto e cola no sítio do banco, por causa dos espaço e ponto. Preciso que quando o código for colado no sítio do banco vá sem pontos nem espaço, como:</p>
<blockquote><p>23792372056628116931911011260004100000000000000</p></blockquote>
<p>Em Shell posso fazer: <strong>echo &#8216;<span style="color:#808080;">23792.37205 66281.169319 11011.260004 1 00000000000000</span>&#8216; &#124; sed &#8217;s/<span style="color:#808080;">[\.&#124;[:space:]]</span>//g&#8217;</strong></p>
<p>A sintaxe do comando de substituição do <a href="http://aurelio.net/sed/" target="_blank">sed</a> é: <strong>s/<span style="color:#808080;"><em>RegexProcurada</em></span></strong><strong>/<em><span style="color:#808080;">ValorSubstitutivo</span></em></strong><strong>/</strong></p>
<p>O <strong>/g</strong> no final do comando faz com que todas as ocorrências que casam com a regex sejam substituída, não só a primeira. Podemos ler a regex usada como: casa com ponto ou espaço. Percebam que o  campo referente ao valor a ser substituído está vázio, i.e. o que casar com o padrão será substituído por nada (vazio). Sobre regex, vale apena ler o <a href="http://guia-er.sourceforge.net/" target="_blank">Expressões Regulares &#8211; Guia de Consulta Rápida</a> do <a href="http://aurelio.net/" target="_blank">Aurélio Marinho Jargas</a>. Entre outras coisa é bem divertido.</p>
<p>Agora, como gravar na área de transferência, depois ler da área de transferência, modificar o conteúdo e gravar o resultado na <strong></strong>área de transferência. É hora do milagre chamado <a href="http://en.wikipedia.org/wiki/DCOP" target="_blank">DCOP</a>. Com o uso desse protocolo do KDE podemos executar essa tarefa, através de um comando com o mesmo nome do protocolo. O primeiro passo é criar um script shell com os comandos requeridos.</p>
<pre class="brush: cpp;">

#!/bin/bash
parselessString=`/opt/kde3/bin/dcop klipper klipper getClipboardContents`
result=`echo $parselessString &amp;#124; sed 's/[\.&amp;#124;[:space:]]//g'`
/opt/kde3/bin/dcop klipper klipper setClipboardContents $result
</pre>
<p>Na primeira linha salvamos o conteúdo da área de transferência em uma variável chamada <span style="color:#000000;"><strong>parselessString</strong></span>. Na segunda, usamos a variável para que o <strong>sed</strong> possa agir no conteúdo e guardar o resultado em uma variável chamada <span style="color:#000000;"><strong>result</strong></span>. Na terceira, gravamos o conteúdo de volta à área de transferência.</p>
<p>Se dermos mais uma olhada na primeira linha, podemos ver que através do comando <strong>dcop,</strong> chamamos do módulos <span style="color:#000000;"><strong>klipper</strong></span> do <a href="http://en.wikipedia.org/wiki/Klipper" target="_blank">aplicativo <strong>klipper</strong></a>, um método chamado <span style="color:#000000;"><strong><span>getClipboardContents</span></strong></span>. Esse método retorna o conteúdo da área de transferência. Para gravar o resultado foi usada uma mecânica similar.</p>
<p>Falta ainda vencer um desafio. Como criar atalhos de teclado que de uma só vez copie o texto selecionado à área de transferência e acione o script. A resposta está nas <a href="http://docs.kde.org/kde3/pt_BR/kdebase/userguide/keys-for-scripts.html" target="_blank">Ações de entrada do KDE</a>, que podem ser acessadas chamando <a href="http://en.wikipedia.org/wiki/KControl" target="_blank">kcontrol</a>. Em geral podemos chegar até elas via o menu do botão principal, ou digitando <strong>kcontrol</strong> no console ou no <strong>Executar Comando</strong> (<strong>alt+f2</strong>). Uma vez no kcontrol (Configurações Pessoais), vá até <span class="guiitem"><span class="guilabel"><strong>Regional &#38; Acessibilidade</strong> e depois </span></span><span class="guiitem"><span class="guilabel"><strong>Ações de Entrada</strong>. </span></span>Basicamente temos que criar uma nova ação, dar um nome para ela, designar seu tipo como genérico, escolher o conjunto de teclas que serão gatinho para ação e finalmente acrescentar as duas ações propriamente ditas, que serão executadas ao pressionar-se as teclas gatilho. O acréscismo das ações propriamente ditas é feito com o botão <strong><span style="text-decoration:underline;">N</span>ovo</strong>. Precisamos de uma entrada de teclado (<strong>ctrl+c</strong>) e uma chamada a comando (executa o script). A entrada de teclado funciona como se o usuário tivesse digitado aquela seqüência de teclas, tendo o mesmo efeito da ação real.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/ivnx3tZ4XWY&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/ivnx3tZ4XWY&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>No exemplo que fiz com o atalho <strong>win+crtl+c</strong>, cópio para área de transfência o texto já modificado e com o <strong>crtl+v</strong> normal colo o resultado.</p>
<p style="text-align:center;">
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Будильник "amarok" :)]]></title>
<link>http://grigory.wordpress.com/2008/06/03/%d0%b1%d1%83%d0%b4%d0%b8%d0%bb%d1%8c%d0%bd%d0%b8%d0%ba-amarok/</link>
<pubDate>Tue, 03 Jun 2008 09:09:03 +0000</pubDate>
<dc:creator>grigory</dc:creator>
<guid>http://grigory.wordpress.com/2008/06/03/%d0%b1%d1%83%d0%b4%d0%b8%d0%bb%d1%8c%d0%bd%d0%b8%d0%ba-amarok/</guid>
<description><![CDATA[Вот без этого маленького трюка я бы просто не просыпался по утрам (или обедам): Так что dcop не така]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Вот без этого маленького трюка я бы просто не просыпался по утрам (или обедам):</p>
<p><img src="http://i31.tinypic.com/29ap5yg.png" alt="" width="673" height="260" /></p>
<p>Так что dcop не такая уж и плохая штука!</p>
<p><em><strong>Пояснение:</strong></em></p>
<blockquote><p>команда &#8220;dcop amarok player play&#8221; запускает проигрывание текущей песни в амароке. Т.е., выставляем будильник (KAlarm в данном случае, умеет выполнять консольные команды) на восемь утра, выбираем песню и оставляем амарок открытым &#8211; в 8 утра песня заиграет. Главное звук сделать громче <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[KDE Shutdown, Logout, Restart]]></title>
<link>http://andrejserafim.wordpress.com/2008/05/16/kde-shutdown-logout-restart/</link>
<pubDate>Fri, 16 May 2008 18:09:37 +0000</pubDate>
<dc:creator>Andrej Kazakov</dc:creator>
<guid>http://andrejserafim.wordpress.com/2008/05/16/kde-shutdown-logout-restart/</guid>
<description><![CDATA[Inspired by this post. It is interesting how simple specialised devices cope with their functions mu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Inspired by <a href="http://http://makovey.objectis.net/Members/dimon/tech/tips/dcop_logout/view">this post</a>.</p>
<p>It is interesting how simple specialised devices cope with their functions much better than a all-in-one PC. Sometimes, I wish to fall asleep with some music on. But how annoying it becomes, when you have to get up in the middle of the night to turn off your PC, which has been playing something all this time. Digital radios have mastered the trick decades ago. Of course there is a way to make a PC do it.</p>
<p>Running linux, I thought that it should be fairly straightforward to shut it down after say half an hour automatically.</p>
<p>Something like shutdown (below) will kill the X. The KDE then will just exit without saving the session. Next time you log on, you will see some session from a distant past. If you do this often, it gets really annoying. Also this requires superuser privileges on some distributions.</p>
<pre class="brush: ruby;">
/sbin/shutdown -h now &quot;Power button pressed&quot;
# or
halt
</pre>
<p>Then how to make KDE quit without calling any dialogs (I am sound asleep by this time and I can&#8217;t afford to wake up and press &#8216;OK&#8217;)? There is a way.</p>
<pre class="brush: ruby;">
dcop ksmserver ksmserver logout 0 2 2
</pre>
<p>The three numbers are explained below (see <a href="http://linux.derkeiler.com/Mailing-Lists/KDE/2006-09/msg00094.html">source</a>):</p>
<blockquote><p>
<strong>First parameter: confirm</strong><br />
Obey the user&#8217;s confirmation setting: -1<br />
Don&#8217;t confirm, shutdown without asking: 0<br />
Always confirm, ask even if the user turned it off: 1<br />
<strong>Second parameter: type</strong><br />
Select previous action or the default if it&#8217;s the first time: -1<br />
Only log out: 0<br />
Log out and reboot the machine: 1<br />
Log out and halt the machine: 2<br />
<strong>Third parameter: mode</strong><br />
Select previous mode or the default if it&#8217;s the first time: -1<br />
Schedule a shutdown (halt or reboot) for the time all active sessions have<br />
exited: 0<br />
Shut down, if no sessions are active. Otherwise do nothing: 1<br />
Force shutdown. Kill any possibly active sessions: 2<br />
Pop up a dialog asking the user what to do if sessions are still active: 3
</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Obtener la carátula de un álbum de Amarok usando DCOP]]></title>
<link>http://javierarias.wordpress.com/2008/05/06/obtener-la-caratula-de-un-album-de-amarok-usando-dcop/</link>
<pubDate>Tue, 06 May 2008 11:17:11 +0000</pubDate>
<dc:creator>Javi</dc:creator>
<guid>http://javierarias.wordpress.com/2008/05/06/obtener-la-caratula-de-un-album-de-amarok-usando-dcop/</guid>
<description><![CDATA[Toda mi música la tengo organizada con Amarok y creando un programa para realizar un listado de mi c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Toda mi música la tengo organizada con <a title="Web oficial de Amarok" href="http://amarok.kde.org/">Amarok</a> y creando un programa para realizar un listado de mi colección musical me encontré con el problema de cómo conseguir la carátula de un álbum. Obtener la carátula del disco que está sonando es trivial a través de la función <em><code>coverImage</code></em>, que puede ser llamada desde <a title="DCOP documentation" href="http://developer.kde.org/documentation/other/dcop.html">DCOP</a> y nos devuelve la ruta al fichero de la carátula:</p>
<blockquote><p><code>[javi@cydonia ~]$ dcop amarok player coverImage</code></p>
<p>/home/javi/.kde/share/apps/amarok/albumcovers/cache/130@9b9d5ef76774f4a3e13cf02f4cb90865</p></blockquote>
<p>El problema está cuando el disco no está sonando: no hay ninguna función disponible para pedir una carátula de un disco que esté en la colección, y tampoco hay un campo en la base de datos que indique cuál carátula corresponde a cuál álbum.</p>
<p>Amarok maneja las carátulas de la siguiente manera: las guarda en la carpeta <em><code>~/.kde/share/apps/amarok/albumcovers/large/</code></em> en <a title="Información del formato PNG en Wikipedia" href="http://es.wikipedia.org/wiki/Portable_Network_Graphics">formato PNG</a>, asignándole como nombre el md5sum de la concatenación en minúsculas del nombre del artista y del título del álbum. Así, al disco <a title="Información del disco  Around The Fur de Deftones en Wikipedia" href="http://en.wikipedia.org/wiki/Around_the_Fur">Around The Fur de Deftones</a> le corresponde el siguiente nombre de fichero:</p>
<blockquote><p><code>[javi@cydonia ~]$ echo -n "deftonesaround the fur"&#124;md5sum</code></p>
<p>e5f8534f07e607aad36b9c6f19a47187  -</p></blockquote>
<p>Su carátula, por tanto, estará ubicada en <em><code>~/.kde/share/apps/amarok/albumcovers/large/e5f8534f07e607aad36b9c6f19a47187</code></em></p>
<p>Volviendo al problema inicial de obtener las carátulas de los discos que estén en la colección de Amarok, con DCOP podemos ejecutar <a title="Información del lenguaje SQL en Wikipedia" href="http://es.wikipedia.org/wiki/SQL">consultas SQL</a> sobre la base de datos y, por lo tanto, es posible obtener todos los nombres de artistas y de álbumes. Y si tenemos esos datos podemos saber cuál es la carátula de cada álbum. Con la siguiente consulta SQL obtendremos todas las parejas <em>artista+disco</em> y <em>carátula</em>.</p>
<blockquote><p><code>SELECT DISTINCT CONCAT(artist.name, '-', album.name), CONCAT('~/.kde/share/apps/amarok/albumcovers/large/', MD5(LOWER(CONCAT(artist.name,album.name))))  FROM album, artist, tags WHERE album.id=tags.album AND artist.id=tags.artist</code></p></blockquote>
<p>Para ejecutar esa consulta usamos la función <em><code>query</code></em> mediante DCOP:</p>
<blockquote><p><code>[javi@cydonia ~]$ dcop amarok collection query "SELECT DISTINCT CONCAT(artist.name, '-', album.name), CONCAT('~/.kde/share/apps/amarok/albumcovers/large/', MD5(LOWER(CONCAT(artist.name,album.name))))  FROM album, artist, tags WHERE album.id=tags.album AND artist.id=tags.artist"</code></p>
<p>Serj Tankian-Elect The Dead Bonus CD<br />
~/.kde/share/apps/amarok/albumcovers/large/591398f2dc2aff74627f577fd53da4e3<br />
Linkin Park-Minutes To Midnight (Tour Edition)<br />
~/.kde/share/apps/amarok/albumcovers/large/6d3dbccad0c4d9ceddd818d29e0ac7f7<br />
Nirvana-Nevermind<br />
~/.kde/share/apps/amarok/albumcovers/large/e2555e3a3bcd47ecf9d84fdacb1462a0<br />
Linkin Park-Shadow Of The Day<br />
~/.kde/share/apps/amarok/albumcovers/large/fe8780583e43f9f5cdf473a8fc4daf84<br />
Linkin Park-Reanimation<br />
~/.kde/share/apps/amarok/albumcovers/large/0717ba640841ff84c52cf846397b1b1c</p></blockquote>
<p>Sencillo, ¿verdad? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><em>Fuente: <a title="Amarok Forum" href="http://amarok.kde.org/forum/index.php">Amarok Forum</a>, <a title="Amarok Wiki" href="http://amarok.kde.org/wiki/Development">Amarok Wiki</a>, <a title="Ubuntu Forums" href="http://ubuntuforums.org/showthread.php?t=122475">Ubuntu Forums</a></em></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Internet Hotkeys - Amarok dcop play/pause]]></title>
<link>http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/</link>
<pubDate>Fri, 25 Apr 2008 20:36:46 +0000</pubDate>
<dc:creator>raetsel</dc:creator>
<guid>http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/</guid>
<description><![CDATA[Well the solution to getting my Play/Pause button to actually work as a play/pause toggle was pretty]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well the solution to getting my Play/Pause button to actually work as a play/pause toggle was pretty easy.</p>
<p>Amarok supports a playPause() method that is registered to the <a href="http://developer.kde.org/documentation/other/dcop.html">dcop</a> server so in my hotkeys.conf file the command for the Play button became</p>
<blockquote><p>dcop amarok player playPause</p></blockquote>
<p>dcop is the command line based client to talk to the dcop server, amarok is of course the application I want to talk to.</p>
<p>player is the section of the <a href="http://amarok.kde.org/">amarok</a> services and playPause is the function/method I want to call.</p>
<p>To find this out I used <a href="http://wiki.kde.org/tiki-index.php?page=Tips%20and%20Tricks&#38;pagenum=8">kdcop</a> the graphical interface and explored what it offered under the amarok application.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Configurando teclas especiales en KDE con DCOP]]></title>
<link>http://somnialeth.wordpress.com/2008/04/20/configurando-teclas-especiales-en-kde-con-dcop/</link>
<pubDate>Sun, 20 Apr 2008 22:44:15 +0000</pubDate>
<dc:creator>castarco</dc:creator>
<guid>http://somnialeth.wordpress.com/2008/04/20/configurando-teclas-especiales-en-kde-con-dcop/</guid>
<description><![CDATA[ACTUALIZACIÓN: Éste tutorial és&#8230; inútil, xD (salvo si se quieren aprender algunas cosillas int]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>ACTUALIZACIÓN: Éste tutorial és&#8230; inútil, xD (salvo si se quieren aprender algunas cosillas interesantes), la solución a los problemas que menciono és más sencilla que la expuesta en este tutorial, simplemente se tiene que instalar el paquete kmilo (o alguno que contenga el programa, dependiendo de qué distribución de Linux uséis).</p>
<p>Hará un tiempo mi portátil funcionaba bajo Debian Testing con KDE, en su momento lo configuré tan bien como pude y todo funcionaba de maravilla&#8230; hasta que el hardware se empezó a estropear (lo que le llevó a la muerte hará pocas semanas). Después de morir mi portátil fue transportado al cielo de los portátiles, junto con su Creador (HP) , allí se le dio una segunda oportunidad por haber sido tan bueno&#8230; y a los tres días resucitó.</p>
<p>El caso es que volvió a mis manos infectado con Windows (se lo contagiaron los otros ordenadores que no merecieron volver a la vida y todavía hoy permanecen en el purgatorio). A la semana conseguí curarlo con Debian Testing (KDE) pero parecía que algo no iba bién, seguía un poco acatarrado.</p>
<p>Por lo visto (no sé bien bien porqué) con la versión actual Testing de Debian han dejado de funcionar bien muchas cosas que antes iban como la seda: el sistema de sonido, y como no, el teclado (de ahí el título del artículo). Antes, configurar el teclado sólo consistía en tocar cuatro tonterías en los paneles de configuración de KDE (me parece que ya posteé hace tiempo sobre como hacerlo de esa manera). Ahora no es tan sencillo, y tenemos que currar un poco más (al menos en mi modelo HP Pavillion dv2104 eu).<br />
Iremos por pasos (nota, todo lo que ponga con comillas, vosotros ponedlo SIN comillas):</p>
<ol>
<li>Aplicamos el primer <a title="Configurar teclados especiales en KDE" href="http://somnialeth.wordpress.com/2007/04/09/configurando-teclas-especiales-en-portiles-hp-pavillion-dv2000/">mini-tutorial</a> (en mi caso todo funciona, pero Kmix no reconoce las teclas Mute, Subir Volumen y Bajar Volum, de ahí que esté haciendo este segundo mini-tutorial).</li>
<li>(Suponiendo que estamos en KDE) Vamos a Preferencias-&#62;Regional i accesibilidad-&#62;Introducir acciones.</li>
<li>Ahora crearemos una acción para Mute: Apretamos el botón &#8216;Nueva acción&#8217;.</li>
<li>En el campo &#8216;Nombre de la acción&#8217; ponemos lo que queramos (aunque estaría bien un nombre identificativo, por ejemplo &#8216;Mute&#8217;).</li>
<li>En el campo &#8216;Tipo de la acción&#8217; escogemos la opción &#8216;Acceso rápido de teclado -&#62; Llamada a DCOP (simple)&#8217;.</li>
<li>Vamos a la pestaña &#8216;Acceso rápido de teclado&#8217;. Allí seleccionamos el botón que hay en medio y apretamos el botón especial Mute. (Esto sirve para indicar al programa con qué tecla asociaremos la acción).</li>
<li>Vamos a la pestaña &#8216;Preferencias de llamada a DCOP&#8217;. Rellenenamos el campo &#8216;Aplicación remota&#8217; con el valor &#8216;kmix&#8217;. Rellanamos el campo &#8216;Objeto remoto&#8217; con el valor &#8216;Mixer0&#8242; (Hasta este paso todo se hace igual para Mute, Subir Volumen y Bajar Volumen, excepto con los nombres y las teclas asociadas, claro).</li>
<li>Para Mute el campo &#8216;Función llamada&#8217; tomará el valor &#8216;toggleMasterMute&#8217;. Para Subir Volumen el mismo campo tomará el valor &#8216;increaseVolume&#8217; y para Bajar Volumen &#8216;decreaseVolume&#8217;.</li>
<li>El campo &#8216;Argumentos&#8217; no tomará ningún valor para Mute. Para Subir y Bajar Volumen tendremos que asegurarnos de cual es el valor apropiado. Ejecutamos en consola la siguiente instrucción para saberlo (la salida que nos dé será el número que queremos):<code><br />
dcop kmix Mixer0 masterDeviceIndex</code></li>
<li>Apretamos el botón &#8216;Aplicar&#8217; y ya estamos <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</li>
<li>Para casos superespeciales (no me ha pasado): cabe destacar que yo he utilizado Mixer0 a la ligera como &#8216;Objeto remoto&#8217;, pero ¿No podría haber Mixer1? Creo que sí, pero no debe ser muy usual. En todo caso nos podemos asegurar ejecutando el comando (Nos dará una lista de los valores aceptables para ese campo):<br />
<code>dcop kmix &#124; grep Mixer</code></li>
</ol>
<p>Espero que haya sido útil éste mini-tutorial. De hecho, creo que introduce también la idea de utilizar dcop para nuestros propios pequeños programas. Sin duda es una muy buena herramienta para intercomunicar programas.</p>
<p>Ala, hasta otra! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Управление несколькими серверами посредством Konsole]]></title>
<link>http://devti.wordpress.com/2008/04/01/%d0%a3%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-%d0%bd%d0%b5%d1%81%d0%ba%d0%be%d0%bb%d1%8c%d0%ba%d0%b8%d0%bc%d0%b8-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80%d0%b0%d0%bc%d0%b8-%d0%bf%d0%be/</link>
<pubDate>Tue, 01 Apr 2008 18:56:50 +0000</pubDate>
<dc:creator>DevTi</dc:creator>
<guid>http://devti.wordpress.com/2008/04/01/%d0%a3%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-%d0%bd%d0%b5%d1%81%d0%ba%d0%be%d0%bb%d1%8c%d0%ba%d0%b8%d0%bc%d0%b8-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80%d0%b0%d0%bc%d0%b8-%d0%bf%d0%be/</guid>
<description><![CDATA[Иногда необходимо выполнить одни и теже разовые действия на нескольких однотипных серверах. Как вари]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Иногда необходимо выполнить одни и теже разовые действия на нескольких однотипных серверах. Как вариант &#8211; используем Konsole с одновременным вводом на все сеансы (закладки). Вручную открывать 21 сеанс (в моем случае) довольно утомительно, поэтому написал небольшой скрипт на bash&#8217;е для автоматизации открытия консолей всех нужных серверов.</p>
<pre class="brush: ruby;">#!/bin/bash
# Запускаем konsole с расширенными возможностями управления
KONSOLE=$(dcopstart konsole-script)
# Файл ~/servers содержит список серверов через пробелы
for SERVER in `cat ~/servers`
do
    # Открываем новую вкладку (сессию) в Konsole
    SESSION=$(dcop $KONSOLE konsole newSession)
    # Переименовываем вкладку по имени сервера
    dcop $KONSOLE $SESSION renameSession $SERVER
    #Посылаем команду в сессию
    dcop $KONSOLE $SESSION sendSession &quot;ssh root@$SERVER&quot;
done
#Закрываем первую (открытую по умолчанию) вкладку
dcop $KONSOLE &quot;session-1&quot; closeSession</pre>
<p>P.S.: для изучения dcop-функций пригодится kdcop</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Jugando con DCOP, cambiando el fondo de pantalla]]></title>
<link>http://blog.chernando.eu/2007/12/05/dcop-kdesktop/</link>
<pubDate>Wed, 05 Dec 2007 20:23:39 +0000</pubDate>
<dc:creator>chernando</dc:creator>
<guid>http://blog.chernando.eu/2007/12/05/dcop-kdesktop/</guid>
<description><![CDATA[Si hacéis uso de la utilidad &#8220;Slide Show&#8221; de kdesktop para gestionar el fondo de pantall]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Si hacéis uso de la utilidad &#8220;Slide Show&#8221; de kdesktop para gestionar el fondo de pantalla puede que esta entrada os sea útil.</p>
<p>El problema radica es que una vez fijado el directorio del que elegir el fondo no se puede hacer un &#8220;pasa al siguiente&#8221;. O al menos yo no lo he encontrado <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>La posible solución era probar haciendo uso de DCOP y ha resultado tan sencillo&#8230; en fin, aquí tenéis el comando para forzar un avance dentro de la colección:</p>
<pre>$ dcop kdesktop KBackgroundIface changeWallpaper</pre>
</div>]]></content:encoded>
</item>

</channel>
</rss>
