tag:blogger.com,1999:blog-133758922024-03-05T19:14:30.987+00:00Matthew's Technology BlogMy blog... Jabber, Ubuntu, the internet... and me.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.comBlogger75125tag:blogger.com,1999:blog-13375892.post-1657436574919131062009-04-04T15:16:00.002+01:002009-04-04T21:49:52.399+01:00XMPP software documentationIn an attempt to dust off my neglected blog, I bring you the following post about something that has been nagging at me for the past couple of days.<br /><br />Since the <a href="https://stpeter.im/index.php/2009/04/02/yet-another-jabberorg-website/">recent</a> <a href="https://stpeter.im/index.php/2009/04/02/the-joys-of-running-code/">changes</a> at <a href="http://jabber.org/">jabber.org</a> I've been thinking a lot about Jabber from a new user's perspective.<br /><br />The new web-based <a href="http://register.jabber.org/">registration form</a> may help clear up a lot of confusion that resulted from in-band registration (many users were looking for somewhere on the website to register), but after registration what do they do next?<br /><br />They no longer need a client to register, and it is now quite likely that after registration they won't yet have one, so obviously most importanly we need to guide them to find a client.<br /><br />We <span style="font-style:italic;">could</span> simply direct them to the <a href="http://xmpp.org/software/clients.shtml">XMPP client list</a> on <a href="http://xmpp.org/">xmpp.org</a>, however that isn't particularly friendly for someone who might not even be familiar with the term "client".<br /><br />What we need is a shortlist of some user-friendly clients, with good documentation.<br /><br />And this set me thinking that perhaps there ought to be a concerted effort to document the basics of XMPP clients (in fact any and all XMPP software) in a unified way.<br /><br />For each client I would like to see a set of simple single-page tutorials, complete with screenshots, on issues such as:<br /><br /><ul><br /><li>How to register an account</li><br /><li>How to add an existing account</li><br /><li>How to add a contact</li><br /><li>How to join a MUC</li><br /><li>How to send/receive files</li><br /></ul><br /><br />Where the pages would be hosted (in one place, or on the respective client sites) as well as some other things still need thinking about, but I'd like to know what other people think about the basic idea before setting anything in stone. Thoughts?Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com4tag:blogger.com,1999:blog-13375892.post-41082987060464608252008-06-20T17:49:00.003+01:002008-06-20T18:06:51.354+01:00irssi notifications over Jabber (or IRC barking)Thanks to daubers (the brains behind the <a href="http://daubers.homelinux.net/?p=20">XMPP doorbell</a>) who suggested it, I now have <a href="http://irssi.org/">irssi</a> highlights sent directly to my Jabber client. Quite a handy thing since only yesterday I logged in to find several PMs awaiting me from 4 days ago.<br /><br />For the base I used an existing irssi script called <a href="http://www.leemhuis.info/files/fnotify/fnotify">fnotify</a>, which was designed to write notifications to a file. I found this script from <a href="http://pthree.org/2007/03/21/irssi-gui-notify/">Aaron Toponce's blog post</a>.<br /><br /><pre><br />mkdir -p ~/.irssi/scripts/autorun<br />cd ~/.irssi/scripts<br />wget http://www.leemhuis.info/files/fnotify/fnotify -O fnotify.pl<br />chmod +x fnotify.pl<br />ln -s ../fnotify.pl autorun/fnotify.pl<br />nano fnotify.pl<br /></pre><br /><br />Change line 56 (which reads something like open(FILE, ...)) to:<br /><br /><pre><br />open(FILE,"| sendxmpp -i me\@example.com");<br /></pre><br /><br />Replace the JID with your own, and make sure to put a \backslash before the @ sign as above.<br /><br /><pre>sudo apt-get install sendxmpp</pre><br /><br />When it is installed, tell sendxmpp what account to use for sending messages:<br /><br /><pre><br />echo me@example.com verysecret123 > ~/.sendxmpprc<br />chmod 0600 ~/.sendxmpprc<br /></pre><br /><br />Replace with your JID and password of course ;)<br /><br />Now, in irssi:<br /><pre><br />/win 1<br />/run fnotify.pl<br /></pre><br />(switching to window 1 is necessary to see any error messages if they appear)<br /><br />If it loads successfully, get someone to say your nick or send you a private message. It should appear in your Jabber client within a few seconds.<br /><br />A consequence of this for me is that IRC <a href="http://matthewstechnologyblog.blogspot.com/2008/06/im-barking.html">now barks too</a> :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-38660454873587055672008-06-16T16:07:00.004+01:002008-10-18T22:27:57.978+01:00IM BarkingOver the weekend my brother found an old toy of his... a "robotic" dog. It has two functions, walking and "barking" (where bark is more of a squeak). Unfortunately the controller for these said functions had been put beyond practical repair by leaked batteries. I cut the controller off and wondered what uses I could put the thing to. A solution looking for a problem.<br /><br />People often complain that I don't respond to their Jabber messages, often this is because I simply didn't notice it, or wasn't at my computer. I do have speakers, but I either have music playing, or when not, they are turned down to 0. Problem found.<br /><br />To replace the dog's original controller I used a <a href="http://www.velleman.be/ot/en/product/view/?id=351346">USB interface board</a>. It wasn't long before I knocked together a quick Lua script to use the board and make it bark on demand.<br /><br />With thanks to <a href="http://bilinski.it/">vArDo</a> (Mateusz BiliĆski, working to add a plugin system to Gajim for GSoC 2008) for the D-BUS <a href="http://gajim.pastebin.com/f2dc06612">notification handler script</a>, I managed to link up new message arrivals to the barking. The result? See for yourself:<br /><br /><center><embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" flashvars="fs=true" src="http://video.google.com/googleplayer.swf?docid=-2309718759239108478&hl=un" type="application/x-shockwave-flash"> </embed></center>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com6tag:blogger.com,1999:blog-13375892.post-83896545505278863712008-05-18T21:49:00.004+01:002008-05-18T22:03:58.801+01:00Open Discussion Day 2008<a href="http://opendiscussionday.org/">Open Discussion Day</a> (19th May) is very nearly upon us!<br /><br />However due to various reasons, we did not manage to get the new site online until very late. This means there is still plenty of work to do.<br /><br />If you have something to suggest, or want to offer a hand at short notice, join <a href="xmpp:opendiscussion@conference.jaim.at?join">opendiscussion@conference.jaim.at</a>, or <a href="irc://irc.freenode.net/#opendiscussion">#opendiscussion on Freenode</a>!<br /><br />We are keen to know what *<span style="font-weight:bold;">you</span>* are planning to do for open protocols this 19th May :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com1tag:blogger.com,1999:blog-13375892.post-44989341550641520162008-05-06T02:07:00.003+01:002008-05-06T02:28:06.509+01:00Jabber Abuse HandlingNo blog post since... when? Never mind :)<br /><br />Something that interests me became a hot topic in the Jabber community (specifically server administrators). We had a meeting at fairly short notice about possible solutions to the problems we know are around the corner.<br /><br />The following are some *quick* rough notes I made (too early in the morning) of an abuse reporting method, very much along the lines of <a href="http://www.xmpp.org/extensions/xep-0161.html">XEP-0161: SPIM Reporting</a> and <a href="http://www.xmpp.org/extensions/xep-0236.html">XEP-0236: Abuse Reporting</a>. What I have in mind is something of a mixture between the two. Not all abuse is SPIM, so XEP-0161 should probably be a little more generic (as XEP-0236 is).<br /><br />I haven't thought much about the below, but I believe the general concept is not that far from usable, and doesn't disrupt too much the distributed nature of XMPP.<br /><br /><span style="font-weight:bold;"><br />End-user</span><br />It is nearly always going to be the end user who originates abuse reports. Whether they received spam to their JID, or experienced flooding in a MUC room they administrate.<br /><br />The abuse report should be sent to the abuser's home server.<br /><br /><span style="font-weight:bold;">Abuser's server</span><br />Upon receiving an abuse report, the server may choose to act immediately, or wait and gather more evidence (possibly from sources it deems more reliable).<br /><br />It is important that the server relates reports it receives to IP addresses when weighing the evidence, *not* JIDs, since obviously the same user may have created multiple accounts).<br /><br />Upon receiving satisfactory evidence that a certain IP is abusing the service, the server may decide what action(s) to take.<br /><br />Clearly the most obvious step is to ban the IP from the server, and lock associated (reported[1]) accounts.<br /><br />The other (optional) step is to report the IP of the offender to a central reporting/blacklist service (ie. abuse.xmpp.net), to help aid other servers who wish to prevent similar abuse of their own service.<br /><br />[1] Only reported accounts should be locked, since legitimate users behind the same NAT router as an abuser could otherwise be (overly) punished. Unfortunately there is no way to avoid that legitimate users are sometimes going to get caught up in the net.<br /><br />Clearly blocking an IP is not the ideal solution. A new IP is not usually hard to come by. Each reported IP should be investigated, and network administrators notified of the abuse to reduce the chance that it will happen again. <br /><br />Dates and times are very important. In the case of dynamic IPs, it is the only way to track down the offending user. Perhaps it would be useful to report more than one IP + time and date (ie. the last X IPs that used the account), for this purpose.<br /><br /><br />Apologies for the unpolished post. Time to sleep on this :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-28003690457227318352007-09-21T01:18:00.000+01:002007-09-21T02:00:04.620+01:00GNOME 2.20 released...and it looks like I will be sticking with GNOME for another 6 months after all!<br /><br />Even the most annoying thing about Epiphany seems to be fixed - the address bar. Also I no longer have to sync my Tomboy notes with an automated SVN commit. I'm close to forgiving it for being written in C#...<br /><br /><a href="http://www.gnome.org/start/2.20/notes/en/">Do read!</a>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com4tag:blogger.com,1999:blog-13375892.post-23223564308981821942007-09-08T00:48:00.000+01:002007-09-08T02:27:41.439+01:00Summer of Code final updateAs of 20th August Google's Summer of Code program has officially ended. Students must upload code produced up until the deadline to Google's <a href="http://code.google.com/p/google-summer-of-code-2007-xmpp/downloads/list">hosting</a>, and are only judged on work up to that date.<br /><br />Continuation of GSoC projects is encouraged however, and I shall be finishing off HTTPS (and have already committed bug fixes) and tidying parts of my code over the next few weeks.<br /><br />There has been plenty of interest in my summer's work, on the gloox mailing list, and in private emails/IMs to me personally. It is great to know that people are finding my work useful to them.<br /><br />I would like to thank <a href="http://camaya.net/">Jakob</a> my mentor for endless help with figuring things out when they went wrong, and for guiding me around the innards of gloox when I got lost (not to mention for his excellent library existing in the first place!). Thanks to <a href="http://stpeter.im">Peter</a> for taking on the hard task of orchestrating the <a href="http://code.google.com/soc/2007/xmpp/about.html">XSF's</a> involvement in GSoC, and for supporting the students throughout. Finally thanks to <a href="http://code.google.com/soc/">Google</a> and the team behind the administration of GSoC, for, well, you know what :)<br /><br />I will update this post with the URL to my uploaded tarball once it is on Google's servers.<br /><br />However the latest, greatest code will always be found in <a href="http://subversion.tigris.org/">SVN</a>. Currently BOSH is at <span style="font-style:italic;">svn://svn.camaya.net/gloox/branches/work/mw/bosh</span> but very soon will be moved to the trunk. More information on <a href="http://camaya.net/glooxdownload">gloox's download page</a>.<br /><br />The server-side implementations that I know work with this code are Openfire 3.3.2 (or .3), and Araneo (a standalone CM (connection manager), which allows any BOSH client to connect to any standard Jabber/XMPP server, using the CM as a kind of proxy) from ff.bluendo.com (site down at the moment I write this).<br /><br />PS. Apologies for the delay in this post... blame my vacation :)<br /><br /><span style="font-weight:bold;">Update: </span> Official tarball uploaded <a href="http://google-summer-of-code-2007-xmpp.googlecode.com/files/MatthewJames_Wild.tar.gz">here</a>. Please use the version from SVN (see above) though if you would like to test or use my code.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com5tag:blogger.com,1999:blog-13375892.post-45513069247854802592007-08-09T21:15:00.000+01:002007-08-10T01:36:13.744+01:00Summer of Code UpdateThis week has been a good one for my project, despite my being ill for a few days of it. Firstly, I completed my initial implementation of multiple connections! I say 'initial' because it is currently only tested and working with one server (OpenFire), and I will be testing more, and likely fixing bugs, in the next few days.<br /><br />I also received a lot of help from people following my <a href="http://matthewstechnologyblog.blogspot.com/2007/07/summer-of-code-progress.html">previous blog post</a>...<br /><br />My problems with PunJab are fixed with minor code changes (although it still doesn't work correctly for other reasons at the moment). <br /><br /><a href="http://badlop.blogspot.com/search/label/jabber">badlop</a> let me test against his ejabberd SVN server, and I discovered that it doesn't seem to support persistent HTTP connections, let alone pipelining. Now I have non-persistent connections implemented, I shall be testing ejabberd again.<br /><br />OpenFire... well, it works (without the previous problems I had with a <a href="http://matthewstechnologyblog.blogspot.com/2007/07/summer-of-code-update.html">30 second delay</a>) with multiple connections, and works well too :)<br />The only downside is still the lack of XEP-0206 support, so my code won't work with SASL auth to OpenFire.<br /><br />Which brings me to the news of <a href="http://blog.bluendo.com/ff/new-bosh-connector-for-xmpp">a new CM</a>, which I have high hopes for. If I can get my code working as well with this CM as it currently works with OpenFire, all servers can be connected to this way, and SASL login will work as well.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com0tag:blogger.com,1999:blog-13375892.post-14843330791936422632007-07-25T02:35:00.000+01:002007-07-30T04:52:47.106+01:00A sign of Jabber's increasing popularity?Some of you reading this are regulars in the Jabber MUC at jabber@conference.jabber.org. This MUC is referenced on www.jabber.org, and is the default room to join in many clients. <br /><br />Unfortunately the past weeks have included events that I can only say are reminiscent of IRC...<br /><ul><br /><li>Flooding</li><br /><li>Abusive language</li><br /><li>Spamming/advertising ("hey, check out this cool site! http://..." and leaving again)</li><br /></ul><br />Inevitably as Jabber gains good users it will also gain bad ones. While their activity in private chats is of little concern to us, I believe we need to lay down some guidelines for acceptable behaviour in the public conference.<br /><br />Currently there are a handful of moderators keeping the MUC friendly. However it becomes hard to draw the line between what is acceptable and what is not. This is a matter of opinion that varies between most people.<br /><br />My hope is that with some guidelines it will be easier for both the moderator and the user (who can then be directed to them if necessary).<br /><br />The need for these moves is somewhat disappointing, but necessary it seems, if we are to keep the friendly atmosphere that we currently have in this little corner of the Jabber community :) and to continue providing useful help to Jabber newcomers.<br /><br /><span style="font-weight:bold;">Swearing</span><br />I propose the same policy as the official Ubuntu support channels, which works well. Mild swearing is ok, as long as it is not excessive, or directed at a person. Anything else may result in a warning and/or kick at the moderator's discretion.<br /><br /><span style="font-weight:bold;">No deliberate flooding</span><br />Though I am not aware of it happening in the Jabber MUC, it has happened in another MUC I am in. A user joined 2 bots into the room, and set them into a loop with each other, and left. Obviously this is deliberate, and I had to ban all 3 JIDs involved (but not until several hundred messages had already been sent to the room).<br /><br />In IRC it is frequent to get shouted at for pasting more than a couple of lines. In Jabber people seem to be more lenient, and I don't see why this should change. Obviously a warning should be given when needed.<br /><br /><span style="font-weight:bold;">English only</span><br />It may seem unfair to prevent people from speaking in their native language. However most languages have their own servers and their own conferences. I don't propose this rule to affect those casual users who come in search of help, yet speak no or little English. Those users are usually directed in a friendly way to a room and server of their native language, where they will hopefully receive better help.<br /><br />However some users hold long conversations which could easily be taken into private messages, or to other rooms. These conversations are nearly always unrelated to Jabber, and only annoy the other occupants of the room. It also makes it impossible for moderators to moderate when the conversation is in a language they don't know (I have previously been asked to kick people who were being insulting toward other users, although I had no idea because they were not speaking in English).<br /><br/><br /><br/><br />Obviously these choices are not up to me alone to make, and so I welcome comments and opinions on what I suggest here.<br /><br/><br /><b>Update:</b> <a href="https://stpeter.im/?p=1997">It seems</a> this post <a href="http://www.jabber.org/muc-logs/jabber@conference.jabber.org/2007-07-27.html#14:19:06">caused</a> something of a <a href="http://www.jabber.org/muc-logs/jdev@conference.jabber.org/2007-07-27.html#14:21:47">discussion</a>... :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com0tag:blogger.com,1999:blog-13375892.post-1762709507528681852007-07-25T02:32:00.000+01:002007-07-25T03:21:02.024+01:00Summer of Code ProgressIn the past 2 weeks, I have tried every server-side BOSH implementation I can find (although more are always finding me!), and all have their individual problems with my client...<br /><br /><a href="http://www.igniterealtime.org/projects/openfire/index.jsp"><span style="font-weight:bold;">Openfire</span></a><br />No support for XEP-0206, and hence no SASL login is possible. I also have the reproducible (yet still mysterious) problem I <a href="http://matthewstechnologyblog.blogspot.com/2007/07/summer-of-code-update.html">blogged about in my last post</a>. I also have had problems with Openfire's overactivity detection. The XEP specifies that the client is always allowed to make a request if it is to send data. The old version of the XEP which Openfire implemented was not clear on this, and as far as I can tell I get disconnected when I should not be.<br /><br /><a href="http://ejabberd.jabber.ru/"><span style="font-weight:bold;">ejabberd</span></a><br />Well, it seems to work. Yet ejabberd does not support XEP-0206 either, and also refuses non-SASL logins. This makes it impossible to use with my code for now.<br /><br /><a href="http://zeank.in-berlin.de/jhb/"><span style="font-weight:bold;">JabberHTTPBind (JHB)</span></a><br />A handy little servlet which implements XEP-0124 and a little bit of XEP-0206. Yet I have problems with this also, as it seems to take <b>wait</b> seconds before the session creation response is received. After that I get a reply, which triggers a reply from gloox, to which the server replies instantly (yes, it appears to be polling for some reason). This happens until I begin getting errors from Tomcat (I believe JHB disconnects the client for requesting too frequently). I suspect a bug in the logic for polling, which I will take a look at after implementing multiple connections.<br /><br /><a href="http://www.butterfat.net/wiki/Projects/PunJab"><span style="font-weight:bold;">Punjab</span></a><br />The problem with Punjab seems quite simple, yet I have been unable to solve it. All my testing so far is being done locally, and Punjab seems to try to resolve 'localhost' on the external DNS. I don't know Python well, so this is the best I can understand of the problem. I intend to speak with the Punjab developer(s) this week.<br /><br/><br />All of the above are problems I am having, I would not be surprised to learn that many of them are a problem within my code. Unfortunately not having a working server implementation makes it very hard to know where the source of any particular problem lies. If anyone has suggestions about issues I have listed above, please do contact me :)<br /><br />Today I managed to talk with Ian Paterson (author of the XEPs), who will kindly allow me to test against his server. Also I spoke with the anonymous commenter on my last post who has been very helpful, and offered me their Python implementation to play with as well. I learnt this week that Tigase has BOSH support in-development. With luck I will be able to test against Tigase in the coming weeks.<br /><br />This week I also began the biggest change in the code for a while - enabling multiple connections to be made to the connection manager. This will help the client to work through proxies which don't support/allow HTTP 1.1 and/or pipelining.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-58657720934356985522007-07-25T01:00:00.000+01:002007-07-25T16:01:45.937+01:00Links round-up<span style="font-style:italic;">The oldest post in my post cache that may be applicable...</span><br /><br />I don't have time to blog about things in general for now, so I'll present you with a list of links I've gathered on my travels through the web...<br /><br />Make mailto: links open Gmail (Ubuntu):<br /><a href="http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/">www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/</a><br /><br />TortoiseSVN-like script for Nautilus (GNOME):<br /><a href="http://jasonfield.com/freebies/">jasonfield.com/freebies/</a><br /><br />A helpful article from Microsoft:<br /><a href="http://support.microsoft.com/kb/247804">support.microsoft.com/kb/247804</a><br /><br />A small computer running Xubuntu now on sale (did I already blog about this?):<br /><a href="http://www.linutop.com/">www.linutop.com/</a><br /><br />Flip, a novel programming language:<br /><a href="http://www.daimi.au.dk/~eriksoe/Flip/">www.daimi.au.dk/~eriksoe/Flip/</a><br /><br />Why Linux drives don't need defragmenting:<br /><a href="http://geekblog.oneandoneis2.org/index.php/2006/08/17/why_doesn_t_linux_need_defragmenting">geekblog.oneandoneis2.org/index.php/2006/08/17/why_doesn_t_linux_need_defragmenting</a><br /><br />Free web hosting:<br /><a href="http://www.110mb.com/">www.110mb.com/</a><br /><br />Free file hosting:<br /><a href="http://hostfile.org/">hostfile.org/</a><br /><br />My Starred Slashdot articles:<br /><br />Ubuntu Market Share:<br /><a href="http://linux.slashdot.org/article.pl?sid=07/07/11/1452257">linux.slashdot.org/article.pl?sid=07/07/11/1452257</a><br /><br />GPLv3 & Microsoft:<br /><a href="http://linux.slashdot.org/article.pl?sid=07/07/06/1333257">linux.slashdot.org/article.pl?sid=07/07/06/1333257</a><br /><a href="http://slashdot.org/article.pl?sid=07/07/10/0030227">slashdot.org/article.pl?sid=07/07/10/0030227</a><br /><br />Written articles vs blog posts:<br /><a href="http://slashdot.org/article.pl?sid=07/07/09/2111255">slashdot.org/article.pl?sid=07/07/09/2111255</a><br /><br />Using the mouse in UIs:<br /><a href="http://hardware.slashdot.org/article.pl?sid=07/07/09/1232230">hardware.slashdot.org/article.pl?sid=07/07/09/1232230</a><br /><br />Spammers vs CAPTCHAs:<br /><a href="http://it.slashdot.org/article.pl?sid=07/07/09/0110203">it.slashdot.org/article.pl?sid=07/07/09/0110203</a><br /><br />OpenMoko phone on sale:<br /><a href="http://developers.slashdot.org/article.pl?sid=07/07/09/0049249">developers.slashdot.org/article.pl?sid=07/07/09/0049249</a><br /><br />The world's first programmable robot?<br /><a href="http://hardware.slashdot.org/article.pl?sid=07/07/07/1924248">hardware.slashdot.org/article.pl?sid=07/07/07/1924248</a><br /><br />I think so, this time:<br /><a href="http://linux.slashdot.org/article.pl?sid=07/07/06/2119243">linux.slashdot.org/article.pl?sid=07/07/06/2119243</a><br /><br />History of the CD:<br /><a href="http://slashdot.org/article.pl?sid=07/07/04/2230245">slashdot.org/article.pl?sid=07/07/04/2230245</a>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-76180814792648019952007-07-11T17:36:00.000+01:002007-07-11T18:59:17.404+01:00Summer of Code UpdateTime for an update on my progress with my project, now we are halfway through GSoC...<br /><br />Disconnection (either by error, or as requested by the gloox client) gracefully from the server is working now. I have also made some small improvements in other areas where necessary, too many and too small to list here.<br /><br />A big problem I am having is that there are regular delays in my test setup. I have a test client for gloox that replies to messages it receives. I have tried both tkabber and Psi as the second client, with the same results.<br /><br />I checked that my BOSH code is doing everything correctly and it seems the answer is (insert disclaimer here) yes.<br /><br />Here is the link to a network capture log: <a href="http://hostfile.org/ooo">Wireshark capture file</a><br /><br />The file is so named because the test message I sent was the text "ooo". (No, I don't know why...)<br /><br />Below is my translation to English of the necessary parts of the log, showing a message going from Psi to gloox (via the server) and the reply going back again:<br /><blockquote><br />A: GUI client (Psi 0.10, port 32921->5222)<br />B: BOSH client (gloox svn, port 45069->5280)<br />S: Jabber server (Openfire 3.3.2, port 5222)<br />CM: BOSH connection manager (Openfire 3.3.2, 5280)<br /><br /><span style="font-weight:bold;"># GUI client sends message to server</span><br />0 sec: A->S (frame 37 in the capture)<br />0.000030: TCP ACK for the above<br /><br /><span style="font-weight:bold;"># Server sends message to gloox via BOSH</span><br />0.001999: CM->B<br /><br /><span style="font-weight:bold;"># Gloox sends composing event</span><br />0.003065: (Composing event) B->CM<br />0.003090: TCP ACK for the above<br /><br /><span style="font-weight:bold;"># Gloox immediately after this sends reply message</span><br />0.003358: B->CM<br />0.003370: TCP ACK for the above<br /><br /><span style="font-weight:bold;"># Server sends composing event to GUI client</span><br />0.004707: (Composing event) S->A<br />0.004725: TCP ACK for the above<br /><br /><span style="font-weight:bold;"># Server replies with empty response to gloox,due to 30s inactivity (as per spec)</span><br />30.007330: (Empty response) CM->B<br /><span style="font-weight:bold;"><br /># Server sends message to GUI client</span><br />30.012078: S->A<br /><br /><span style="font-weight:bold;"># All the acks for the last packets</span><br />30.012078: TCP ACK for last TCP ACK (RTT to ACK was 30.007 seconds) (??????!)<br />30.012106: TCP ACK for S->A<br />30.046637: TCP ACK for (Empty response) CM->B<br /></blockquote><br />If anyone could explain why the server appears to hold a message for 30 seconds, please let me know!<br /><br />The story with <a href="http://ejabberd.jabber.ru/">ejabberd</a> (which I finally managed to <a href="http://ejabberd.jabber.ru/ejabberd_http_bind">patch</a>, <a href="http://ejabberd.jabber.ru/tuto-install-ejabberd">compile and build</a>) isn't good either. Because the new version of the BOSH XEP does not define how to restart a stream, <a href="http://xmpp.org/extensions/xep-0206.html">XEP-0206</a> support is needed, which now defines this function. Unfortunately no server supports this yet, so I disabled SASL until I find a way around this. Unfortunately ejabberd forces clients that advertise XMPP 1.0 to use SASL (which gloox does) so it denies login attempts.<br /><br />Detecting which version of the BOSH protocol is supported by the server, and using the old method when necessary would work in this case, but not in Openfire's (it reports version 1.6 already).<br /><br />There are a few server-independent connection managers around, and I will test with those. My intention is to find one that I am able to bring up to date with the current specifications.<br /><br />This is my focus at the moment, but very soon I will begin implementing multiple connections (a big step) for when pipelining can not be used.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-39379367846279815442007-06-28T15:17:00.000+01:002007-07-03T18:16:27.934+01:00Summer of Code UpdateThis post is somewhat delayed, for a variety of reasons, and from today I'll hopefully be posting more regularly again.<br /><br />Despite the lack of posts, I have still been working, and I have made some progress too.<br /><br />Code for pipelining (a single connection) to the BOSH connection manager is roughly in place. My first message was sent through BOSH last week!<br /><br />I do have a couple of problems, both of which I believe are down to Openfire's lack of full BOSH support.<br /><br />SASL authentication will not work, because Openfire does not support the xmpp:restart attribute defined in XEP-0206. I have temporarily overcome this by disabling SASL authentication attempts in the simple client I am testing with. I will see how I can make the code backwards-compatible with the old HTTP binding in this respect<b>*</b>.<br /><br />The second problem is that Openfire disconnects the client if it sends requests too frequently.<br /><br />As I understand XEP-0124 however, if no requests are outstanding (and hence no way for the server to push data to the client) the server should allow a request within any amount of time. Although the latest version of the XEP is more clear about this, version 1.5 (on which Openfire's support is based) does not explicitly state it. As a result Openfire is being more restrictive than it should be. I intend to file a bug report for this.<br /><br />My last problem was a bug I encountered in gloox (resulting in message replies not always getting sent), and it affected the test client I have that is using my BOSH class. It happens that the bug was already fixed, and simply merging with the latest gloox trunk fixed it.<br /><br />My current and next tasks are to fix an intermittent segmentation fault, and an out-of-range exception (which I believe to be both related), and improve the handling of disconnecting from the server.<br /><br /><b>*</b> <span style="text-size:smaller;">This is not helped by Openfire currently reporting the wrong protocol version...</span>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com0tag:blogger.com,1999:blog-13375892.post-89696784247039411802007-06-09T14:59:00.000+01:002007-08-13T00:34:03.172+01:00How to recover an Ubuntu/Linux PCPeople often claim that Linux is more stable than Windows. Without hard statistics, this can't really be proven. One thing I do know however, is that when things go wrong it is much easier to recover a Linux PC than a Windows one, <b>without restarting</b>. In this post I will explain what to do, in easy steps, to get your Linux back running as safely as possible.<br /><br /><font style="font-weight: bold;">1. Kill a single graphical application</font><br />If you know the problem is a single application that you have open that maybe just froze then it is simple to fix. Press <span style="font-weight: bold;">Alt+F2</span> and type '<font style="color: rgb(255, 0, 0);">xkill</font>' (without the quotes) then press enter. This runs the xkill program, and the next application that you click on will be forced to close. If you change your mind, press the right mouse button to exit from this mode.<br /><br />It may be worth setting a keypress that will automatically start xkill when you need it. In Ubuntu/GNOME, go to System->Preferences->Keyboard Shortcuts<br /><br /><font style="font-weight: bold;">2. Restart the graphical interface</font><br />If you are still having problems, or the whole of the graphical interface is not responding, press <span style="font-weight: bold;">Ctrl+Alt+Backspace</span>. This will attempt to stop the graphical display, and then restart it. Any applications you had open will be killed.<br /><br /><font style="font-weight: bold;">3. Switch to a console to end the application</font><br />If this didn't work, or you know a certain program is causing the problem, you can kill that program without using the graphical interface. Press <span style="font-weight: bold;">Ctrl+Alt+F1</span>. If your PC is running, but slowly, this may take a minute. Eventually you should end up at a text login screen. Log in with your usual username and password, and wait for the prompt to appear.<br /><br />If you know the name of the program causing the problems, type: <span style="color: rgb(255, 0, 0);">killall <program name></span>. If it continues, you can try to force it to stop, with: <span style="color: rgb(255, 0, 0);">killall -KILL <program name></span>. For system process you may get "Permission Denied" errors. Prefix the above commands with "<span style="color: rgb(255, 0, 0);">sudo </span>", ie. <span style="color: rgb(255, 0, 0);">sudo killall</span>...<br /><br />If you are not sure which program is making the PC unresponsive, use the '<span style="color: rgb(255, 0, 0);">top</span>' command. It shows a list of running programs, and their name, and in the CPU column it shows how much of the computer's processor they are using up. Once you identify the application press '<span style="font-weight: bold;">q</span>' to exit top, and use the commands above to kill the program.<br /><br />If all is now working, <span style="font-weight: bold;">Ctrl+Alt+F7</span> will switch back to the graphical interface.<br /><br /><font style="font-weight: bold;">4. Emergency reboot procedure</font><br />If the steps above all failed, there is one last way to reboot your computer, and it is much safer than pressing the reset button on your PC's case, or pulling out the power cable.<br /><br />It is important that you type these key combinations in the correct order, allowing the PC some time to complete the command between each one. The SysRq key on your keyboard is often also labelled as "Print" or "Print Screen".<br /><br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+R</font><br /> Switches the keyboard mode.<br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+S</font><br /> Writes all data to the disks, necessary to avoid data corruption, unsaved files will still be lost.<br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+E</font><br /> Tries to end processes in a nice way. Allow a little bit of time before you use the next command.<br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+I</font><br /> Tries to forcefully kill processes that have not closed.<br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+U</font><br /> Temporarily makes the hard disks read-only, this makes it safe to reboot.<br /><font style="font-weight: bold;">Ctrl+Alt+SysRq+B</font><br /> Force reboot.<br /><br /><span style="font-weight: bold;">5. Surrender</span><br />If that didn't reboot your PC, press the reset switch, or pull the plug, and cross your fingers :)<br /><br /><br />If you have any other methods, tips, or feedback to share, post a comment and let me know!Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-79716951353362837402007-06-08T00:27:00.000+01:002007-06-08T00:28:21.339+01:00Vote!I just found this site, <a href="http://www.webware.com/html/ww/100/2007/communications.html">The Webware 100</a> in which Jabber appears next to many other networks and IM-related websites.<br /><br />Do a good deed, and if you haven't already, vote for Jabber! :D<br /><br />(That is, if you think it deserves the vote of course. If you don't, let me know and I'll correct you...)<br /><br /><span style="font-weight:bold;">Update:</span> Whoops, I linked to the wrong category!Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com3tag:blogger.com,1999:blog-13375892.post-16266199966606871192007-06-05T23:40:00.000+01:002007-06-07T17:34:15.298+01:00Summer of Code - Week 1 summaryAs promised I shall give some update on my progress with the project so far.<br /><br />We held the second weekly meeting, though with <a href="http://www.kismith.co.uk/">Kev</a> temporarily in <a href="http://stpeter.im">stpeter</a>'s seat - <a href="http://www.jabber.org/muc-logs/jdev@conference.jabber.org//2007-06-05.html#12:00:03">logs here</a>.<br /><br />I finally have a clear picture of what I am doing and where I am going. <br /><br />As I said in the meeting, my project is not something I can make <a href="http://ayena.de/index.php?q=node/33">fancy screencasts</a> from. On the other hand, I think I will try and produce some diagrams that show what <a href="http://www.xmpp.org/extensions/xep-0124.html">BOSH</a> is, and how it works. I realise that this is not clear to many people who might be reading this yet :)<br /><br /><span style="font-weight:bold;">Coding</span><br />Down to the important part. Today I finished my first steps and managed to get my initial code to compile (through the <a href="#">gloox makefile</a>). I haven't finished the simple test client I will be using, so I can't actually test it yet. If I could however, it would <a href="http://en.wikipedia.org/wiki/Hang">hang</a> immediately after connection... but it's surely a start! :)<br /><br />Once I get some real code I think I will start producing <a href="http://en.wikipedia.org/wiki/Tarball">tarballs</a> of my progress. I am currently working in a local <a href="http://subversion.tigris.org/">SVN</a> repository, so it is not hard for me to do.<br /><br />Back to work...Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com1tag:blogger.com,1999:blog-13375892.post-74407607087187318682007-05-31T15:29:00.000+01:002007-05-31T17:26:58.508+01:00First week of Summer of CodeThe coding period of <a href="http://code.google.com/soc/">Google Summer of Code</a> has <a href="http://code.google.com/support/bin/answer.py?answer=60325&topic=10729">officially started</a> (since the 28<span class="blsp-spelling-error" id="SPELLING_ERROR_0">th</span> of May). <a href="http://saint-andre.com/blog/2007-05.html#2007-05-29T11:59">A meeting</a> was held on Tuesday for students and mentors working on Jabber projects.<br /><br /><h2>So far...</h2><br /><h3>The laptop</h3><br />I have set up my <a href="http://matthewstechnologyblog.blogspot.com/2007/05/new-laptop.html">new laptop</a> for development, including development tools (<a href="http://subversion.tigris.org/">subversion</a>, <a href="http://www.scintilla.org/SciTE.html"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">SciTE</span></a>), and server that I will be using to test my code against.<br /><br /><h3>The server</h3><br />I have chosen <a href="http://www.igniterealtime.org/projects/openfire/index.jsp"><span class="blsp-spelling-error" id="SPELLING_ERROR_2">Openfire</span> </a>to be my reference server initially, although obviously I will be testing to ensure compatibility with all servers later on (just in case...). <span class="blsp-spelling-error" id="SPELLING_ERROR_3">Openfire</span> is easy to install and use, and includes <a href="http://www.xmpp.org/extensions/xep-0124.html"><span class="blsp-spelling-error" id="SPELLING_ERROR_4">XEP</span>-0124</a> support by default.<br /><br /><h3>Other implementations</h3><br />I am interested in finding other clients or their developers that have <a href="http://www.xmpp.org/extensions/xep-0124.html"><span class="blsp-spelling-error" id="SPELLING_ERROR_5">XEP</span>-0124</a> implemented already. It would help me make the final decisions this week about the way I will be implementing it. If you know something about it, or know someone who does, please <a href="xmpp:mwild1@jaim.at">contact me</a>!<br /><br /><h3>The code and protocol</h3><br /><a href="http://gloox.org/"><span class="blsp-spelling-error" id="SPELLING_ERROR_6">Gloox</span></a> thankfully already has a nice framework for adding new network-level connection methods. It is this way that HTTP proxy and <a href="http://en.wikipedia.org/wiki/SOCKS">SOCKS5</a> support has already been added. Thanks to <a href="http://camaya.net/">Jakob</a>'s foresight it is also possible to chain multiple classes so that BOSH will be able to work though a SOCKS5 proxy, for example.<br /><br />I need to create a class descended from <a href="http://svn.camaya.net/chora/browse.php?Horde=ef54bbe9bb510c82030a60b9cf934044&f=trunk%2Fsrc%2Fconnectionbase.h"><span class="blsp-spelling-error" id="SPELLING_ERROR_7">ConnectionBase</span></a> and write implementations of the pure functions from it. I will also have to descend from <a href="http://svn.camaya.net/chora/browse.php?Horde=ef54bbe9bb510c82030a60b9cf934044&f=trunk%2Fsrc%2Fconnectiondatahandler.h"><span class="blsp-spelling-error" id="SPELLING_ERROR_8">ConnectionDataHandler</span></a> to parse the replies from the BOSH connection manager, before <span class="blsp-spelling-error" id="SPELLING_ERROR_9">gloox</span> is able to parse and handle the XML.<br /><br />The main difficulty I have right now is deciding which BOSH parameters should be fixed in the implementation, and which should be configurable. I am also looking to see if I can make the connection degrade gracefully from <a href="http://en.wikipedia.org/wiki/HTTP_pipelining">HTTP <span class="blsp-spelling-error" id="SPELLING_ERROR_10">pipelining</span></a> to multiple connections, to polling, depending upon what is supported/available in the current environment.<br /><br />Identifying possible client environments is also one of my tasks. This way I won't end up, for example, only supporting cases where the connection manager is at the same address as the <span class="blsp-spelling-error" id="SPELLING_ERROR_11">XMPP</span> server (which in the setup I will be testing with, it is).<br /><br /><h2>From now on</h2><br />I will be posting weekly updates to this <a href="http://matthewstechnologyblog.blogspot.com/">blog</a>, and I have decided I will aim for every Tuesday, before or after the <a href="http://saint-andre.com/blog/2007-05.html#2007-05-29T11:59">weekly meeting</a>. <a href="http://matthewstechnologyblog.blogspot.com/feeds/posts/default/-/GSoc">Watch this space</a>!<br /><br /><span style="font-weight: bold;">PS. </span>In the past couple of weeks I have seen BOSH spelt as <span class="blsp-spelling-error" id="SPELLING_ERROR_12">BISH</span>, NOSH and BOX. Stop it! :DMatthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com0tag:blogger.com,1999:blog-13375892.post-64413774887742519912007-05-22T18:14:00.000+01:002007-05-22T18:17:14.516+01:00The Linux shell, a new user's friend?<a href="http://obsidianlake.blogspot.com/2007/05/computer-shells.html">Paul made another post</a> yesterday, about the merits of the <a href="http://images.google.co.uk/images?q=Linux+console&imgsz=small%7Cmedium%7Clarge%7Cxlarge">Linux text shell</a>, and whether it was an ideal interface for new Linux users to have to learn.<br /><blockquote>So, they say that Linux forces users to learn how to use the shell and that, basically, Linux can't do anything without it.<br /></blockquote>It is a common argument made by Windows advocates, that it is impossible to use Linux without using the shell. I am glad to say, this is just not true.<br /><br />Everyone knows that Linux grew from a shell-only interface, X and GUI applications came (much) later. Over the years Linux gained an image of being the hacker's operating system. It is far easier to <a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html#what_is">hack (<span style="font-weight: bold;">NOT</span> 'crack')</a> than Windows is.<br /><br />Linux is growing beyond that now. Distributions (yes, I am saying it again) such as Ubuntu are <a href="https://blueprints.launchpad.net/ubuntu/+spec/bullet-proof-x">doing their best</a> to keep the shell to only those people that want it, and not require the people who don't to use it. In reality it is perfectly possible to use an Ubuntu system without knowing anything about the shell. There are graphical applications for practically any task you need to perform. I believe a little more could be done (ie. a GUI way to run programs as root), but still we are practically there already. One problem is that Linux tutorials nearly always show only shell way of doing things. This is at least better than Windows where a long how-to like <a href="http://support.microsoft.com/kb/154036">this</a> ("Click this tab, tick that box, click ok, oh, and again, and again...") could usually be done in a single command that could be copied and pasted.<br /><blockquote>Are shells good or not?</blockquote>Yes, yes they are. There is no doubting the power of the shell. It is pretty easy to get started, you don't have to be a computer expert either. Knowing how to use the shell can help you take advantage of certain features in Linux that make it better than other operating systems - the possibility to bring it back to life from practically any crashed state, without data loss, and nearly always without rebooting. (Perhaps a simple how-to on this topic is in order... :) )Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com3tag:blogger.com,1999:blog-13375892.post-37521379337143397872007-05-22T01:21:00.000+01:002007-05-22T01:26:58.574+01:00ObsidianLake: Another quarrel with my good friend...In <a href="http://obsidianlake.blogspot.com/2007/05/another-quarrel-with-my-good-friend.html">Paul's recent post</a> about whether Linux is ready for the desktop, he debates whether there is a demand for Linux, and asks:<br /><blockquote>"Should or will Linux become a commercial product?"</blockquote><br />I think we should look at how Linux started out, where it is now, and where it is heading.<br /><br />For a start, the <a href="http://www.kernel.org/">Linux</a> kernel was started with entirely different goals to the components that make up the rest of a <a href="http://www.gnu.org/gnu/linux-and-gnu.html">GNU/Linux</a> system. Linux was not begun with intention of being free (as in freedom). It was a personal project of Linus. For GNU on the other hand, the philosophy came first. Ten years ago there was little commercial worth in either of these ventures, only once they were combined into a usable system would things start to gain interest and momentum.<br /><br />GNU/Linux in the present day is doing quite well. It has taken a long time, but it <span style="font-weight: bold; font-style: italic;">is</span> now ready for the desktop. GNU/Linux is earning recognition from both hardware and software makers, and the number of users is snowballing. I have to say this is in no small way helped by <a href="http://ubuntu.com/">Ubuntu</a> and a couple of other easy to use distributions. It is important to note that all of the most popular ones are free. Now that Linux is comparable to Windows in practically every way, what else is there to compare on, except the price? This is why I believe that free distributions will always be the most popular. Commercial distributions have their place almost only in the enterprise market.<br /><br />Into the future? GNU and Linux will remain free, and Microsoft will have no choice but to switch away from its reliance on Windows being the dominant OS if it is to survive. Windows was the first easy to use OS, and it brought the possibilities of computers to those who would otherwise never have had it. This is the only reason it is on 99% of PCs today. Now that GNU/Linux is a competitor, with the added advantage of being free, Microsoft have no choice but to re-think their business. Very soon <a href="http://haiku-os.org/">Haiku</a> is also going to raise the <a href="http://www.begroovy.com/">BeOS community</a> from the (un)dead, and this will only stir the mix even more.<br /><br />Concluding by returning to the original question, is Linux a commercial product? No, at least, not while we are talking about the home-user's desktop. Should it become commercial? Well, supposing it did, it would lose one of the best things it has to attract people on the OS centre-ground - its freedom.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com1tag:blogger.com,1999:blog-13375892.post-9970393253153254792007-05-20T16:42:00.000+01:002007-05-20T16:48:08.954+01:00C and C++I think it is quite true to an extent...<br /><a href="http://blog.paulbetts.org/index.php/2007/04/02/a-conjecture-regarding-c-and-c-too-although-less-so/">A conjecture regarding C (and C++ too, although less so)...</a><br /><br />Nice blog too, it's going onto my reading list :)<br /><br />My favourite way to make an application at the moment is to create low-level (and possibly all platform-specific code) in C/C++, and then handle logic in Lua. It allows for a lot of flexibility, and faster development time. Lua should be better known :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com1tag:blogger.com,1999:blog-13375892.post-57784797374078677762007-05-20T16:35:00.001+01:002007-07-04T21:07:02.730+01:00Making Scite the default editor in GNOME (Ubuntu)<div xmlns="http://www.w3.org/1999/xhtml">For too long I was fighting with gedit, the default text editor in Ubuntu. While it is not <i>too</i> bad, Scite is far more powerful, and much better.<br /><br />To install Scite, you can type the following in <a href="http://www.psychocats.net/ubuntu/terminal">Terminal</a>:<br /><blockquote><br />sudo aptitude install scite<br /></blockquote><br /><br />I had the option of changing the editor associated with each of the file types in Nautilus (which is what I did on my desktop), but I was sure there must be a better way. I found it...<br /><code><br />sudo aptitude install scite<br />cd ~/.local/share/applications<br />echo -e "[Default Applications]\ntext/plain=scite.desktop" >defaults.list<br />killall nautilus<br /></code><br />Works a treat. Also, here is my Scite settings file:<br /><br /><code>line.margin.visible=1<br />default.file.ext=.lua<br />open.dialog.in.file.directory=1<br />check.if.already.open=1<br /><br /></code><b>Tip:</b> A per-folder settings file can be created. For example, I have created a 'SciTE.properties' file in the gloox src folder, so Scite will automatically use the correct indentation for gloox, and insert spaces when I use the tab key.<br /><br /><b>Update:</b> I found later that this only tells scite to open plain text files. If you are dealing with code (as I am) add the following lines too:<br /><br /><code><br />text/x-csrc=scite.desktop<br />text/x-c++src=scite.desktop<br />text/x-chdr=scite.desktop<br /></code><br /><br />If you want to add other file types, find the MIME type by right-clicking on a file and selecting 'Properties', the MIME type you need to know is listed there.<br /><br /></div>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com7tag:blogger.com,1999:blog-13375892.post-18374822310858155392007-05-20T16:20:00.000+01:002007-05-20T16:25:59.731+01:00Who am I?I asked this very question, and found my answer:<br /><br /><a href="http://www.bbspot.com/News/2006/08/language_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2006/08/language/cplusplus.jpg" alt="You are C++. You are very popular and open to suggestions. Many have tried to be like you, but haven't been successful" border="0" height="90" width="300" /><br />Which Programming Language are You?</a>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com2tag:blogger.com,1999:blog-13375892.post-49701478570733970922007-05-20T15:39:00.001+01:002007-07-11T23:29:27.144+01:00Ubuntu on my new laptop (+ how-to)<div xmlns="http://www.w3.org/1999/xhtml">Yes, my laptop (<a href="http://uk.computers.toshiba-europe.com/cgi-bin/ToshibaCSG/jsp/SUPPORTSECTION/discontinuedProductPage.do?service=UK&com.broadvision.session.new=Yes&PRODUCT_ID=125193">Toshiba A100-062</a>) did arrive, and yes I had installed <a href="http://ubuntu.com/">Ubuntu</a> within the hour :)<br /><br />I installed the <a href="http://releases.ubuntu.com/7.04/">latest version, 7.04</a>, and had no trouble at all. A far cry from the way Linux used to be, <span style="font-weight: bold;">absolutely everything</span> worked out of the box. Once that would have been something uncommon, especially on a laptop. Certainly a pat on the back goes to the Ubuntu developers, and all who contribute directly or indirectly to it.<br /><br />One of the first things I did was install <a href="http://www.beryl-project.org/">Beryl</a>, a 3D window manager. A full-quality video of it <a href="http://hostfile.org/beryl1.ogg">is here</a> (if you're on Windows and it won't play, you need the <a href="http://www.theora.org/">Ogg Theora</a> codec, try <a href="http://www.videolan.org/vlc/">VLC video player</a>, I think it works there).<br /><br />A couple of things I would like to document here, in case they help anyone...<br /><br /><big><span style="font-weight: bold;">Memory card reader</span></big><br /><br />At first I thought it wouldn't work (since that is what a lot of people told me). Sure enough, putting an SD card into the slot did nothing. However I forgot to remove it, and I rebooted with it still in the slot. It seems this was enough to trigger Ubuntu to recognise it, and mount the card.<br /><br />It worked absolutely fine, until I tried a new card. The one that works is 256MB, and the one that doesn't is 2GB, so perhaps it is incompatible with the reader.<br /><br />A couple of filed bugs for Ubuntu caught my eye:<br /><a href="https://bugs.launchpad.net/ubuntu/+source/udev/+bug/53923">Ubuntu Bug #53923</a><br /><a href="https://bugs.launchpad.net/ubuntu/+bug/105284">Ubuntu Bug #105284</a><br /><br />I get the output posted there while the card is in the slot (Ubuntu tries to load it, fails, and tries again and again...).<br /><br /><code>ubuntu kernel: [ 3545.540000] end_request: I/O error, dev mmcblk0, sector xxxxx</code><br /><br />I still have to test the card in this reader in <a href="http://badvista.org/">Vista</a>, so I can be sure it is not just a hardware incompatibility.<br /><br />None of the workarounds posted in comments to those bugs worked (though I admit I did not try compiling new drivers, I am using the Feisty tifm module). I expect this will be fixed in an update.<br /><br /><b>Update:</b> It decided to start working all by itself... :D Don't ask me what it was all about.<br /><br /><b>Second update:</b> In fact this problem seems to be a completely intermittent problem. Sometimes it will work, sometimes it will not. When it doesn't work, I have yet to find a way to fix it, except to repeatedly remove and re-insert the card. Hopefully the next kernel will indeed fix this.<br /><br /><big><span style="font-weight: bold;">Touchpad</span></big><br />I knew there was a program called 'GSynaptics' which allows extra configuration of your touchpad. Being me, I had to install it. I got an error that I needed to set SHMConfig to "true" in xorg.conf. Not very helpful. Here is what I really had to do:<br /><br />If you have a section that says "Synaptics Touchpad" in /etc/X11/xorg.conf already, you can just add the line:<br /><br /><span style="font-family:courier new;">Option "SHMConfig" "true"</span><br /><br />to the section for the device. You must be root to edit this file, so run 'gksudo gedit /etc/X11/xorg.conf' for a GUI or 'sudo nano /etc/X11/xorg.conf' in Terminal.<br /><br />If you don't have such a section, add this somewhere in /etc/X11/xorg.conf:<br /><blockquote style="font-family: courier new;"><span style="font-family:courier new;"> Section "InputDevice"</span><br /> Identifier "Synaptics Touchpad"<br /> Driver "synaptics"<br /> Option "SendCoreEvents" "true"<br /> Option "Device" "/dev/psaux"<br /> Option "Protocol" "auto-dev"<br /> Option "SHMConfig" "true"<br />EndSection<br /></blockquote>Close all your applications, log out, and press Ctrl+Alt+Backspace to restart the X server. If you haven't already, install GSynaptics.<br /><br /><big><span style="font-weight: bold;">Supend to RAM (Sleep), Hibernation and Resume</span></big><br /><br />Although initially working, and working at the time I made this post, I have added this section when I discovered that somehow suspend/resume was broken. I fixed it by doing the following:<br /><br />Change these options in <b>/etc/default/acpi-support</b>:<br /><blockquote style="font-family: courier new;"><br />SAVE_VBE_STATE=false<br />POST_VIDEO=false<br />DOUBLE_CONSOLE_SWITCH=true<br /></blockquote><br /><b>Note:</b> I also changed: MODULES="tifm_core tifm_sd tifm_7xx1"<br />This probably isn't right, but I'm too lazy to change it back right now :). I am concerned that it may lose write-cache data for the SD card if you suspend to RAM. Maybe it won't, but you have been warned!<br /><br />Next, reboot, and immediately press F2 to enter the BIOS. Change "Enable support for legacy USB devices" to 'Disabled', then Save and Exit.<br /><br />Test suspend/resume, it should work. If you have a problem with the keyboard/touchpad not working after resume, download the patch (and apply it with the instructions) from <a href="http://www.stgraber.org/2007/04/08/suspend-to-ram-finally-works/">this blog post</a>.<br /><br />Suspend/resume now works fine for me.<br /><br /><big><span style="font-weight: bold;">LCD Brightness</span></big><br /><br />Maybe not an issue for most people. For some reason the LCD brightness controls in most places don't seem to work, yet controlling the brightness manually <b>is</b> possible.<br /><br />Create a file <b>/usr/bin/setbrightness</b>:<br /><blockquote style="font-family: courier new;"><br />sudo nano /usr/bin/setbrightness<br /></blockquote><br /><br />Paste into it this:<br /><blockquote style="font-family: courier new;"><br />#!/bin/bash<br />sudo sh -c "echo $1 > /proc/acpi/video/VGA/LCD/brightness"<br /></blockquote><br />Press Ctrl+O to save, and Ctrl+X to exit. You can now change the brightness with:<br />`sudo setbrightness 10` (this is the lowest brightness)<br />Possible values are: 10 25 35 50 60 75 90 100 (other values will be ignored)<br /><br />To allow any user on the system to use setbrightness with no sudo:<br />`sudo chmod a+w /proc/acpi/video/VGA/LCD/brightness` (without the quotes)<br />This may not last between reboots though.<br /><br /><b>Links (the places from which I gathered all the information I used):</b><br /><a href="http://www.hieronymusonline.nl/index.php?option=com_content&task=view&id=6&Itemid=12">Debian Etch on a Toshiba Satellite A100-159</a><br /><a href="https://help.ubuntu.com/community/SynapticsTouchpad">Ubuntu: Synaptics Touchpad</a><br /><br />Also, how to automatically switch off the touchpad while you are typing (I haven't tried it yet):<br /><a href="http://ubuntuforums.org/showthread.php?t=271052&highlight=disable+touchpad+while+typing">Disable Touchpad While Typing - Ubuntu Forums</a><br /><a href="http://ubuntu-tutorials.com/2007/05/06/temporarily-disable-touchpad-while-typing/">Ubuntu Tutorials - Temporarily Disable Touchpad While Typing</a><br /><a href="http://ubuntuforums.org/showthread.php?t=434625">Disable Touchpad Tapping While Typing - Ubuntu Forums</a><br /><a href="http://ubuntuforums.org/showthread.php?p=2931815">Toshiba Satellite Laptop Success Story -Ubuntu Forums</a> (Where I found the suspend/resume fix I wrote above, slightly modified for the A100 with Intel graphics)<br /></div>Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com4tag:blogger.com,1999:blog-13375892.post-6835054255160020792007-05-06T22:54:00.000+01:002007-05-06T23:29:48.575+01:00Versioning FIle SystemI haven't tried it, but the idea is a good one. Every time you create, modify, or delete a file, <a href="http://www.ext3cow.com/">Ext3Cow</a> records the changed part of the file in a different place on the disk, preserving the old data that was in the file.<br /><br />Using this system it is possible to find out what any file was like, at any given point in time. There is even a <a href="http://www.sandeepranade.com/html/ComputerScience/time-travelling-file-manager.html">file manager that supports browsing ext3cow</a> volumes.<br /><br />There are many applications for this kind of file system, especially in places where revision control tools (CVS, SVN...) will not suffice.Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com0tag:blogger.com,1999:blog-13375892.post-19355892086081825802007-05-06T14:16:00.000+01:002007-05-06T14:23:49.588+01:00New LaptopFinally I ordered a <a href="https://www.dabs.com/productview.aspx?QuickLinx=4DMZ">laptop</a> for myself. I've been saving up for a while, but now I will be able to use my <a href="http://code.google.com/soc/">GSoC</a> money towards it also. It should be arriving this week.<br /><br />I'll be probably doing most of my development on it, so the first thing I will do is install Ubuntu alongside the pre-installed Vista. Yes, because I still need access to Windows for testing things, I will probably keep Vista, but reduce its partition size and dual-boot it.<br /><br />Seeing as I have never used Vista before (only looked over someone's shoulder) you can be sure I will be posting a Vista vs Ubuntu right here very soon :)Matthewhttp://www.blogger.com/profile/18221715548975784657noreply@blogger.com1