Thursday 15 July 2010

Additional instant messaging profiles

Apart from the preconfigured IM profiles offline, busy and available, you can define six other profiles for the built-in instant messenger, where you can specify for which of the IM and SIP profiles you want to have which status. For example, for my workplace I have one profile where I am online only via my SIP accounts and Google Talk, but not via other IM.

Prior to firmware PR1.2, you could only have three such user-defined profiles; now it's six. For me, even six was not enough.

I suspected that the profiles are stored somewhere in /home/user, so I changed one of my IM profiles by selecting a different online status for one of my SIP accounts in that profile, saved the changes, and looked at which configuration files got changed (command: ls -lat /home/user). Et voilà: The profiles are stored in /home/user/.osso/.rtcom-presence-ui.cfg.

Simply editing that file with a text editor (as a Unix freak, I used vim) and adding another profile did, however, not do the trick. Rather, the IM application would ignore my changes and instead overwrite my modified file soon after.

But I found out that the following procedure worked for me. Since we live in a sometimes absurd world where people are drawn into court just because other people were too lazy to think, here comes the obligatory warning and disclaimer: You do all this at your own risk. I can neither guarantee that it works, nor do I guarantee that it does not break your phone. You have been warned. If it looks too difficult to you, ask a friend—with just a small bit of Linux/Unix commandline knowledge, it's really easy to do.

  1. Switch your IM availability to offline. Wait half a minute to make sure that you're really offline now.
  2. Edit the configuration file with the IM profiles (/home/user/.osso/.rtcom-presence-ui.cfg):
    1. Create a backup copy of the file in a place you remember. Just in case.
    2. Open the file with a text editor. I used vi, but if you installed PyGtkEditor, you can edit the file by invoking it from the command line: pygtkeditor /home/user/.osso/.rtcom-presence-ui.cfg (note that it won't let you open the file via the menu!).
    3. The syntax should be obvious: The definition of a profile starts with a line like [Profile blah], followed by many lines that describe the definition of that profile, and the definition ends where the next profile definition starts. Don't let yourself get fooled by some superfluous empty lines. Just copy one of the entries three times; for simplicity, I used the last entry for that.
    4. Give each of your three copied profiles a new, unique name. Obviously, the profile name is the text that follows "Profile " inside the brackets. Since you can change their names later anyway, you might as well pick something like "foo", "bar" and "quux". In any case, I would avoid any fancy characters such as ä, ö, ü, ß, é, ç, ś, ţ, ł, å, ъ etc., just in case.
    5. (Probably you now also could re-arrange your existing profiles now by moving them around in the text file, and you also might delete some superfluous empty lines, but I haven't tried that out either of these. So don't do it unless you're prepared to take this additional risk.)
    6. Save your modified file.
  3. Reboot your phone.
    (I'm pretty sure that it might as well be enough to kill and restart some process, but I didn't know which process to kill, and my phone needed a reboot anyway due to some apparent memory leak.)
  4. When you now open the IM application, you'll see that you have three profiles. Now you can change them via the menu just like the others, give them different names and icons, etc.

I imagine that you will be able to add many more profiles this way; however I recommend adding only three. Otherwise, you will have to scroll down to reach the text field where you can specify your status message and select if others should be able to see your GPS position.