<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6888248513919245674</id><updated>2011-11-11T02:59:32.541-08:00</updated><category term='scripting'/><category term='Lenny'/><category term='PL/pgSQL'/><category term='PostgreSQL'/><category term='Stable'/><category term='SQL'/><category term='wireless'/><category term='shell'/><category term='Ruby'/><category term='Debian'/><category term='GNU/Linux'/><category term='programming'/><category term='Rails'/><category term='perl'/><category term='video'/><category term='firmware'/><category term='conversion'/><category term='printing'/><category term='Triggers'/><category term='DI-824VUP+'/><category term='D-Link'/><category term='networking'/><title type='text'>My Linux wall</title><subtitle type='html'>In this blog I write some entries about GNU/Linux (usually Debian or Ubuntu) related questions: installation, configuration, programming, ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-4662283645001814777</id><published>2011-08-11T04:59:00.000-07:00</published><updated>2011-11-11T02:59:32.548-08:00</updated><title type='text'>How to change the extension to several files at a time</title><content type='html'>If you work every day with line commands and pipes, and process several files at a time, perhaps you need to rename them at once, mainly to change file extension, I think.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mmv&lt;/span&gt; command is very useful to do this and it is included in all well-known linux distros.&lt;br /&gt;&lt;br /&gt;For example, to change file extension from &lt;span style="font-family: courier new;"&gt;.tmp&lt;/span&gt; to &lt;span style="font-family: courier new;"&gt;.txt&lt;/span&gt; to all files inside current directory, you can type:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; echo "*.tmp #1.txt" | mmv&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;But mmv has much other capabilities (see man page for details). A simple -c option in command line arguments allows you to preserve original files, that is, to copy (instead of move) serveral files at a time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-4662283645001814777?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/4662283645001814777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=4662283645001814777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/4662283645001814777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/4662283645001814777'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2011/08/how-to-change-extension-to-several.html' title='How to change the extension to several files at a time'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-6254701700266661448</id><published>2010-09-02T05:10:00.000-07:00</published><updated>2011-06-30T09:16:00.909-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>How to update Ruby on Rails applications from 2.2 to 2.3 version of Rails</title><content type='html'>To update a Ruby on Rails application from 2.2 to 2.3 version of Rails you have to go through the following steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Intall the 2.3 version of Rails with gem.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Update file config/environment.rb and specify the new Rails version (RAILS_GEM_VERSION).&lt;/li&gt;&lt;li&gt;Run rails:update task of rake at the project home.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add/Remove the generated/removed files inside your SCM software.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;I have updated an application managed &lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;with CVS SCM software from 2.2.3 to 2.3.8, so I did:&lt;br /&gt;&lt;br /&gt;(1)&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; gem install rails -v 2.3.8&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;(as root)&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;(2) &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;vi config/environment.rb&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;(3)&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; rake rails:update&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;(in /home/user/project)&lt;br /&gt;/home/user/project/app/controllers/application.rb has been renamed to /home/user/project/app/controllers/application_controller.rb, update your SCM as necessary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;(4)&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;cvs add app/controllers/application_controller.rb&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;(5)&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;cvs remove app/controllers/application.rb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;(6)&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;commit&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-6254701700266661448?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/6254701700266661448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=6254701700266661448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/6254701700266661448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/6254701700266661448'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/09/how-to-update-ruby-on-rails.html' title='How to update Ruby on Rails applications from 2.2 to 2.3 version of Rails'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-2295073993496442931</id><published>2010-08-25T08:02:00.000-07:00</published><updated>2010-08-26T07:22:00.807-07:00</updated><title type='text'>Convert .ts files to .avi</title><content type='html'>I use this command to convert .ts files recorded from a Blusens T50 device to .avi format in Debian Lenny (with debian-multimedia repositories included):&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;ffmpeg -i input_file.ts -vcodec libxvid -b 2000k -acodec libmp3lame -ac 2 -ar 44100 -ab 128k output_file.avi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Result .avi files play fine in a wide range of devices.&lt;br /&gt;&lt;br /&gt;To increase or decrease video quality you can use a higher or lower value in -b option.&lt;br /&gt;&lt;br /&gt;You can select start point and duration of the encoding with -ss and -t options. For example, to encode 30 seconds starting at the minute 10 you can type:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;ffmpeg -i input_file.ts -ss 00:10:00 -t 00:00:30 -vcodec libxvid -b 2000k -acodec libmp3lame -ac 2 -ar 44100 -ab 128k output_file.avi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Therefore, to choose the second audio stream instead of the first, you can use the -map option:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;ffmpeg -i input_file.ts -vcodec libxvid -b 2000k -map 0:0 -map 0:2 -acodec libmp3lame -ac 2 -ar 44100 -ab 128k output_file.avi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(the first -map choose the video stream and the second one the second audio stream)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-2295073993496442931?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/2295073993496442931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=2295073993496442931' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/2295073993496442931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/2295073993496442931'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/08/convert-ts-files-to-avi.html' title='Convert .ts files to .avi'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-5546998966299736116</id><published>2010-08-17T13:26:00.000-07:00</published><updated>2010-08-23T01:12:51.331-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><title type='text'>Convert .ts (or .avi) files to .3gp</title><content type='html'>I use this command to convert .ts (or .avi) files to .3gp format in Debian Lenny (with debian-multimedia repositories included):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;ffmpeg -i input_file.ts -s qcif -vcodec h263 -acodec libfaac -ac 1 -ar 8000 -r 25 -ab 32k -y output_file.3gp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Result .3gp files play fine in my Nokia 7610 Supernova.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Sources:&lt;br /&gt;&lt;a href="http://goinggnu.wordpress.com/2007/02/13/convert-avi-to-3gp-using-ffmpeg/"&gt;http://goinggnu.wordpress.com/2007/02/13/convert-avi-to-3gp-using-ffmpeg/&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-5546998966299736116?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/5546998966299736116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=5546998966299736116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/5546998966299736116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/5546998966299736116'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/08/convert-ts-or-avi-files-to-3gp.html' title='Convert .ts (or .avi) files to .3gp'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-3681432454646209468</id><published>2010-07-06T02:34:00.001-07:00</published><updated>2010-08-17T03:11:09.944-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PL/pgSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='Triggers'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Enforce full participation on 1:N relationships in PostgreSQL</title><content type='html'>&lt;div style="text-align: justify;"&gt;Suppose we have a 1 to N (cardinality) relationship between entities &lt;span style="font-style: italic;"&gt;A&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;B&lt;/span&gt; which are represented in our relational model through two tables: the &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; table with an id attribute, its primary key, and the &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; one with an id attribute, its primary key, and another one, a_id, the foreign key which links to &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;CREATE TABLE a (&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;id INTEGER,&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;CONSTRAINT a_primary_key (id)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CREATE TABLE b (&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;id INTEGER,&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;a_id INTEGER,&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;CONTRAINT b_primary_key (id),&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;CONTRAINT b_foreign_key (a_id) REFERENCES a(id)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The question is, how can we enforce full participation of this relationship? That is, how can we guarantee that all tuples of both tables are all linked or, what is the same, how can we avoid to have unlinked tuples?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; table the solution is easy. We must include an a_id (the foreign key) when we insert a tuple, so we are always relating &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; tuples to &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;. If we want to delete all associated tuples of &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; when removing the corresponding &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;,&lt;span style="font-style: italic;"&gt; &lt;/span&gt;we can add &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;ON DELETE CASCADE &lt;/span&gt;&lt;/span&gt;to the b_foreign_key constraint and that's all. But the &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; side is more difficult.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;First, we must guarantee that  a tuple in &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; is inserted if and only if we are sure a corresponding one in table &lt;span style="font-style: italic;"&gt;b&lt;/span&gt;&lt;span&gt; is created also&lt;/span&gt;. To do this, we must use a transaction which do both insertions or none of them.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;And second, how can we enforce that when we remove all tuples of &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; related with one of &lt;span style="font-style: italic;"&gt;a&lt;/span&gt;, the latter became removed? One solution to guarantee this in PostgreSQL is to build a PL/pgSQL trigger which checks, each time&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/span&gt;an update or delete occurs in &lt;span style="font-style: italic;"&gt;b&lt;/span&gt;, if there are tuples in &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; related with &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; which include the same a_id of the &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; tuple currently being removed, and delete the corresponding &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; tuple if this occurs:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;CREATE OR REPLACE FUNCTION enforce_a_participation() RETURNS trigger AS $$&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;BEGIN&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;   PERFORM a_id FROM b WHERE a_id=OLD.a_id;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;   IF NOT FOUND THEN&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;    DELETE FROM a WHERE id=OLD.a_id;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;   END IF;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;   RETURN NULL;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt; END;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$$ LANGUAGE plpgsql;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CREATE TRIGGER enforce_a_participation_trigger AFTER DELETE OR UPDATE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ON b FOR EACH ROW EXECUTE PROCEDURE enforce_a_participation();&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;(remember to write &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;CREATE PROCEDURAL LANGUAGE plpgsql;&lt;/span&gt;&lt;/span&gt; before creating your first PL/pgSQL function)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This way, when the last row of &lt;span style="font-style: italic;"&gt;b&lt;/span&gt; related with one row of &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; is removed, the corresponding &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; is deleted also, and the problem become solved.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-3681432454646209468?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/3681432454646209468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=3681432454646209468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/3681432454646209468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/3681432454646209468'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/07/enforce-full-participation-on-1n.html' title='Enforce full participation on 1:N relationships in PostgreSQL'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-8004546530553101627</id><published>2010-05-20T03:02:00.000-07:00</published><updated>2010-08-17T03:12:12.940-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Perl script which copies selected files from current to target directory</title><content type='html'>&lt;a href="http://www.xente.mundo-r.com/barcala/admin/get_files.pl"&gt;This script&lt;/a&gt; allows to copy selected files, whose names are included in a names file, from current directory to target directory.&lt;br /&gt;&lt;br /&gt;Target directory must exist, each file name of names file must be alone in one line and the lines of this file beginning with -- are ignored.&lt;br /&gt;&lt;br /&gt;The script is very useful when you want to pick up a large subset of files from a directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-8004546530553101627?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/8004546530553101627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=8004546530553101627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/8004546530553101627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/8004546530553101627'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/05/script-perl-which-copies-selected-files.html' title='Perl script which copies selected files from current to target directory'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-399229038840837173</id><published>2010-04-20T00:28:00.000-07:00</published><updated>2010-08-17T03:12:46.065-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Shell scripts to convert file names to lower case and upper case</title><content type='html'>To convert to lower case:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;#!/bin/sh&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; for i in *&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; do&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; j=`echo $i | tr '[A-Z]' '[a-z]'`&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; mv $i $j&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And to upper case:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;#!/bin/sh&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; for i in *&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; do&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; j=`echo $i | tr '[a-z]' '[A-Z]'`&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; mv $i $j&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; done&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-399229038840837173?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/399229038840837173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=399229038840837173' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/399229038840837173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/399229038840837173'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2010/04/shell-script-to-convert-to-lower-case.html' title='Shell scripts to convert file names to lower case and upper case'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-1492401069921224211</id><published>2009-08-28T03:42:00.000-07:00</published><updated>2010-08-17T03:13:06.668-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Configuring several networks in a laptop</title><content type='html'>Nowadays there are several ways to configure network settings for wired and wireless cards. I have proved several applications to do it (mainly Network Manager and ifupdown) but each of them show some problems for my mobility requiriments.&lt;br /&gt;&lt;br /&gt;I have to connect my laptop to different wireless and wired networks in my daily work:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;DHCP wired nework at home.&lt;/li&gt;&lt;li&gt;DHCP wireless network at home.&lt;/li&gt;&lt;li&gt;Static IP wired usb network at work throw a Conceptronic cable (Prolific PL-2301/PL-2302 device - plusb module).&lt;/li&gt;&lt;li&gt;Static IP wired ethernet network at work.&lt;/li&gt;&lt;li&gt;Several sporadic wireless networks.&lt;/li&gt;&lt;/ul&gt;I tried to use Network Manager to solve all these requirements, but I had difficulties:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;To store several skills for different networks.&lt;/li&gt;&lt;li&gt;To manage usb network connections.&lt;/li&gt;&lt;/ol&gt;By other hand, it is difficult for ifupdown to manage several wireless connections and it is not easy to change from one wireless network to another one.&lt;br /&gt;&lt;br /&gt;So, I decide to use Network Manager to manage wireless connections while ifupdown take charge of the wired ones (usb and ethernet). Network Manager does not manage devices included into &lt;span style="font-family:courier new;"&gt;/etc/network/interfaces&lt;/span&gt;, so it is easy to use together these two applications.&lt;br /&gt;&lt;br /&gt;I combine &lt;span style="font-family:courier new;"&gt;ifupdown&lt;/span&gt; application (ifupdown debian package) with resolvconf one (&lt;span style="font-family:courier new;"&gt;resolvconf&lt;/span&gt; debian pagackage) to allow dns entries inside &lt;span style="font-family:courier new;"&gt;interfaces&lt;/span&gt; file. This is my &lt;span style="font-family:courier new;"&gt;/etc/network/interfaces&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# Loopback&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;auto lo&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;iface lo inet loopback&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# Ethernet networks&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;allow-hotplug eth0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;iface eth0-home inet dhcp&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;iface eth0-work inet static&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;address w.x.y.z&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;netmask 255.255.255.0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;network w.x.y.0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;broadcast w.x.y.255&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;gateway w.x.y.1&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;dns-nameserver w.x.y.2&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;iface eth0-dhcp inet dhcp #default&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;mapping eth0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;script /usr/local/sbin/ping-places.sh&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;map 192.168.1.254/24 192.168.1.1 eth0-home&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;map w.x.y.z/24 w.x.y.1 eth0-work&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# usb network&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;allow-hotplug usb0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;iface usb0 inet static&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;address 192.168.5.100&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;netmask 255.255.255.0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;network 192.168.5.0&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;broadcast 192.168.5.255&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;gateway 192.168.5.1&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;dns-nameservers w'.x'.y'.z' w''.x''.y''.z''&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;dns-search domain.com&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;# wireless&lt;br /&gt;&lt;br /&gt;allow-hotplug wlan0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where mapping stanzas and ping-places.sh script are used. I have copied &lt;span style="font-family:courier new;"&gt;ping-places.sh&lt;/span&gt; from &lt;span style="font-family:courier new;"&gt;/usr/share/doc/ifupdown/examples&lt;/span&gt; (ifupdown package) to &lt;span style="font-family:courier new;"&gt;/usr/local/sbin&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;To configure one network, I have to plug the wire and power on the laptop. It will ping several routers to guess the network where it is wired. If, by error, you power on the laptop before connecting it, you can make:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# ifdown &amp;lt;interface&amp;gt;&lt;/span&gt;&lt;interface&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;# ifup  &amp;lt;interface&amp;gt;&lt;/span&gt;&lt;interface&gt;&lt;br /&gt;&lt;br /&gt;as root or sudoer, where &lt;span style="font-family:courier new;"&gt;&amp;lt;inteface&amp;gt;&lt;/span&gt; is eth0 or usb0.&lt;br /&gt;&lt;br /&gt;For wireless networks you can work with Network Manager as usual.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/interface&gt;&lt;/interface&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-1492401069921224211?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/1492401069921224211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=1492401069921224211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/1492401069921224211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/1492401069921224211'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2009/04/configuring-several-networks-in-laptop.html' title='Configuring several networks in a laptop'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-6747023508383885857</id><published>2009-07-06T05:22:00.000-07:00</published><updated>2010-08-17T03:13:32.043-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Perl script to apply a command to a large number of files</title><content type='html'>If you need to apply any command or script to a large number of files it is usefull to get a perl script like &lt;a href="http://www.xente.mundo-r.com/barcala/admin/command.pl"&gt;this one&lt;/a&gt;, which applies a command to all files of current directory that verifies a pattern.&lt;ext1&gt;&lt;ext1&gt;&lt;ext2&gt;&lt;br /&gt;&lt;br /&gt;The command must obtain its input from stdin and write its output to stdout.&lt;br /&gt;&lt;br /&gt;It is very usefull to make massive transformations in text or XML documents. For example, to reformat all xml files of a directory using xmllint command we can do:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ command.pl "xmllint --format -" xml output&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where &lt;span style="font-family:courier new;"&gt;.xml.output&lt;/span&gt; files will include the result of applying &lt;span style="font-family:courier new;"&gt;xmllint --format&lt;/span&gt; to corresponding &lt;span style="font-family:courier new;"&gt;.xml&lt;/span&gt; files.&lt;br /&gt;&lt;br /&gt;This script is released under the terms of the GNU General Public License version 3.&lt;br /&gt;&lt;/ext2&gt;&lt;/ext1&gt;&lt;/ext1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-6747023508383885857?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/6747023508383885857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=6747023508383885857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/6747023508383885857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/6747023508383885857'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2009/07/perl-script-to-apply-command-to-large.html' title='Perl script to apply a command to a large number of files'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-7856877879800112342</id><published>2009-04-25T03:43:00.001-07:00</published><updated>2010-08-17T03:14:00.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stable'/><category scheme='http://www.blogger.com/atom/ns#' term='DI-824VUP+'/><category scheme='http://www.blogger.com/atom/ns#' term='Lenny'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><category scheme='http://www.blogger.com/atom/ns#' term='GNU/Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='D-Link'/><title type='text'>D-Link DI-824VUP+ print server</title><content type='html'>If you have a D-Link DI-824VUP+ and want to use your USB printer with your Linux computer, you have to do the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a LPD/LPR printer.&lt;/li&gt;&lt;li&gt;Write the internal IP of your DI-824VUP+ device inside the host field.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write lpUSB0 inside the queue field.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select your printer driver (or install it from a ppd file).&lt;/li&gt;&lt;li&gt;Select a name for your printer.&lt;/li&gt;&lt;/ol&gt;Now you can print into yout printer throw the D-Link device. It means that you can print using a wireless connection. I don't know if it is the same for all printers but, with my Samsung ML-1210, I have to power on the printer before connecting it to the DI-824VUP+ device, otherwise it doesn't work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-7856877879800112342?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/7856877879800112342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=7856877879800112342' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/7856877879800112342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/7856877879800112342'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2009/04/d-link-di-824vup-print-server.html' title='D-Link DI-824VUP+ print server'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6888248513919245674.post-5624978875593526225</id><published>2009-04-25T01:51:00.000-07:00</published><updated>2009-05-20T01:55:44.147-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firmware'/><category scheme='http://www.blogger.com/atom/ns#' term='DI-824VUP+'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='D-Link'/><title type='text'>D-Link DI-824VUP+ wireless problem</title><content type='html'>I have a D-Link DI-824VUP+ which causes me more than one headache for several months.&lt;br /&gt;&lt;br /&gt;The problem was that sometimes my two Lenovo laptops, with 4965 and 5100 Intel wireless cards respectively, did not connect to the wireless network of my DI-824VUP+ device. I had to reboot the device and try to connect again and, in some cases, I got the connection to work.&lt;br /&gt;&lt;br /&gt;I believed the problem was with Linux Intel wireless driver, which logged an "authenticated timout" problem, but after upgrading to different new kernels the problem remained the same.&lt;br /&gt;&lt;br /&gt;So, finally I found out a firmware update in australian D-Link page &lt;a href="http://www.dlink.com.au/"&gt;http://www.dlink.com.au&lt;/a&gt; (entering in support section and choosing the model name). I have upgraded from 1.5 firmware to 1.6b, and the problem disappeared completely! The wireless connections of my two laptops have success all times, without rebooting DI-824VUP+ device.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6888248513919245674-5624978875593526225?l=mylinuxwall.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mylinuxwall.blogspot.com/feeds/5624978875593526225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6888248513919245674&amp;postID=5624978875593526225' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/5624978875593526225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6888248513919245674/posts/default/5624978875593526225'/><link rel='alternate' type='text/html' href='http://mylinuxwall.blogspot.com/2009/04/d-link-di-824vup-wireless-problem.html' title='D-Link DI-824VUP+ wireless problem'/><author><name>Mario Barcala</name><uri>http://www.blogger.com/profile/01357452793610464290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
