Poojan (Wagh) Blog

Requests for comment

Archive for the ‘jabber’ tag

Laconica on DreamHost

with 4 comments

I got a laconica install going on DreamHost. I’ve been able to post from the web, but I’ve found that posting from email won’t work with DreamHost. The jury is still out on posting from Jabber, but I’m optimistic. I’ll update this post when I know more.

I was able to get notifications of new posts via email. I’m not sure if that’s useful. In my opinion, notifying from email is equivalent to a discussion group or mailing list.

Gimmesoda automatic script

I created a new domain and MySQL database/user using dreamhost panel.

Then, ran http://www.gimmesoda.com/2008/07/18/another-laconica-easy-install-script-update/ to install into ~/laconica.domain.tld

This actually worked! Except, its seems to be an older version of laconica. At minimum, it was useful for getting custom pear (right?).

Following Laconica README

Decided to download latest darcs copy. Moved the gimmesoda-install from ~/laconica.domain.tld to a laconica.domain.tld.bak directory and then downloaded the darcs copy using:

darcs get --partial http://laconi.ca/darcs/ laconica.domain.tld

Then, deleted database and re-created database called la_db (& MySQL user la_sqluser) using DreamHost control panel. Now, following README:

mysql -u la_sqluser -p -h mysql.domain.tld la_db < domain.tld/db/laconica.sql

Check to make sure:

[gorgon]$  mysql -u la_sqluser -p -h mysql.domain.tld la_db
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3326653
Server version: 5.0.67-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SHOW TABLES;
+----------------------+
| Tables_in_la_db      |
+----------------------+
| avatar               |
| confirm_address      |
| consumer             |
| fave                 |
| foreign_link         |
| foreign_service      |
| foreign_subscription |
| foreign_user         |
| invitation           |
| message              |
| nonce                |
| notice               |
| notice_source        |
| notice_tag           |
| oid_associations     |
| oid_nonces           |
| profile              |
| queue_item           |
| remember_me          |
| remote_profile       |
| reply                |
| sms_carrier          |
| subscription         |
| token                |
| user                 |
| user_openid          |
+----------------------+
26 rows in set (0.00 sec)

Skipped user access, since mysql user should already have access. Found one more thing to do:

cd domain.tld/classes
cp laconica.ini la_db.ini

The .ini file needs to be the same name as the MySQL database name.

The above gave me basic functionality. I then tackled the following:

Pretty URL

Changed the config[‘fancy’] option to true. I then copied htaccess.sample to .htaccess (within ~/laconica.domain.tld). I then edited .htaccess and changed the line:

RewriteBase /mublog/

to be

RewriteBase /

I have to do this because .htaccess sits in the same directory in which I installed laconica.

Email

I set up a new email address at laconica@laconica.domain.tld. I specified the following in the config.php file:

#Email info, used for all outbound email
$config['mail']['notifyfrom'] = 'laconica@laconica.domain.tld';
$config['mail']['domain'] = 'laconica.domain.tld';
# See http://pear.php.net/manual/en/package.mail.mail.factory.php for options
$config['mail']['backend'] = 'smtp';
$config['mail']['params'] = array(
                                                        'host' => 'mail.laconica.domain.tld',
                                                        'port' => 25,
                                                        'auth' => true,
                                                        'username' => 'laconica@laconica.domain.tld',
                                                        'password' => 'xxxxxxxxxxxxxxx'
                                                        );
#For incoming email, if enabled. Defaults to site server name.
#$config['mail']['domain'] = 'incoming.example.net';

Note that that last (commented) line is redundant. Unfortunately, posting by email won’t work. What needs to happen is a php script needs to get executed upon receipt of an email. This can’t happen, because DreamHost doesn’t support email addresses being tied to UNIX accounts. I’d like to disable the laconica “Post by email” feature altogether, but I’m not sure how.

Jabber/XMPP

One nice feature with DreamHost is that you can host your own Jabber accounts. I set up a custom-hosted Jabber account laconica@laconica.domain.tld for a post/notify bot. It hasn’t activated yet, so I have no confirmation on whether it works. Anyway, here are the changes to config.php:

# xmpp
$config[‘xmpp’][‘enabled’] = true;
$config[‘xmpp’][‘server’] = ‘laconica.domain.tld’;
#$config[‘xmpp’][‘host’] = NULL;        # Only set if different from server
$config[‘xmpp’][‘port’] = 5222;
$config[‘xmpp’][‘user’] = ‘laconica’;
$config[‘xmpp’][‘encryption’] = false;
$config[‘xmpp’][‘resource’] = ‘zzzzzzz’;
$config[‘xmpp’][‘password’] = ‘xxxxxxxxxxxxxxxxxxx’;
$config[‘xmpp’][‘public’][] = ‘laconica@laconica.domain.tld’;
#$config[‘xmpp’][‘debug’] = false;

Written by PoojanWagh

October 15th, 2008 at 7:38 am

Posted in Web

Tagged with , , , , ,

Setting up Pidgin for Google Talk behind an http proxy (web proxy / corporate firewall)

with 3 comments

I use Google Talk at work mainly to post to social networks (army.twit.tv, identi.ca, twitter.com, yammer.com). It is possible to receive notification using Google Talk (which is just a Jabber/XMPP instance), but I find that too intrusive to what little work I get done.

  1. Run pidgin (if not already) and select Accounts->Manage

  2. Select Add to add another account:

  3. Select XMPP for the protocol type:

  4. Fill out the form as follows with gmail/gtalk username & password; domain is gmail.com; Resource is (optionally) Work:

  5. Click advanced button. Select old (port 5223) SSL. Select 443 for port number. Server is talk.google.com. Fill out http proxy (for example, wwwgate0.example.com, port 1080) & http-proxy username & password (not likely the same as your gmail username/password):

This works because http proxies generally allow ports 80 (http) and port 443 (SSL/https) through. They generally disallow other ports. Luckily, google’s jabber server (talk.google.com) accepts connections on port 443–and they are SSL (encrypted) connections, so that’s good, too.

Written by PoojanWagh

October 13th, 2008 at 3:11 pm