XDM authorization problem with xfprint
Bernhard Walle
Bernhard.Walle at gmx.de
Wed Dec 17 13:39:20 CET 2003
Hello,
On Wed, 10 Dec 2003 at 15:35 (+0100), Bernhard Walle wrote:
>
> I recognized that dragging a file to the xfprint icon does not work. So
> I tried to run on console and I got:
>
> [~/Eigene/notizen] $ xfprint-manager file.txt
> Xlib: connection to ":0.0" refused by server
> Xlib: XDM authorization key matches an existing client!
>
> (xfprint4:5717): Gtk-WARNING **: cannot open display:
I finally got a bit time to track the problem. I don't know the real
reason but it only happens if gtk_init() was called before the external
application.
I see no advantage of calling gtk_init() in main.c of xfprint-manager
before starting the other application so my suggestion is to change
the behaviour. A patch is attached.
Any comments? If you don't see a problem I would appreciate if the patch
comes into 4.0.2.
Regards,
Bernhard
--
-------------- next part --------------
--- xfprint-manager/main.c.orig 2003-12-17 12:48:08.000000000 +0100
+++ xfprint-manager/main.c 2003-12-17 13:34:11.000000000 +0100
@@ -51,6 +51,16 @@
main(int argc, char **argv)
{
char **nargv;
+
+ if (argc > 1) {
+ nargv = malloc((argc + 1) * sizeof(char *));
+ memcpy(nargv, argv, argc * sizeof(char *));
+ nargv[0] = "xfprint4";
+ nargv[argc] = NULL;
+ execvp("xfprint4", nargv);
+ show_error(_("Unable to execute xfprint4"));
+ exit(127);
+ }
#if 0
#ifdef ENABLE_NLS
@@ -69,16 +79,6 @@
gtk_set_locale ();
gtk_init(&argc, &argv);
- if (argc > 1) {
- nargv = malloc((argc + 1) * sizeof(char *));
- memcpy(nargv, argv, argc * sizeof(char *));
- nargv[0] = "xfprint4";
- nargv[argc] = NULL;
- execvp("xfprint4", nargv);
- show_error(_("Unable to execute xfprint4"));
- exit(127);
- }
-
printers = xfprinterlist_load();
mainwin_setup();
More information about the Xfce4-dev
mailing list