<?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-8825462450241502945</id><updated>2011-12-28T08:09:11.960+01:00</updated><category term='subtitles python synchronization script file'/><category term='linux gimp mass action resize compress'/><category term='ejabberd cluster howto mnesia'/><category term='ubuntu init.d update-rc.d linux'/><category term='python software development technical tech writer'/><category term='install oracle unbreakable linux iso merge virtualbox'/><category term='hp dv7 ubuntu 9.04 jaunty jackalope installation'/><category term='mac osx leopard ubuntu 9.04 jaunty jackalope'/><category term='ubuntu numerical keypad pointer'/><category term='*NIX Linux rename files numbering venefyxatu photography'/><category term='code snippets python indentation'/><title type='text'>lobo loco</title><subtitle type='html'>think before you say something stupid</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-4176403699230763954</id><published>2011-10-24T13:47:00.002+02:00</published><updated>2011-10-24T13:52:42.996+02:00</updated><title type='text'>another note to self</title><content type='html'>sound is not coming through headphone jack, only via built-in speakers on Dell Studio XPS.&lt;br /&gt;&lt;br /&gt;After clean install of my laptop with Ubuntu 11.10 64-bit (Oneiric Ocelot), I no longer had sound through my headphones, only via the built-in speakers.&lt;br /&gt;&lt;br /&gt;This resolved my issue:&lt;br /&gt;&lt;br /&gt;open /etc/modprobe.d/alsa-base.conf&lt;br /&gt;Add this line at the end of the file: options snd-hda-intel model=dell-m6&lt;br /&gt;Logout/login and problem is solved.&lt;br /&gt;&lt;br /&gt;Experienced this issue already in 10.10 (if my memory doesn´t let me down)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-4176403699230763954?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/4176403699230763954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/10/another-note-to-self.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4176403699230763954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4176403699230763954'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/10/another-note-to-self.html' title='another note to self'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-2348923695772177886</id><published>2011-07-25T11:01:00.002+02:00</published><updated>2011-07-25T11:18:35.565+02:00</updated><title type='text'>Ejabberd cluster on Ubuntu Server</title><content type='html'>Two years ago, I created a &lt;a href="http://tdewolf.blogspot.com/2009/07/clustering-ejabberd-nodes-using-mnesia.html"&gt;blog&lt;/a&gt; about the clustering of ejabberd nodes, running on OpenSolaris.&lt;br /&gt;&lt;br /&gt;This message here has the same purpose but now running on Ubuntu Servers and linked to an &lt;a href="http://tdewolf.blogspot.com/2011/07/configuring-openldap-on-ubuntu-server.html"&gt;openldap server&lt;/a&gt;. I used 9.04 (Jaunty Jackalope), but I think there shouldn't be too much changes in earlier or later versions.&lt;br /&gt;&lt;br /&gt;I used the following setup:&lt;br /&gt;3 ejabberd nodes (ejabberd1, ejabberd2, and ejabberd3)&lt;br /&gt;1 OpenLDAP Server&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installation and Configuration First ejabberd&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Make sure that your are logged in as root user.&lt;br /&gt;&lt;br /&gt;1. Install ejabberd:&lt;br /&gt;     &lt;code&gt;$ apt-get install ejabberd&lt;/code&gt;&lt;br /&gt;2. Configure ejabberd to get users from the openldap server&lt;br /&gt;   * adapt /etc/ejabberd/ejabberd.cfg:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;   ** %% Admin user: in this example the user must be listed in the LDAP&lt;br /&gt;   ** %% Hostname&lt;br /&gt;   ** %% List of LDAP servers: {ldap_servers, ["&lt;hostname ldap server&gt;"]}.&lt;br /&gt;         --&gt; make sure that ejabberd node can reach ldap server using its &lt;br /&gt;             hostname (possibly adapt /etc/hosts)&lt;br /&gt;   ** %% Encryption .. LDAP Servers (LDAPS): {ldap_encrypt, &lt;encryption&gt;}.&lt;br /&gt;         --&gt; tls, ssl, none, ...&lt;br /&gt;   ** %% Port connect to LDAP server: {ldap_port, &lt;port number&gt;}.&lt;br /&gt;   ** %% LDAP Manager: {ldap_rootdn, "&lt;root user LDAP&gt;"}.&lt;br /&gt;         --&gt; e.g. {ldap_rootdn, "cn=admin,dc=example,dc=com"}.&lt;br /&gt;   ** %% Password of LDAP manager: {ldap_password, "&lt;rootdn passwd&gt;"}.&lt;br /&gt;   ** %% LDAP attribute that holds user ID: {ldap_uids, [{"uid", "%u"}]}.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;3. Modify /usr/sbin/ejabberdctl: &lt;code&gt;ERLANG_NODE=ejabberd@`hostname`&lt;/code&gt;&lt;br /&gt;   --&gt; not single quotes but back single quotes around hostname&lt;br /&gt;4. Start ejabberd: &lt;code&gt;/etc/init.d/ejabberd start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Check if ejabberd is running:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ejabberdctl status&lt;br /&gt;Node ejabberd@ejabberd1 is started. Status: started&lt;br /&gt;ejabberd is running&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installation and Configuration Other ejabberd Nodes&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;1. Install ejabberd:&lt;br /&gt;     &lt;code&gt;$ apt-get install ejabberd&lt;/code&gt;&lt;br /&gt;2. Copy ejabberd.cfg from first node&lt;br /&gt;3. Copy ejabberdctl from first node&lt;br /&gt;4. Copy &lt;code&gt;/var/lib/ejabberd/.erlang.cookie&lt;/code&gt; from node 1 to new node.&lt;br /&gt;5. Start ejabberd: &lt;code&gt;/etc/init.d/ejabberd start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Check if ejabberd is running:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ejabberdctl status&lt;br /&gt;Node ejabberd@ejabberd2 is started. Status: started&lt;br /&gt;ejabberd is running&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now synchronize the databases is the tricky part. Thanks to &lt;a href="http://rfid-ale.blogspot.com/2009/10/how-to-make-ejabberd-cluster-setup-bit.html"&gt;this blog&lt;/a&gt; it is a piece of cake.&lt;br /&gt;Just perform the steps below to synchronize the database of node 2 with the first node:&lt;br /&gt;&lt;br /&gt;1. Start ejabberd in debug mode: &lt;br /&gt;&lt;code&gt;$ ejabberdctl debug&lt;/code&gt;&lt;br /&gt;   You arrive in an Erlang shell.&lt;br /&gt;2. Enter the following commands: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;   * FirstNode = 'ejabberd@first', %%where first is the hostname of the first node   (!) Make sure that the line ends with a comma, indicating that there are other commands to follow&lt;br /&gt;   * mnesia:stop(),&lt;br /&gt;   * mnesia:delete_schema([node()]),&lt;br /&gt;   * mnesia:start(),&lt;br /&gt;   * mnesia:change_config(extra_db_nodes, [FirstNode]),&lt;br /&gt;   * mnesia:change_table_copy_type(schema, node(), disc_copies).&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;3. End the debug session by pressing Ctrl-c, Ctrl-c&lt;br /&gt;&lt;br /&gt;Your second node now runs ejabberd with the same database as on the first node.&lt;br /&gt;Repeat this procedure for other ejabberd nodes which must serve the same database.&lt;br /&gt;&lt;br /&gt;Web Interface ejabberd&lt;br /&gt;----------------------&lt;br /&gt;By default there is a webinterface available for ejabberd on http://&lt;ip node&gt;:5280/admin&lt;br /&gt;&lt;br /&gt;Log on with an LDAP user who has been added to the list of Admin users in ejabberd.cfg, login name is in the format user@domain, e.g. admin@example.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-2348923695772177886?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/2348923695772177886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/07/ejabberd-cluster-on-ubuntu-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/2348923695772177886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/2348923695772177886'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/07/ejabberd-cluster-on-ubuntu-server.html' title='Ejabberd cluster on Ubuntu Server'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-5154809498594536693</id><published>2011-07-25T10:15:00.003+02:00</published><updated>2011-07-25T11:01:30.731+02:00</updated><title type='text'>Configuring OpenLDAP on Ubuntu Server</title><content type='html'>This message shows you how an easy setup of OpenLDAP. I configured this to test a new ejabberd clustering setup using Ubuntu Servers. So I decided why not to integrate OpenLDAP with the ejabberd cluster, which is likely a more useful setup.&lt;br /&gt;&lt;br /&gt;Most of the documentation is taken from https://help.ubuntu.com/community/OpenLDAPServer.&lt;br /&gt;&lt;br /&gt;Setup:&lt;br /&gt;Simple Dual-core server 1024 MB RAM, running Ubuntu Server 9.04.&lt;br /&gt;Make sure that you are connected to the Internet and that you are logged on as&lt;br /&gt;root.&lt;br /&gt;&lt;br /&gt;Installing the necessary packages:&lt;br /&gt;* Install the following packages:&lt;br /&gt;** slapd: ldap server daemon&lt;br /&gt;** ldap-utils: ldap utilities&lt;br /&gt;** db4.2-util: ?, not sure if this one is necessary&lt;br /&gt;&lt;br /&gt;When installing these packages you will be asked for a password for the LDAP &lt;br /&gt;directory administrator, which is not the root password of the server on which &lt;br /&gt;you're installing OpenLDAP.&lt;br /&gt;&lt;br /&gt;Reconfigure the LDAP tree:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  $ dpkg-reconfigure slapd&lt;br /&gt;  Omit OpenLDAP server configuration? ... No&lt;br /&gt;  DNS domain name: ... example.com&lt;br /&gt;  Name of your organization: ... Whatever &amp; Co&lt;br /&gt;  Admin Password: ******&lt;br /&gt;  Confirm Password: ******&lt;br /&gt;  OK&lt;br /&gt;  BDB&lt;br /&gt;  Do you want your database to be removed when slapd is purged? ... No&lt;br /&gt;  Move old database? ... Yes&lt;br /&gt;  Allow LDAPv2 Protocol? ... No&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Check if ldap works:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  $ ldapsearch -x -b dc=example,dc=com&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Generate an encrypted password with slappasswd:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  $ slappasswd&lt;br /&gt;  New password:&lt;br /&gt;  Re-enter password:&lt;br /&gt;  {SSHA}d2BamRTgBuhC6SxC0vFGWol31ki8iq5m&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This example shows what happens when using "secret" for the password, but your&lt;br /&gt;result may vary!&lt;br /&gt;&lt;br /&gt;Create the file /etc/ldap/slapd.conf and add the following content:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  suffix          "dc=example,dc=com"&lt;br /&gt;  directory       "/var/lib/ldap"&lt;br /&gt;  rootdn          "cn=admin,dc=example,dc=com"&lt;br /&gt;  rootpw          {SSHA}d2BamRTgBuhC6SxC0vFGWol31ki8iq5m&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As root password use the generated password with the slappasswd tool.&lt;br /&gt;&lt;br /&gt;Edit the file /etc/ldap/ldap.conf and uncomment the following line: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  BASE dc=example,dc=com&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Restart the LDAP service:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  /etc/init.d/slapd restart&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Populating the LDAP Tree&lt;br /&gt;------------------------&lt;br /&gt;Now that your LDAP directory is ready, you can start populating it. This will&lt;br /&gt;be a 'classical' entry intended to be very compatible with Unix accounts&lt;br /&gt;(posix), directories (like addressbooks), and classical accounts (for web&lt;br /&gt;applications). But really it's just a starting point.&lt;br /&gt;&lt;br /&gt;An LDAP directory can be fed with a ldif file ("ldap directory interchange&lt;br /&gt;format" file). Create this file init.ldif somewhere on your system:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  dn: dc=example,dc=com&lt;br /&gt;  objectClass: dcObject&lt;br /&gt;  objectClass: organizationalUnit&lt;br /&gt;  dc: example&lt;br /&gt;  ou: Example Dot Com&lt;br /&gt;&lt;br /&gt;  dn: cn=admin,dc=example,dc=com&lt;br /&gt;  objectClass: simpleSecurityObject&lt;br /&gt;  objectClass: organizationalRole&lt;br /&gt;  cn: admin&lt;br /&gt;  description: LDAP administrator&lt;br /&gt;  userPassword: &lt;password&gt;&lt;br /&gt;&lt;br /&gt;  dn: ou=people,dc=example,dc=com&lt;br /&gt;  objectClass: organizationalUnit&lt;br /&gt;  ou: people&lt;br /&gt;&lt;br /&gt;  dn: ou=groups,dc=example,dc=com&lt;br /&gt;  objectClass: organizationalUnit&lt;br /&gt;  ou: groups&lt;br /&gt;&lt;br /&gt;  dn: uid=loboloco,ou=people,dc=example,dc=com&lt;br /&gt;  objectClass: inetOrgPerson&lt;br /&gt;  objectClass: posixAccount&lt;br /&gt;  objectClass: shadowAccount&lt;br /&gt;  uid: loboloco&lt;br /&gt;  sn: Loco  &lt;br /&gt;  givenName: Lobo&lt;br /&gt;  cn: Lobo Loco&lt;br /&gt;  displayName: Lobo Loco&lt;br /&gt;  uidNumber: 1000&lt;br /&gt;  gidNumber: 10000&lt;br /&gt;  userPassword: &lt;password&gt;&lt;br /&gt;  gecos: Lobo Loco&lt;br /&gt;  loginShell: /bin/bash&lt;br /&gt;  homeDirectory: /home/lobo&lt;br /&gt;  shadowExpire: -1&lt;br /&gt;  shadowFlag: 0&lt;br /&gt;  shadowWarning: 7&lt;br /&gt;  shadowMin: 8&lt;br /&gt;  shadowMax: 999999&lt;br /&gt;  shadowLastChange: 10877&lt;br /&gt;  mail: lobo.loco@example.com&lt;br /&gt;  postalCode: 31000&lt;br /&gt;  l: Brussels&lt;br /&gt;  o: Example&lt;br /&gt;  mobile: +32 (0)3 xxx xx xx&lt;br /&gt;  homePhone: +32 (0)475 xxx xxx&lt;br /&gt;  title: System Administrator&lt;br /&gt;  postalAddress:&lt;br /&gt;  initials: LL&lt;br /&gt;&lt;br /&gt;  dn: cn=example,ou=groups,dc=example,dc=com&lt;br /&gt;  objectClass: posixGroup&lt;br /&gt;  cn: example&lt;br /&gt;  memberUid: loboloco&lt;br /&gt;  gidNumber: 10000&lt;br /&gt;&lt;br /&gt;  dn: cn=example2,ou=groups,dc=example,dc=com&lt;br /&gt;  objectClass: posixGroup&lt;br /&gt;  cn: example2&lt;br /&gt;  gidNumber: 10001&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In the example above, the directory structure, a user and group have been&lt;br /&gt;defined. In other examples you might see the objectClass: top added in every&lt;br /&gt;entry, but that is default behavior so you don't have to add it explicitly.&lt;br /&gt;&lt;br /&gt;As with the LDAP root password, these passwords can be generated with&lt;br /&gt;slappasswd using the MD5 or CRYPT hashing scheme. See man slappasswd).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  Examples slappasswd:&lt;br /&gt;  (http://www.zytrax.com/books/ldap/ch14/)&lt;br /&gt;  Generate an SSHA password suitable for use as rootpw (in slapd.conf) or for use in a LDIF file for userPassword or authPassword attributes.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;  &lt;br /&gt;    # no options required&lt;br /&gt;    slappasswd&lt;br /&gt;  &lt;br /&gt;    # prompts twice for password string and then outputs &lt;br /&gt;    {SSHA}kjhfhfehflejhfvlldkl&lt;br /&gt;  &lt;br /&gt;    # save to a file using normal re-direction&lt;br /&gt;    slapppasswd &gt; /tmp/slappassword&lt;br /&gt;  &lt;br /&gt;    # generate {SSHA} encoding of password secret&lt;br /&gt;    slappasswd -s secret&lt;br /&gt;  &lt;br /&gt;    # generate {MD5) encoding of password secret&lt;br /&gt;    slappasswd -s secret -h {MD5}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;  &lt;br /&gt;  To place the output in LDIF or slapd.conf, save to a file and copy, paste to&lt;br /&gt;  relevant file if GUI editing tools are being used. If vi is being used,&lt;br /&gt;  navigate to location in file where password is to be inserted then use :r&lt;br /&gt;  !slappasswd [opts] - this runs the command and inserts stdout into editing file at last cursor position. Alternatively save the output of slappasswd to a file, navigate to insert location in vi and execute :r /path/to/file - inserts file&lt;br /&gt;  contents into last cursor location.&lt;br /&gt;&lt;br /&gt;When you're done, write and close the file.&lt;br /&gt;&lt;br /&gt;Now, add your entries to the LDAP:&lt;br /&gt;&lt;br /&gt;  stop LDAP daemon: &lt;code&gt;/etc/init.d/slapd stop&lt;/code&gt;&lt;br /&gt;  &lt;br /&gt;  delete the content that was automatically added at installation: &lt;br /&gt;  &lt;code&gt;rm -rf /var/lib/ldap/*&lt;/code&gt;&lt;br /&gt;  &lt;br /&gt;  add the new content: &lt;code&gt;slapadd -l init.ldif &lt;/code&gt;&lt;br /&gt;  &lt;br /&gt;  correct permissions on the database:&lt;br /&gt;  &lt;code&gt;chown -R openldap:openldap /var/lib/ldap&lt;/code&gt;&lt;br /&gt;  &lt;br /&gt;  start LDAP daemon: &lt;code&gt;/etc/init.d/slapd start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Your LDAP Server is up and running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-5154809498594536693?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/5154809498594536693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/07/configuring-openldap-on-ubuntu-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5154809498594536693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5154809498594536693'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/07/configuring-openldap-on-ubuntu-server.html' title='Configuring OpenLDAP on Ubuntu Server'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-6442366131992301416</id><published>2011-06-22T09:56:00.002+02:00</published><updated>2011-06-22T10:01:11.209+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu init.d update-rc.d linux'/><title type='text'>startup script ubuntu</title><content type='html'>When creating a new script to be executed at the startup of Ubuntu, create a script in /etc/init.d&lt;br /&gt;&lt;br /&gt;For example 'foo', google for examples of startup scripts, can be anything...&lt;br /&gt;&lt;br /&gt;Make the script executable: sudo chmod +x foo&lt;br /&gt;&lt;br /&gt;And finally update the list of startup scripts: sudo update-rc.d foo defaults&lt;br /&gt;&lt;br /&gt;Simple as that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-6442366131992301416?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/6442366131992301416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/06/startup-script-ubuntu.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6442366131992301416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6442366131992301416'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/06/startup-script-ubuntu.html' title='startup script ubuntu'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-4346878310551766335</id><published>2011-05-17T09:53:00.002+02:00</published><updated>2011-05-17T09:59:39.195+02:00</updated><title type='text'>Increase duration of ringtones</title><content type='html'>When you get a call on your mobile, the duration of the dialing tone is 15s for most of the Belgian mobile providers before forwarding to voice mail. For some people this is too short, so here's a list how you can increase the dialing tone for the various Belgian mobile providers. Just enter the code and press the dial button to activate the new duration. In the examples I set the duration to 30s.&lt;br /&gt;&lt;br /&gt;Proximus: **61*+32475151516*11*30# or **61*+32475151516**30#&lt;br /&gt;Base: **61*+32486191933**30# or *61*+32486191933**30#&lt;br /&gt;Mobistar: **61*5555**30#&lt;br /&gt;Telenet: **61*5555**30#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-4346878310551766335?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/4346878310551766335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/05/increase-duration-of-ringtones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4346878310551766335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4346878310551766335'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/05/increase-duration-of-ringtones.html' title='Increase duration of ringtones'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-8641128147619252237</id><published>2011-02-03T09:54:00.004+01:00</published><updated>2011-09-15T17:12:36.211+02:00</updated><title type='text'>ssh with passphrase authentication</title><content type='html'>i need to ssh quite a lot and i'm getting tired of always entering my password, so I finally decided to make use of the passphrase authentication.&lt;br /&gt;&lt;br /&gt;By far this is the easiest way:&lt;br /&gt;ssh-copy-id -i path/to/id_rsa.pub &lt;user&gt;@&lt;ipaddress&gt;&lt;br /&gt;&lt;br /&gt;You can do this also manually, which is does the same as the ssh-copy-id command:&lt;br /&gt;&lt;br /&gt;1. Check if you have already an rsa key-pair in ~/.ssh directory. You should have the files id_rsa and id_rsa.pub (or another name-combo, f.e. loboloco and loboloco.pub)&lt;br /&gt;If there isn't such a file combo, proceed with the next step, otherwise skip to step 3. &lt;br /&gt;2. first generate an rsa key-pair on your local machine in ~/.ssh:&lt;br /&gt;   &lt;blockquote&gt;ssh-keygen -t rsa&lt;br /&gt;   Generating public/private rsa key pair.&lt;br /&gt;   Enter file in which to save the key (/home/dewolfth/.ssh/id_rsa): &lt;press enter&gt;&lt;br /&gt;   Enter passphrase (empty for no passphrase): &lt;enter passphrase&gt;&lt;br /&gt;   Enter same passphrase again: &lt;enter passphrase once again&gt;&lt;br /&gt;   Your identification has been saved in /home/loboloco/.ssh/id_rsa.&lt;br /&gt;   Your public key has been saved in /home/loboloco/.ssh/id_rsa.pub.&lt;br /&gt;   The key fingerprint is:&lt;br /&gt;   d9:c5:65:7d:6b:38:fe:a2:d5:d4:d9:fc:c9:88:a9:01 loboloco@blackfrancis&lt;br /&gt;   The key's randomart image is:&lt;br /&gt;   +--[ RSA 2048]----+&lt;br /&gt;   |              o. |   &lt;br /&gt;   |           . o  o|&lt;br /&gt;   |            o . o|&lt;br /&gt;   |         o . o ++|&lt;br /&gt;   |       ES . . oo+|&lt;br /&gt;   |        .   o.= o|&lt;br /&gt;   |         . o o.+.|&lt;br /&gt;   |          o .. . |&lt;br /&gt;   |         . .. .  |&lt;br /&gt;   +-----------------+&lt;br /&gt;   loboloco@blackfrancis:~$&lt;/blockquote&gt;&lt;br /&gt;3. Copy the .pub file to the destination server (scp, rsync)&lt;br /&gt;4. Connect to the server via ssh&lt;br /&gt;5. Copy the .pub file to the file ~/.ssh/authorized_keys: cat id_rsa.pub &gt;&gt; .ssh/authorized_keys&lt;br /&gt;&lt;br /&gt;That should be it, when you connect again you won't have to enter your password anymore. Very handy if you have to commit code via ssh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-8641128147619252237?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/8641128147619252237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/02/ssh-with-passphrase-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8641128147619252237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8641128147619252237'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/02/ssh-with-passphrase-authentication.html' title='ssh with passphrase authentication'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-6772741725215485449</id><published>2011-01-19T19:22:00.005+01:00</published><updated>2011-01-19T19:48:02.785+01:00</updated><title type='text'>EID card reader on Ubuntu... what a mess</title><content type='html'>Installing a card reader on ubuntu isn't that hard, there exists even good documentation... but Ubuntu seems to mess up the middleware with some updates, kernel updates seem to be most likely.&lt;br /&gt;&lt;br /&gt;So each time I need my card reader (let's say 1 time every three months), it has become out of order when trying to connect to a site with my EID, giving either error: &lt;br /&gt;&lt;br /&gt;"ssl_error_handshake_failure_alert" or "ssl_error_bad_cert_alert"&lt;br /&gt;&lt;br /&gt;This is what helps for me:&lt;br /&gt;&lt;br /&gt;A. Reinstall middleware:&lt;br /&gt;1. Download the middleware: &lt;a href="http://eid.belgium.be/nl/binaries/beid-middleware-3%2E5%2E3-ubuntu-9%2E10-i686-quickfix_tcm147-102565.tgz"&gt;here&lt;/a&gt;&lt;br /&gt;If the link doesn't work, try &lt;a href="http://eid.belgium.be/nl/Hoe_installeer_je_de_eID/Linux/index.jsp"&gt;this page&lt;/a&gt; (in Dutch) which contains a link to the binary.&lt;br /&gt;2. Unpack the .tgz file: tar xvf beid-middlew...tgz&lt;br /&gt;3. cd install&lt;br /&gt;4. Execute "sudo ./install.sh" and follow the instructions. The execution can end with the following lines:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;blockquote&gt;libqtgui4 is already the newest version.&lt;br /&gt;0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;./install.sh: 390: [[: not found&lt;br /&gt;checking pcscd running...&lt;br /&gt;./install.sh: 390: [[: not found&lt;br /&gt;./install.sh: 390: [[: not found&lt;br /&gt;Follow the instructions in the documentation to:&lt;br /&gt;- register the software in Firefox.&lt;br /&gt;- set the environment variable MOZILLA_CERTIFICATE_FOLDER&lt;br /&gt;&lt;br /&gt;Please read the README file and licensing information for more information about&lt;br /&gt;libraries this software and the software it is depending on&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Try again in Firefox to connect to site with EID.&lt;br /&gt;&lt;br /&gt;B. Certificate issues&lt;br /&gt;1. uninstall the beid add-on in firefox, if already installed.&lt;br /&gt;2. Open Firefox&lt;br /&gt;3. Go to &lt;a href="https://addons.mozilla.org/firefox/addon/51744"&gt;this page&lt;/a&gt;.&lt;br /&gt;4. Click "Add to firefox".&lt;br /&gt;5. Click "Install Now"&lt;br /&gt;6. Restart firefox.&lt;br /&gt;7. Go to Edit &gt; Preferences &gt; Advanced &gt; Encryption and click View Certificates&lt;br /&gt;8. On Authorities tab, select Belgium CA Root certificate and click Edit.&lt;br /&gt;9. Select the 3 available options and click OK until you return to firefox.&lt;br /&gt;10. Restart firefox to complete the update.&lt;br /&gt;&lt;br /&gt;Hooray for ubuntu updates... next time take care of the middleware&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-6772741725215485449?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/6772741725215485449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2011/01/eid-card-reader-on-ubuntu-what-mess.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6772741725215485449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6772741725215485449'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2011/01/eid-card-reader-on-ubuntu-what-mess.html' title='EID card reader on Ubuntu... what a mess'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-370737071419282791</id><published>2010-08-12T10:25:00.006+02:00</published><updated>2010-08-12T10:50:25.906+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='*NIX Linux rename files numbering venefyxatu photography'/><title type='text'>Renaming files</title><content type='html'>When I travel, I always have at least two CF cards to take some, well most of my family say A LOT (but who cares...), pictures. My problem is always the  numbering of the files, because I have set my camera to restart the numbering for a new card. Why, I don't have a clue, but it's like that... perhaps I should change my setting, but then you wouldn't be reading this blog message.&lt;br /&gt;&lt;br /&gt;So my issue is that I want to put all files in one directory but then I have conflicting files because there will be 2 files named bla00001.jpg. So I have to add a fixed number to each file name of the second, third,... CF card in order to avoid these conflicts.&lt;br /&gt;&lt;br /&gt;Perhaps my solution isn't the shortest, nor the best, but at least it works for me. The solution described here is originally created by my ex-colleague &lt;a href="http://blog.venefyxatu.be"&gt;Erik&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So my camera produces the following file name format: DSC000001.JPG&lt;br /&gt;Let's say that the highest number on my first CF card is 313, the first file name of the second CF card must then be 314, i.e. DSC00314.JPG.&lt;br /&gt;&lt;br /&gt;So create a file somewhere on your hard drive, for example in &lt;span style="font-weight:bold;"&gt;/home/myworkspace/Pictures/rename.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add this code to your file:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;for file in `ls *.jpg`&lt;br /&gt;do&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;numberpart=`echo ${file} | sed 's/DSC[0]*//g'`&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;let number=`echo ${numberpart} | sed 's/\.jpg//g'`&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;let number=number+313&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;filename=DSC00${number}.jpg&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mv ${file} ${filename}&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Save the file and make it executable via &lt;span style="font-style:italic;"&gt;chmod +x rename.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Before testing it, make a backup of your pictures directory of which you need to rename the files!!!&lt;br /&gt;&lt;br /&gt;Put the script in the directory and run it (&lt;span style="font-style:italic;"&gt;./rename.sh&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Now I can put all my pictures in one dir, /me happy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-370737071419282791?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/370737071419282791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2010/08/renaming-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/370737071419282791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/370737071419282791'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2010/08/renaming-files.html' title='Renaming files'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-5980784127559390913</id><published>2010-02-11T23:08:00.007+01:00</published><updated>2010-03-11T22:38:02.528+01:00</updated><title type='text'>Sound through HDMI cable</title><content type='html'>Recently I got myself a fine new full HD television. My laptop has HDMI output so I immediately wanted to watch some movies on my new television. Unfortunately the sound still came through the lousy laptop speakers. Some googling made me a happy man :-)&lt;br /&gt;&lt;br /&gt;My system is an HP dv7 1140eb with nVidia 9200M GS running Ubuntu 9.10.&lt;br /&gt;&lt;br /&gt;So this is what I had to do to get video and sound to play on my television through my HDMI cable:&lt;br /&gt;&lt;br /&gt;1) Update the nVidia drivers to the latest (I used the nvidia drivers from nvidia.com). Go into &lt;br /&gt;2) open sound preferences (system &gt; preferences &gt; sound): on the hardware tab, check if there is a profile Digital Stereo (HDMI) Output. If so select that profile&lt;br /&gt;3) open alsamixer in shell, go to &lt;span style="font-weight:bold;"&gt;S/PDIF 0 and 1&lt;/span&gt; with RIGHT arrow and unmute by pressing m.&lt;br /&gt;4) test&lt;br /&gt;&lt;br /&gt;if there is still no sound via your tv speakers continue, otherwise: w00tness!&lt;br /&gt;&lt;br /&gt;1) upgrade alsa version to version 1.0.22: &lt;br /&gt;http://ubuntuforums.org/showthread.php?p=6589810#post6589810&lt;br /&gt;This procedure might take some time (in my case appx 15 minutes)&lt;br /&gt;2) open the sound preferences (system &gt; preferences &gt; sound): on the hardware tab, select the proper Profile, in my case Digital Stereo (HDMI) Output (original value: Analog Stereo Output)&lt;br /&gt;3) open alsamixer in shell, go to &lt;span style="font-weight:bold;"&gt;S/PDIF 0 and 1&lt;/span&gt; with RIGHT arrow and unmute by pressing m.&lt;br /&gt;&lt;br /&gt;That should do the trick. I hope this information helps other people.&lt;br /&gt;&lt;br /&gt;Bye Bye til the Next Time&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-5980784127559390913?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/5980784127559390913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2010/02/sound-through-hdmi-cable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5980784127559390913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5980784127559390913'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2010/02/sound-through-hdmi-cable.html' title='Sound through HDMI cable'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-2635310544919602369</id><published>2010-01-15T09:40:00.003+01:00</published><updated>2010-03-11T22:42:12.098+01:00</updated><title type='text'>Help no sound in flash apps :-(</title><content type='html'>Today, on my Ubuntu 9.10 I was trying to watch a youtube video, unfortunately my flash completely freaked out and unfortunately there was no sound either. In the past I used to reboot my machine and then the issue was solved, however, since I had so many apps open, I didn't want to reboot.&lt;br /&gt;&lt;br /&gt;So here's how I got it back working:&lt;br /&gt;&lt;br /&gt;1. lsof | grep pcm&lt;br /&gt;2. kill the results for pulseaudio and firefox&lt;br /&gt;3. restart alsa: sudo /etc/init.d/alsa-utils restart&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;remark&lt;/span&gt; I killed firefox too because when I then restart firefox it asks me to restore the previous session, so I have all my pages (even in different windows) open again upon starting firefox&lt;br /&gt;&lt;br /&gt;w00t, youtube, here I come !&lt;br /&gt;&lt;br /&gt;However, if it's still not working after this, most likely there has been a kernel update. Then I used this procedure and then everything worked again:&lt;br /&gt;http://ubuntuforums.org/showthread.php?p=6589810#post6589810&lt;br /&gt;This procedure might take some time (in my case appx 15 minutes)&lt;br /&gt;&lt;br /&gt;This procedure could perhaps solve a lot of threads on ubuntu forums like "no sound in flash", "flash makes FF crash", etc...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-2635310544919602369?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/2635310544919602369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2010/01/help-no-sound-in-flash-apps.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/2635310544919602369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/2635310544919602369'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2010/01/help-no-sound-in-flash-apps.html' title='Help no sound in flash apps :-('/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-5295195794945690592</id><published>2009-11-26T17:07:00.007+01:00</published><updated>2009-11-30T15:00:01.957+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code snippets python indentation'/><title type='text'>Get code blocks easily in your blogs</title><content type='html'>&lt;span style="font-family:verdana;"&gt;In my previous blog I added some Python code. But when I published my code all code was aligned to the left-hand side. Unfortunately indentation is very important for Python so some googling got me to this site:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.simplebits.com/cgi-bin/simplecode.pl"&gt;&lt;span style="font-family:verdana;"&gt;http://www.simplebits.com/cgi-bin/simplecode.pl&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Add your code and click Process and then remove all &lt;span style="font-weight:bold;"&gt;br&lt;/span&gt; tags (e.g. by using vim)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Copy this result in the html version of the blog.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-5295195794945690592?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/5295195794945690592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/11/get-code-blocks-easily-in-your-blogs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5295195794945690592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/5295195794945690592'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/11/get-code-blocks-easily-in-your-blogs.html' title='Get code blocks easily in your blogs'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-9078507137799064286</id><published>2009-11-26T10:56:00.008+01:00</published><updated>2009-11-26T16:42:40.223+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='subtitles python synchronization script file'/><title type='text'>Python File Manipulation</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Last week I ripped one of my dvd movies to have a backup. Unfortunately I forgot to add the dutch subtitles but I was too lazy to start all over again. So a simple google search gave me the  dutch subtitle files, unfortunately not in sync with my dvd rip.&lt;br /&gt;The subs appeared 1 min and something too fast, so my first intention was to manually edit the file... to no avail, after 2 or 3 lines I already gave up. This was going to take too much time: 1536 subtitles, appx 10s per subtitle... over 4 hours of work.&lt;br /&gt;Ok, what could I do to get the subs synced? I think it's fairly easy by using bash scripting in combination with sed and awk, but I have no experience in bash, so that solution was out of the question.&lt;br /&gt;What else could I do to get this file updated, and that's where Python came to the foreground, the only programming language I know a little, but enough to give it a try. The code in this blog has not indentation, so if you want to use this code, you only need to adjust the correct indentation.&lt;br /&gt;The structure of the file looks like:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;1518&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    02:26:23,091 --&gt; 02:26:24,978&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    subtitle here&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A first thing was to detect the lines that contain the start and end time of the subtitle. In the example above it's line 2 but of course I can not select the time lines by line number. The detection however, is fairly easy to do by using a regular expression.&lt;br /&gt;This is the regex I use: &lt;span style="font-family:courier new;"&gt;^(0[0-2])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The mechanism I use to update the file is as follows:&lt;br /&gt;1. Read the source file&lt;br /&gt;2. Check if line match the regular expression&lt;br /&gt;2.1. if match: update the line by adding time to both time-stamps and write to an output file&lt;br /&gt;2.2. if no match: write the line to the same output file.&lt;br /&gt;&lt;br /&gt;Fairly straight-forward, isn't it?&lt;br /&gt;&lt;br /&gt;When a line matches the regex, I need to filter the start and end time. Luckily these times are always in the same positions so I sliced the lines to get start and end time.&lt;br /&gt;Once I have those times I do some calculations to calculate the new time and then I write the file to the new output file.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;finput = open("/home/input", 'r')&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;foutput = open("/home/newsubtitles", 'w') #new empty file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;for line in finput:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if re.match(regex, line):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;start = line[0:12]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;end = line[17:29]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newstart = addTime(start)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newend = addTime(end)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;#replace start and end by newstart and newend &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;line.replace(start, newstart)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;line.replace(end, newend)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;#write updated line to output file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput.write(line)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;else:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;#in case of no match, just write line to output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput.write(line)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#when all lines are copied, close file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;foutput.close()&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So in this file section I use the addTime function. This function expects a string&lt;br /&gt;and will return a new string. This string is always of the format hh:mm:ss,xxx where xxx are the milliseconds. Unfortunately the separator isn't always the colon, so I have to slice up the input string to get the hour, minutes, seconds and milliseconds. Then I add to milliseconds, seconds and minutes the necessary time&lt;br /&gt;and check if adding these times don't pass the normal hour times, since 64s does not exist in the real world. For example if number of seconds exceeds 59s, I add 1 to number of minutes and substract 60 from the number of seconds.&lt;br /&gt;In the code below the "add*" variables are constants, defined somewhere else, so you can update to your own needs.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;def addTime(time):        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = int(time[0:2])&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = int(time[3:5])&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = int(time[6:8])&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = int(time[9:12])&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = milli + addmilli&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss + addss&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm + addmm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if milli &gt; 999:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = milli - 1000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if ss &gt; 59:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss - 60&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if mm &gt; 59:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm - 60&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = hh + 1   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newtime = updateTime(hh, mm, ss, milli)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return newtime&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The updateTime function makes that all hh, mm and ss are always 2 digits and milli is always 3 digits.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;def updateTime(hh, mm, ss, milli):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = str(milli)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(milli) == 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = "00%s" %milli&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;elif len(milli) == 2:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = "0%s" %milli&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = str(ss)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(ss) == 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = "0%s" %ss&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = str(mm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(mm) == 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = "0%s" %mm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = str(hh)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(hh) == 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = "0%s" %hh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newtime = "%s:%s:%s,%s" %(hh, mm, ss, milli)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return newtime&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We're there, I'm quite sure that this script could be done in less code by an experienced programmer, which I'm not. But at least it worked for me and it took me less than 1 hour to get this working, so it gave me time to write this blog and even then I would still be changing the file manually and probably with more mistakes.&lt;br /&gt;&lt;br /&gt;Final code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import re&lt;br /&gt;&lt;br /&gt;regex = "^(0[0-2])"&lt;br /&gt;input = "/home/dewolfth/input.txt"&lt;br /&gt;subs = "/home/dewolfth/mymovie.txt"&lt;br /&gt;addhour = 1&lt;br /&gt;addmm = 1&lt;br /&gt;addss = 7&lt;br /&gt;addmilli = 500&lt;br /&gt;&lt;br /&gt;def updateTime(hh, mm, ss, milli):&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = str(milli)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(milli) == 1:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = "00%s" %milli&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;elif len(milli) == 2:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = "0%s" %milli&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = str(ss)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(ss) == 1:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = "0%s" %ss&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = str(mm)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(mm) == 1:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = "0%s" %mm&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = str(hh)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if len(hh) == 1:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = "0%s" %hh&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newtime = "%s:%s:%s,%s" %(hh, mm, ss, milli)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return newtime&lt;br /&gt;&lt;br /&gt;def addTime(time):&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = int(time[0:2])&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = int(time[3:5])&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = int(time[6:8])&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = int(time[9:12])&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = milli + addmilli&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss + addss&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm + addmm&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if milli &amp;gt; 999:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;milli = milli - 1000&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss + 1&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if ss &amp;gt; 59:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ss = ss - 60&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm + 1&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if mm &amp;gt; 59:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;mm = mm - 60&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hh = hh + 1&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newtime = updateTime(hh, mm, ss, milli)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;return newtime&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;finput = open(input, 'r')&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput = open(subs, 'w')&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;for line in finput:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;if re.match(regex,line):&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;start = line[0:12]&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newstart = addTime(start)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;end = line[17:29]&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;newend = addTime(end)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;line = line.replace(start, newstart)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;line = line.replace(end, newend)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput.write(line)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;else:&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput.write(line)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;foutput.close()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;br /&gt;if __name__ == "__main__":&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;main()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-9078507137799064286?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/9078507137799064286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/11/python-file-manipulation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/9078507137799064286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/9078507137799064286'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/11/python-file-manipulation.html' title='Python File Manipulation'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-6163481331800562712</id><published>2009-11-25T14:25:00.005+01:00</published><updated>2009-11-25T16:38:41.157+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python software development technical tech writer'/><title type='text'>From techn writer to software developer and back and ...</title><content type='html'>&lt;span style="font-family: verdana;"&gt;The last weeks I have been lucky to do some development. Even though the tasks I did, would be for a sr developer some minor work, the job helped me getting a better view over our software. All development I did was in &lt;a href="http://www.python.org"&gt;Python&lt;/a&gt;.&lt;br /&gt;My first job was to refactor a wizard so that it became consistent to the new specs of the software.&lt;br /&gt;After this refactoring work, I refactored the same wizard again and two others so that these wizards became available in the web interface.&lt;br /&gt;A lot of development and testing later, I succeeded in all my tasks, I even did some bug-fixes, w00t.&lt;br /&gt;But time has come that my engineering tasks are over, and that I'm back in my natural habitat of writing documentation. I'm a tech writer after all...&lt;br /&gt;&lt;br /&gt;So what did I learn during these last weeks as developer?&lt;br /&gt;First I have to admit that I really enjoyed my time as engineer. Not that I've become an experienced engineer (pretty far away from that level), but I just like to learn new stuff. And just like everything, you learn by doing so. So I'm glad that my manager gave me the opportunity to spend some time in development, since I don't have too much time in private to become a developer.&lt;br /&gt;&lt;br /&gt;I have learned quite a lot about Q-layer's Q-Action/Workflow mechanism and using variables in that system. Even though it's quite complex, imho it's a great system.&lt;br /&gt;Once you get to know the terminology and mechanism, it goes quite fast to create your own Q-Actions, annex workflows.&lt;br /&gt;&lt;br /&gt;So before returning completely to tech writing mode, I was thinking, why not write a short message before I start documenting the things I learned the passed few weeks...&lt;br /&gt;&lt;br /&gt;Bye bye til the next time!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-6163481331800562712?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/6163481331800562712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/11/from-techn-writer-to-software-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6163481331800562712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6163481331800562712'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/11/from-techn-writer-to-software-developer.html' title='From techn writer to software developer and back and ...'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-8198589537435672972</id><published>2009-09-10T14:58:00.008+02:00</published><updated>2009-09-14T10:02:23.269+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='install oracle unbreakable linux iso merge virtualbox'/><title type='text'>Reading manuals is not wasting time... sometimes</title><content type='html'>I wanted to test &lt;a href="http://www.oracle.com/us/technologies/linux/index.htm"&gt;Oracle's Enterprise Linux &lt;/a&gt;(Unbreakable Linux). On the website of Oracle I couldn't find one big iso, so I downloaded the 5 CD iso images.&lt;br /&gt;&lt;br /&gt;As I don't have enough computers, I use &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;. Since I thought that it was not possible to install an OS via multiple iso images with VirtualBox, I did the following:&lt;br /&gt;&lt;br /&gt;I merged the 5 iso images into one big iso image. Don't worry, this doesn't require complex manipulations, this is what I did:&lt;br /&gt;&lt;br /&gt;1. copied the first iso to a new iso image: "cp first.iso new.iso"&lt;br /&gt;2. executed the next command: "cat second.iso &gt;&gt; new.iso"&lt;br /&gt;This just appends the second iso image to the copy of the first iso image.&lt;br /&gt;Repeat this for the other iso images ("cat third.iso &gt;&gt; new.iso", "cat fourth.iso &gt;&gt; new.iso", and "cat fifth.iso &gt;&gt; new.iso")&lt;br /&gt;&lt;br /&gt;Unfortunately, during the installation of Enterprise Linux, the wizard kept asking for Installation CD 2... No luck for me.&lt;br /&gt;&lt;br /&gt;Back to installing via the 5 iso images then. And after a tip I found out that it is easy to switch from iso image during the installation.&lt;br /&gt;&lt;br /&gt;First make sure that all iso images are loaded in VirtualBox.&lt;br /&gt;Then create the a virtual machine and let it boot from the first iso image.&lt;br /&gt;When the install wizards asks for the second iso image, click Devices in the VirtualBox menu, and select Unmount CD/DVD-ROM.&lt;br /&gt;Then Devices &gt; Mount CD/DVD-ROM &gt; CD/DVD-ROM Image and select the second iso image.&lt;br /&gt;&lt;br /&gt;Simple as that... perhaps I should try reading manuals...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-8198589537435672972?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/8198589537435672972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/09/install-oracles-unbreakable-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8198589537435672972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8198589537435672972'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/09/install-oracles-unbreakable-linux.html' title='Reading manuals is not wasting time... sometimes'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-3104621573471354347</id><published>2009-09-03T10:02:00.003+02:00</published><updated>2009-09-03T10:10:29.818+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac osx leopard ubuntu 9.04 jaunty jackalope'/><title type='text'>Turn Ubuntu Jaunty into Mac OSX Leopard</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Just to test if mac layout is so much better than gnome, well, not really, imho they're equal, though, I must admit that mac layout is just that bit fancier...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;On &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://maketecheasier.com/turn-your-ubuntu-intrepid-into-mac-osx-leopard/2009/01/08"&gt;this site&lt;/a&gt;&lt;span style="font-family: verdana;"&gt; it is really good explained how you can turn your ubuntu (intrepid) into mac osx leopard layout. This tutorial has been tested on Ubuntu Jaunty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The only part where I didn't follow the tutorial, is in the section Configuring usplash screen where you need to download the .deb files (splashy_....deb and libsplashy....deb)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;I had to execute this command to get splashy working: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;dpkg –force-overwrite -i /var/cache/apt/archives/splashy_0.3.13-3ubuntu1_i386.deb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hope to get a real mac soon ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-3104621573471354347?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/3104621573471354347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/09/turn-ubuntu-jaunty-into-mac-osx-leopard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/3104621573471354347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/3104621573471354347'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/09/turn-ubuntu-jaunty-into-mac-osx-leopard.html' title='Turn Ubuntu Jaunty into Mac OSX Leopard'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-7310173924989030814</id><published>2009-09-02T14:45:00.004+02:00</published><updated>2009-09-02T15:06:25.109+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux gimp mass action resize compress'/><title type='text'>Get to know the power of GIMP</title><content type='html'>&lt;span style="font-family: verdana;"&gt;I recently bought me a DSLR (&lt;/span&gt;&lt;a style="font-family: verdana;" href="http://alatest.com/apps/reviews/8895359/50512/?ref=http%3A%2F%2Freviews.cnet.com%2Fdigital-cameras%2Fsony-alpha-dslr-a300%2F4505-6501_7-32864064.html"&gt;Sony Alpha-300&lt;/a&gt;&lt;span style="font-family: verdana;"&gt;). Of course the images, taken by my new dslr are too big to publish on websites, such as &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://http://picasaweb.google.com/tdewolf/"&gt;picasaweb&lt;/a&gt;&lt;span style="font-family: verdana;"&gt;.&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: verdana;"&gt;I used to open my windows in &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://www.virtualbox.org"&gt;VirtualBox&lt;/a&gt;&lt;span style="font-family: verdana;"&gt; and then use Microsoft's Picture Manager (comes with Office) to resize my images to web-quality. I have to admit that this worked fine, but I got annoyed by the slow access speeds from my virtual windows to my local drives. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;I heard that GIMP could be used as batch system, so I started looking around to see how I could compress my images to web-quality for multiple files. And in fact, it's fairly easy. GIMP comes with the most common Linux distributions, you only need to install &lt;span style="font-family: courier new;"&gt;gimp-plugin-registry&lt;/span&gt;&lt;/span&gt; with your package manager (apt-get, yast, yum, ...).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Once the package&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;is installed, start GIMP. The batch processor can be found under Filters &gt; Batch &gt; Batch Process. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;In the window that appear you can select your images, and the actions to be executed on each tab. For example for compressing images, go to the Output tab, select the image type and select a quality level. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;And yet another step away from Windows :-)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-7310173924989030814?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/7310173924989030814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/09/get-to-know-power-of-gimp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/7310173924989030814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/7310173924989030814'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/09/get-to-know-power-of-gimp.html' title='Get to know the power of GIMP'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-4153092253148420382</id><published>2009-08-28T20:00:00.005+02:00</published><updated>2009-09-14T10:03:14.036+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu numerical keypad pointer'/><title type='text'>Numerical keypad doesn't work anymore</title><content type='html'>Every once in a while, my numerical keypad only works as a mouse on my Ubuntu. I'm experiencing this behavior since the Intrepid version (8.10). Luckily for me it's not a big deal to solve it, but I had to google it every time. So perhaps by writing this small blog, it stays in my mind.&lt;br /&gt;So to get the numerical keypad working again, go to System &gt; Preferences &gt; Keyboard&lt;br /&gt;Then go to the tab Mouse Keys and clear the option "Pointer can be controlled using the keypad".&lt;br /&gt;I still need to figure out which update causes this behavior...&lt;br /&gt;My thanks to the person of this solution (http://bit.ly/47sAQ).&lt;br /&gt;&lt;br /&gt;Cheerio!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-4153092253148420382?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/4153092253148420382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/08/nemerical-keypad-doesnt-work-anymore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4153092253148420382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/4153092253148420382'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/08/nemerical-keypad-doesnt-work-anymore.html' title='Numerical keypad doesn&apos;t work anymore'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-616874740753961054</id><published>2009-07-17T17:04:00.005+02:00</published><updated>2009-07-28T15:16:39.997+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ejabberd cluster howto mnesia'/><title type='text'>Clustering ejabberd nodes using mnesia databases</title><content type='html'>&lt;span style="font-family:verdana;"&gt;A while ago, I was asked if I could set up a cluster of 2 ejabberd nodes (a Jabber/XMPP instant messaging server), using the default internal mnesia database. I found this a nice challenge, which shouldn't take too much time... NOT!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I use 2 servers, both running OpenSolaris on which I have installed a very nice framework, namely PyMonkey (see www.pymonkey.org and www.qshell.org), used for building compute and storage clouds amongst others. To work on this framework I need to be root in "&lt;span style="font-family:courier new;"&gt;/opt&lt;/span&gt;", in which the framework is installed. I installed the ejabberd (v. 2.0.5) and erlang (v. R12B-5) packages in this framework (Solaris only, as we speak). It's not that I'm working in a specific framework that this information is not valid for the default packages on Linux, Windows, or (Open)Solaris. Differences might be the location of the mnesia database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;So I started my journey in googling for information on the net about installing ejabberd nodes. Quickly I got to the official ejabberd guide, which is clear and a good starting point (1). I soon found out that setting up one node is pretty straight-forward, setting up nodes in a cluster however is another piece of cake. Looking further in the official guide I even got the documentation of clustering right in front of me (2). However, what is described in that chapter is far from accurate to get a cluster of ejabberd nodes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Some more googling lead me to various blogs (3) and internet fora (4)(5), some of them more helpful than the other, but they all helped me a little further and I finally got my nodes into clustering, thanks to my colleague, who gave me the last hint.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The big issue was the location of the cookie (&lt;span style="font-style: italic;"&gt;.erlang.cookie&lt;/span&gt;) on the new ejabberd node. The cookie is required to identify the different nodes in the cluster. This cookie must be identical on all nodes, otherwise the nodes won't be able to communicate with each other. Some mailings (6) pointed also to ".hosts.erlang" as cause for my issue, but in my test case I didn't need that file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;To save you a lot of time I decided to share my procedure in my blog.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Here is my setup:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* OpenSolaris ejabberd1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* OpenSolaris ejabberd2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* Both running the PyMonkey framework (&lt;span style="font-family:courier new;"&gt;/opt/qbase3&lt;/span&gt;). Download the PyMonkey sandbox on http://confluence.qlayer.com/display/SOFT/Download&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* I can ping from one machine to the other by using the host name. Possibly you have to change this in &lt;span style="font-family:courier new;"&gt;/etc/hosts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;On both machines:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* the ejabberd package is installed in &lt;span style="font-family:courier new;"&gt;/opt/qbase3/apps/ejabberd-2.0.5&lt;/span&gt;, further noted as $EJABBERD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* the erlang/otp package is installed in &lt;span style="font-family:courier new;"&gt;/opt/qbase3/apps/erlang-R12B-5&lt;/span&gt;, further noted as $ERLANG&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* I am logged on as root&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Set up First Node (on ejabberd1)&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;1. Create backups of some critical files (just in case...):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    * &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt; in $EJABBERD/etc/ejabberd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    * &lt;span style="font-family:courier new;"&gt;ejabberdctl&lt;/span&gt; in $EJABBERD/sbin/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;2. Modify &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    In the section &lt;span style="font-style: italic;"&gt;SERVED HOSTNAMES&lt;/span&gt; I have a line "&lt;span style="font-style: italic;font-family:courier new;" &gt;{hosts, ["localhost"]}.&lt;/span&gt;". (!) I'm careful not to remove any periods at the end of lines.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    I change localhost by a domain (e.g. &lt;span style="font-style: italic;"&gt;myexample.com&lt;/span&gt;), served by my first ejabberd node, as clearly stated in the example in the above lines of the file. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    In the section &lt;span style="font-style: italic;"&gt;ACCESS CONTROL LISTS&lt;/span&gt; I have 2 commented examples of users who will have admin rights on the ejabberd node, for example "&lt;span style="font-style: italic;font-family:courier new;" &gt;%%{acl, admin, {user, "aleksey", "localhost"}}.&lt;/span&gt;" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    I remove the %-signs (which indicate comments) and then change "aleksey" and "localhost" by my username (e.g. &lt;span style="font-style: italic;"&gt;tdewolf&lt;/span&gt;) and my domain (the one defined as served hostname).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Remark:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    If I want to create multiple admin users, I have to create a line for each admin user.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    I will still need to register the users to the ejabberd node however once the node is up and running, see later.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;3. Modify ejabberdctl&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    At approximately line 12, I find the line "&lt;span style="font-style: italic;font-family:courier new;" &gt;HOST=localhost&lt;/span&gt;", where I can set the host name of my ejabberd node. This is the name of the host of the ejabberd node name. Use the server's hostname, &lt;span style="font-style: italic;"&gt;ejabberd1&lt;/span&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Remind that this host is not the same as host in the &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt; file!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    At the last line of that section ("&lt;span style="font-family:courier new;"&gt;EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE&lt;/span&gt;"), approximately line 18, I change $NODE to $ERLANG_NODE, to obtain a clearer name for the database.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;4. Since I'm working in a sandbox, I also need to set my environment variable LD_LIBRARY_PATH to point to /opt/qbase3/lib.&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;Remark: I could omit this step if I would use the default ejabberd and erlang packages.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;5. Ok, now I'm ready to launch my first ejabberd node. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    From $EJABBERD, I enter the following command: &lt;span style="font-family:courier new;"&gt;./sbin/ejabberdctl start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    My node should be started, so I check the status by issuing: &lt;span style="font-family:courier new;"&gt;./sbin/ejabberdctl status&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    It returns:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &lt;span style="font-style: italic;"&gt;Node ejabberd@ejabberd1 is started. Status: started&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;        ejabberd is running&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;6. I will now register the admin users that I have set in step 2, issuing the command: &lt;span style="font-family:courier new;"&gt;./sbin/ejabberdctl register &lt;/span&gt;&lt;user style="font-family: courier new;"&gt; &lt;host&gt; &lt;password&gt; &lt;/password&gt;&lt;/host&gt;&lt;/user&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;user host password&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;where:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    * &lt;user&gt;user: the user name as defined in &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt;&lt;/user&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    * &lt;host&gt;host: the host name as defined in &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt;&lt;/host&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    * &lt;password&gt;password: a randomly chosen password&lt;/password&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;With these credentials you are able to open ejabberd's WebAdmin at http://&lt;ip&gt;&lt;span style="font-style: italic;"&gt;ip node&lt;/span&gt;:5280/admin/. Use the full Jabber ID to log on, for example tdewolf@myexample.com.&lt;/ip&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Visit the official guide for more information about the WebAdmin (7). I leave the WebAdmin session open to easily see a new ejabberd node appear, therefore I go to the Nodes page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I have an ejabberd node up and running and I can even access the WebAdmin of it, w00t. That was easy, wasn't it?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;When the ejabberd node has started the following files and directories are created:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* &lt;span style="font-family:verdana;"&gt;$EJABBERD/var/lib/ejabberd/.erlang.cookie&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;* $EJABBERD/var/lib/ejabberd/db/ejabberd@myexample.com (host is defined in ejabberdctl)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:verdana;font-size:130%;"  &gt;Set up Second Node (on ejabberd2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;1. Copy the necessary files from your first node to my second node.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Copy from the first node &lt;span style="font-style: italic;"&gt;$EJABBERD/var/lib/ejabberd/.erlang.cookie&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;/root&lt;/span&gt; on this new node &lt;span style="font-weight: bold;"&gt;and&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;$EJABBERD/var/lib/ejabberd&lt;/span&gt;. The default working directory of erlang is $HOME, and since I need to be root to be able to work in my sandbox, /root is my $HOME. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Copy from the&lt;span style="font-style: italic;"&gt; first node&lt;/span&gt; &lt;span&gt;&lt;span style="font-family:courier new;"&gt;$EJABBERD/etc/ejabberd/ejabberd.cfg&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;to the same location on this new node. This means that this new ejabberd node will serve the same domain and that it will have the same admin users.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;2. Modify ejabberdctl&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;At approximately line 12, I find the line "&lt;span style="font-style: italic;font-family:courier new;" &gt;HOST=localhost&lt;/span&gt;", where I can set the host name of my ejabberd node. This is the name of the host of the ejabberd node name. &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Use the server's hostname&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;, &lt;span style="font-style: italic;"&gt;ejabberd2&lt;/span&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Remind that this host is not the same as host in the &lt;span style="font-family:courier new;"&gt;ejabberd.cfg&lt;/span&gt; file!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;At the last line of that section ("&lt;span style="font-family:courier new;"&gt;EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE&lt;/span&gt;"), approximately line 18, I change $NODE to $ERLANG_NODE, to obtain a clearer name for the database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;3. Since I'm working in a sandbox, I also need to set my environment variable LD_LIBRARY_PATH to point to /opt/qbase3/lib. &lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;Remark: I could omit this step if I would use the default ejabberd and erlang packages.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;4. Now I'm ready to set my new ejabberd node in cluster with the first node. From &lt;span style="font-family:courier new;"&gt;$ERLANG/bin&lt;/span&gt; I enter the following very long command.&lt;br /&gt;(!) Take care about ALL quotes and omit the backslashes, they just indicate to continue the command:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;span style="font-style: italic;"&gt;./erl -sname ejabberd@ejabberd2 \&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;    -mnesia dir '"/opt/qbase3/apps/ejabberd-2.0.5/var/lib/ejabberd/db/"' \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;    -mnesia extra_db_nodes "['ejabberd@ejabberd1']" \ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;    -s mnesia&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    where: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        * -sname ejabberd@ejabberd2 is the new ejabberd node&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        * -mnesia dir '"..."' is the location of the database on the new node, by default in var/lib/ejabberd/db/. The outer quotes is a single quote; the inner pair is a double quote!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        * -mnesia extra_db_nodes "['...']" is the node to make the cluster with, mind again the single and double quotes!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;5. I arrive in an erlang shell when I have executed the above command: (ejabberd@ejabberd2)1&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;To see if my two nodes are in a cluster I enter the command "mnesia:info()." then scroll up to find a line "running db nodes" which must be a list with the two nodes. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Double-check: I see the second ejabberd node appear under Running Nodes in the WebAdmin of my first ejabberd node, w00t again!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Once again, mind the period at the end of the command! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 0);font-family:verdana;" &gt;***Tip:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 0);font-family:verdana;" &gt;If you find only one ejabberd node in running db nodes and the other one in stopped db nodes, something went wrong.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 0);font-family:verdana;" &gt;Most likely your .erlang.cookie is located in the wrong location. In your erlang session, execute "erlang:get_cookie()." and note the result between the quotes, e.g. IXHDCSATUADBDTKVTOFC. Then lookup .erlang.cookie with that result and overwrite it with the version from ejabberd node 1.&lt;/span&gt;&lt;br /&gt;***&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;6. Synchronize databases&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    I need to synchronize the database of my new node with the database of my first node. At the Erlang Shell, I enter the following command:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;span style="font-style: italic;"&gt;mnesia:change_table_copy_type(schema, node(), disc_copies).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Quit the Erlang Shell with the command "&lt;span style="font-style: italic;"&gt;q().&lt;/span&gt;" The second ejabberd node is now listed in Stopped Nodes! Check in a refreshed Nodes page in the first node's WebAdmin.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;7. Now that I know that my two nodes can work in a cluster, I need to change &lt;span style="font-style: italic;"&gt;$EJABBERD/sbin/ejabberdctl&lt;/span&gt; to run with the same parameters as I did with the command in step 4.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    In the section "&lt;span style="font-style: italic;"&gt;# start server&lt;/span&gt;" insert a new line after the line "&lt;span style="font-style: italic;"&gt;-mnesia dir "\"$EJABBERD_DB\"" \&lt;/span&gt;". Add the following content to this new line (without the start and end quote): "&lt;span style="font-style: italic;"&gt;-mnesia extra_db_nodes "['ejabberd@ejabberd1']" -s mnesia \&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    which are the last two parameters of the .erl command.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 0);font-family:verdana;" &gt;***Tip:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 0);font-family:verdana;" &gt;If you would use the node in "live" mode, do the same in the section "# start interactive server"&lt;/span&gt;&lt;br /&gt;***&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;8. It's time now to start my second node in the normal way. From $EJABBERD I enter the command: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;span style="font-style: italic;"&gt;./sbin/ejabberdctl start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;In WebAdmin of the first node, I see my second node appear in Running Nodes, which means that both ejabberd nodes are running and active in &lt;span style="font-style: italic;"&gt;one&lt;/span&gt; cluster.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;To get the information written to both databases, I change the storage type of a database (&lt;span style="font-weight: bold;"&gt;Nodes &lt;/span&gt;&gt;&lt;span style="font-weight: bold;"&gt; select node &lt;/span&gt;&gt;&lt;span style="font-weight: bold;"&gt; Database&lt;/span&gt;) and click &lt;span style="font-weight: bold;"&gt;Submit&lt;/span&gt; at the bottom of the page to apply my changes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;For more information about the parameters and functions I can advise you to visit the official ejabberd guide (1) and the official erlang site (8).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;A good tutorial for a Linux setup can be found on sysmonblog (9).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(1) http://www.process-one.net/en/ejabberd/guide_en&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(2) http://www.process-one.net/en/ejabberd/guide_en#htoc79&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(3) http://dev.esl.eu/blog/2008/09/30/set-up-clustering-in-ejabberd/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(4) http://www.nabble.com/problems-in-clustering-ejabberd-via-tutorial-on-official-site-td22475081.html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(5) http://www.trapexit.org/forum/viewtopic.php?p=43930&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(6) http://lists.jabber.ru/pipermail/ejabberd/2005-March/000883.html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(7) http://www.process-one.net/en/ejabberd/guide_en#webadmin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(8) http://erlang.org/&lt;br /&gt;(9) http://sysmonblog.co.uk/2008/06/ot-installing-ejabberd-on-debian-ubuntu.html&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-616874740753961054?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/616874740753961054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/07/clustering-ejabberd-nodes-using-mnesia.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/616874740753961054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/616874740753961054'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/07/clustering-ejabberd-nodes-using-mnesia.html' title='Clustering ejabberd nodes using mnesia databases'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-7588340494548621941</id><published>2009-07-13T11:07:00.001+02:00</published><updated>2009-07-13T11:07:54.477+02:00</updated><title type='text'>My other datacenter is the Sun Cloud</title><content type='html'>&lt;object id="flashObj" width="300" height="225" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"&gt;&lt;param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;publisherID=1460825906" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="flashVars" value="videoId=24586081001&amp;playerID=1640183659&amp;domain=embed&amp;" /&gt;&lt;param name="base" value="http://admin.brightcove.com" /&gt;&lt;param name="seamlesstabbing" value="false" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="swLiveConnect" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;publisherID=1460825906" bgcolor="#FFFFFF" flashVars="videoId=24586081001&amp;playerID=1640183659&amp;domain=embed&amp;" base="http://admin.brightcove.com" name="flashObj" width="300" height="225" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;The infrastructure of the Sun Cloud Data Center &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-7588340494548621941?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/7588340494548621941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/07/my-other-datacenter-is-sun-cloud.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/7588340494548621941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/7588340494548621941'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/07/my-other-datacenter-is-sun-cloud.html' title='My other datacenter is the Sun Cloud'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-8617830866331459993</id><published>2009-07-13T09:27:00.001+02:00</published><updated>2009-07-20T16:05:06.555+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hp dv7 ubuntu 9.04 jaunty jackalope installation'/><title type='text'>Ubuntu installation on recent hardware</title><content type='html'>Last January I bought a new laptop (HP DV7), and of course Windows Vista was included. My first actions on my new laptop was reinstalling the machine with Ubuntu.&lt;br /&gt;The installation is easy and straight forward, except for getting sound out of the machine (Intel's ICH9 chipset). After googling and exploring ubuntu, I finally got it working.&lt;br /&gt;&lt;br /&gt;Here's my installation procedure:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;  Install Ubuntu  &lt;/li&gt;&lt;li&gt;  When installed update and upgrade your complete installation:&lt;br /&gt;sudo apt-get update&lt;br /&gt;sudo apt-get upgrade&lt;br /&gt;Never mind any nvidia driver settings, do this afterwards.&lt;br /&gt;Most likely you will have to perform this step twice.  &lt;/li&gt;&lt;li&gt;  Update the Hardware drivers: System &gt; Administration &gt; Hardware Drivers:&lt;br /&gt;Use the Ubuntu recommended driver, enter password when asked for.  &lt;/li&gt;&lt;li&gt;  Sound might not work (stuttering, no sound, ...): add "irqpoll" to kernel command&lt;br /&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;  open "/boot/grub/menu.lst"&lt;/li&gt;&lt;li&gt;look for the following lines:&lt;br /&gt;&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; text-align: left;"&gt;title Ubuntu hardy (development branch), kernel 2.6.24-16-generic&lt;br /&gt;root (hd0,5)&lt;br /&gt;kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=8k4o3ilj-3fff-dfae-943j-4332lkj52kl43 ro quiet splash&lt;br /&gt;initrd /boot/initrd.img-2.6.24-16-generic&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;add "irqpoll" at the end of the line "kernel"&lt;/li&gt;&lt;li&gt;save and reboot the pc&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Mic might not work:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;remove pulseaudio and install esound:&lt;br /&gt;&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; text-align: left;"&gt;sudo apt-get remove pulseaudio&lt;br /&gt;sudo apt-get install esound&lt;br /&gt;&lt;br /&gt;sudo rm /etc/X11/Xsession.d/70pulseaudio (You may want to back this up)&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Under &lt;b&gt;System -&gt; Preferences -&gt; Sound &lt;/b&gt;make sure they are all set to 'Autodetect'.&lt;br /&gt;The only one you will have to set manually to ALSA is 'Sound Capture' under 'Audio Conferencing'.&lt;br /&gt;Note at this point Pulseaudio is now no longer an option under these drop menus.&lt;/li&gt;&lt;li&gt;Under &lt;b&gt;System -&gt; Preferences -&gt; Sessions&lt;/b&gt;&lt;br /&gt;Deselected or Remove the Pulseaudio Manager&lt;/li&gt;&lt;li&gt;Remove and asoundrc config file from your home dir (~/):&lt;br /&gt;&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; text-align: left;"&gt;rm .asound*&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Remove pulseaudio packages:&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; text-align: left;"&gt;sudo apt-get --purge remove pulseaudio&lt;br /&gt;&lt;br /&gt;sudo apt-get autoremove&lt;br /&gt;&lt;br /&gt;sudo apt-get remove pulseaudio-utils&lt;br /&gt;sudo apt-get remove pulseaudio-module-conf&lt;br /&gt;sudo apt-get remove pulseaudio-module-hal&lt;br /&gt;sudo apt-get remove pulseaudio-module-x11&lt;br /&gt;sudo apt-get remove libpulsecore5&lt;br /&gt;sudo apt-get remove gstreamer0.10-pulseaudio&lt;br /&gt;sudo apt-get remove libpulse-browse0&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Reboot&lt;/li&gt;&lt;li&gt;Check Alsamixer settings, master may be reset to zero:&lt;br /&gt;&lt;pre class="alt2" style="border: 1px inset ; margin: 0px; text-align: left;"&gt;$ alsamixer -Dhw&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Install the following software:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;thunderbird&lt;br /&gt;&lt;/li&gt;&lt;li&gt;skype (see medibuntu.org)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;compizconfig-settings-manager&lt;br /&gt;&lt;/li&gt;&lt;li&gt;avant-window-navigator&lt;br /&gt;&lt;/li&gt;&lt;li&gt;subversion&lt;/li&gt;&lt;li&gt;banshee&lt;/li&gt;&lt;li&gt;amarok&lt;/li&gt;&lt;li&gt;acroread (see medibuntu.org)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;gnome-do&lt;/li&gt;&lt;li&gt;eid card reader (see http://eid.belgium.be/nl/)&lt;/li&gt;&lt;li&gt;k3b&lt;/li&gt;&lt;li&gt;virtualbox (http://www.virtualbox.org/wiki/Linux_Downloads)&lt;/li&gt;&lt;li&gt;gvim&lt;br /&gt;&lt;/li&gt;&lt;li&gt;optional:network-manager-vpnc, xchat, bittorrent/deluge, gFTP&lt;/li&gt;&lt;li&gt;openssh-server (see http://www.cyberciti.biz/faq/ubuntu-linux-openssh-server-installation-and-configuration/)&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-8617830866331459993?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/8617830866331459993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/07/ubuntu-installation-on-recent-hardware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8617830866331459993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/8617830866331459993'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/07/ubuntu-installation-on-recent-hardware.html' title='Ubuntu installation on recent hardware'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8825462450241502945.post-6711272663632394630</id><published>2009-06-18T15:34:00.000+02:00</published><updated>2009-07-20T08:34:19.506+02:00</updated><title type='text'>daan</title><content type='html'>The catchy song Exes of Daan is stuck in my head. Got myself some time on youtube where I found this clip (in Dutch) where "De Rode Loper" (from Een, a Belgian TV Station) visits his house and recording studio.&lt;br /&gt;&lt;br /&gt;(http://www.youtube.com/watch?v=Cgp9GE7Sw3c)&lt;br /&gt;&lt;br /&gt;Daan Stuyven, keep bringing me joy in my life with your great songs, YOU RULE!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8825462450241502945-6711272663632394630?l=tdewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tdewolf.blogspot.com/feeds/6711272663632394630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tdewolf.blogspot.com/2009/06/daan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6711272663632394630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8825462450241502945/posts/default/6711272663632394630'/><link rel='alternate' type='text/html' href='http://tdewolf.blogspot.com/2009/06/daan.html' title='daan'/><author><name>lobo loco</name><uri>http://www.blogger.com/profile/11070006345988861766</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_pihsqM7wTS0/Slrj1Ii5axI/AAAAAAAAAE8/XI3rFgNIIKU/S220/think.jpg'/></author><thr:total>0</thr:total></entry></feed>
