Issues with Multiple Instances of Tkabber (and how to fix)
You may have your home directory mounted from a central server, and such if you login on several computers simultaneously, they will of course see the same settings in ~/.tkabber/custom.tcl
Thus several clients will try to login with the same resource and fail.
The trick is to make each client automatically pick a unique resource, and you can do this in config.tcl:
set loginconf(resource) [lindex [split [info hostname] .] 0]TK
Here I read the hostname and extract the non FQDN part. Then I add TK to difference the string from other clients you might try on the same computer (but you can use any string of your choosing, or even none ☺)
Also make sure that the resource set in the tkabber configuration tab is “set and saved” as the default value otherwise that will override your config.tcl setting.
If you have tkabber loaded on login, you may also want, to automatically sign in and not show the splash screen every time. For this, write in config.tcl
#set dockingtray 0
set systray 1
set wm_dock 1
set show_splash_window 0
set autologin 1
You may also want the main window to not automatically open every time tkabber starts. (Since I like it to stay out of the way until someone wants to talk to me)
Open ~/.tkabber/config.tcl and write:
wm withdraw .
proc postload {} {
proc ifacetk::deiconify {} {}
}
You may merge it with an existing postload code
You may like to select “minimise to systray” for Main Interface → closebuttonaction in tkabber preferences (this mimics the action of many other IM applications)
Groupchat
A similar issue arises when you set some conference groups for autojoin in Tkabber. The first time you login tkabber sets your nickname to your jabber username and connects okay. (if you did not store a different one in the bookmark)
When you login a second time on another terminal, you fail to join the room as tkabber tries again to use the same nickname. This problem is not exclusive to tkabber, many autojoining clients suffer from this.
If you can have tkabber pick a unique but predictable nick, such as userID/[resource or hostname] for each running instance, then all your sessions should successfully autojoin.
in the config.tcl write (merge with existing postload as needed):
proc postload {} {
proc plugins::conferences::autojoin_group {connid jid} {
variable bookmarks
global gr_nick
if {$bookmarks($connid,nick,$jid) != ""} {
set nick $bookmarks($connid,nick,$jid)/[lindex [split [info hostname] .] 0]TK
} else {
set nick [get_group_nick $jid $gr_nick]/[lindex [split [info hostname] .] 0]TK
}
set password $bookmarks($connid,password,$jid)
after idle [list muc::join_group $connid $jid $nick $password]
}
}