SOLVED! Pidgin ignores DISPLAY variable.

Rogier Wolff R.E.Wolff at BitWizard.nl
Fri Jan 23 20:18:40 EST 2009


On Fri, Jan 23, 2009 at 12:29:31PM -0600, Kevin Stange wrote:
> > May I make a suggestion then? If I'm starting a pidign that determines
> > anohter pidgin is running with a different display, it should print a
> > warning....
> 
> It does print a warning for me:
> 

> (12:24:05) main: exiting because another libpurple client is already running
 
> It is a bit buried in the output though.  It's possible I'm only seeing
> it because of --enable-debug, which means you'd see if if you ran pidgin -d.

Yes, when I run with -d, it is printed here too. About on line 100 of
136. (i.e. unfindable for normal users). 

> You can get around this by running pidgin -m (multi-instance) or -c
> (to specify an alternate configuration file path).  It's generally
> not advised to run two Pidgin (or other libpurple client) instances
> off the same configuration directory as the last client to write
> configs will win the race in terms of whose settings are remembered.

Of course I can. Now that I know that this is the cause, it's entirely
clear where to look for solutions. 

The reason I like Linux is that when something goes wrong, I usually
get a hint as to what's wrong.

If my webbrowser gets an error connecting to a host, I get to
see: 
	cannot resolve hostname: www.google.com
or
	network unreachable trying to connect to www.google.com
or 
	Connection refused, connecting to www.google.com
or
	the server at www.google.com is taking too long to respond. 

And not the "something went wrong" that you ALWAYS get on windows when
it can't find a webpage.

In the first case, MY host name resolving is probably wrong. In the
second case, my host name resolving works, but probably something is
wrong with my routing. In the third and fourth case, I'm pretty sure
that my machine was able to contact the other side, and that any
problems are likely at the other end, and that there is nothing i can
do but to wait, and try again later.

So with pidgin, I close the window with the X button at the top of the
window. xterm then exits. firefox then exits (if it's the last window)
gimp then exits. gqview then exits. huging exist. But pidgin then
apparenlty backgrounds itself because it's still providing status to
my gnome-panel. Fine. 

Of course you say; you could've figured that out by typing 

  "ps auxww | grep pidgin"

Of course I could. However, until I figured out what the problem IS, I
don't have any hints that I have to do this. It's easy as soon as you
know what the problem is. Error/warning messages should tell you when
something unexpected has happend or is about to happen.

So the "another instance is already running" message should be bumped
one or two severity levels: from debug to "warning". This means that
someone running it from the commandline would get to see it. 

Actually, when $DISPLAY of the two instances differ, that's when the
severity of the situation escalates again.... Maybe it's even an error
if this happens.....

Info: Using existin instance. 
Warning: existin instance has a different DISPLAY. 

I could live with that. 

I recognize that many people will be very confused if they learn to
use an "xnest" to test a different window manager, click the "X"
button on pidgin in the main session, and then select pidgin from a
menu in the nested session: A pdigin window pops up in the main
session. All other apps pop up in the nested session bug pidgin
behaves differently.

To solve this, I'd have pidgin send a "virtual" message to the
already-running pdigin, to alert the user. 


Now, I have a question. If pidgin will contact the already running
instance (like xmms2 or firefox), it would be nice if I can tell
pidgin from the commandline to do things. 

Things that would be useful for me are: 

	pidgin --change-state Offline

and 

	pidgin --message-to <someuser> \
		--message-content="Auto message from <script>: Something went wrong". 

I know you're going to say: Feel free to implement it. Thanks. But
I've got enough on my hands right now. So putting it on a wishlist
somewhere would be nice. Maybe someone else with some time could then
see it on the wishlist, and go: Hey good idea, I could use that too, 
let me see what I can do.... 

	Roger. 

-- 
** R.E.Wolff at BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ




More information about the Support mailing list