diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-04-09 04:10:09 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-04-09 04:10:09 +0000 |
commit | 6ffd9238078f9050a566dd6da5a124e92bb62b05 (patch) | |
tree | 30ac2383634cb538d06f366bacc376081b517946 | |
parent | 4ef9f36a42ac21bef463a3e2cac9fb10fb03b58d (diff) | |
download | gdm-6ffd9238078f9050a566dd6da5a124e92bb62b05.tar.gz |
Slightly better fix that causes gdmflexiserver to display the dialog GUI
2007-04-09 Brian Cameron <brian.cameron@sun.com>
* gui/gdmflexiserver.c: Slightly better fix that causes gdmflexiserver
to display the dialog GUI when not using --command, and display a
text error when using --command.
svn path=/trunk/; revision=4790
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gui/gdmflexiserver.c | 55 |
2 files changed, 39 insertions, 22 deletions
@@ -1,5 +1,11 @@ 2007-04-09 Brian Cameron <brian.cameron@sun.com> + * gui/gdmflexiserver.c: Slightly better fix that causes gdmflexiserver + to display the dialog GUI when not using --command, and display a + text error when using --command. + +2007-04-09 Brian Cameron <brian.cameron@sun.com> + * gui/gdmflexiserver.c: Report an error message when the gdmcomm_check test fails. diff --git a/gui/gdmflexiserver.c b/gui/gdmflexiserver.c index 1c291856..fecbc37a 100644 --- a/gui/gdmflexiserver.c +++ b/gui/gdmflexiserver.c @@ -767,12 +767,26 @@ main (int argc, char *argv[]) if (args_remaining != NULL && args_remaining[0] != NULL) server = args_remaining[0]; - if ( ! gdmcomm_check (FALSE)) { - gdm_common_error ("Error: GDM (GNOME Display Manager) is not " - "running."); - gdm_common_error ("You might be using a different display " - "manager."); - return 1; + if (send_command != NULL) { + if ( ! gdmcomm_check (FALSE)) { + gdm_common_error ("Error: GDM (GNOME Display Manager) " + "is not running."); + gdm_common_error ("You might be using a different " + "display manager."); + return 1; + } + } else { + /* + * The --command argument does not display anything, so avoid + * running gtk_init until it finishes. Sometimes the + * --command argument is used when there is no display so it + * will fail and cause the program to exit, complaining about + * "no display". + */ + gtk_init(&argc, &argv); + if ( ! gdmcomm_check (TRUE)) { + return 1; + } } /* Start reading config data in bulk */ @@ -839,25 +853,22 @@ main (int argc, char *argv[]) } /* - * The --command argument does not display anything, so avoid running - * gtk_init until it finishes. Sometimes the --command argument is - * used when there is no display so it will fail and cause the - * program to exit, complaining about "no display". + * Now process what gdmflexiserver is more frequently used to + * do, start VT (Virtual Terminal) sesions - at least on + * systems where it is supported. On systems where it is not + * supporteed VT stands for "Very Tight" and will mess up your + * display if you use it. Tight! So do not use it. * - * Now process what gdmflexiserver is more used to do, start a - * VT virtual terminal sesions - at least on systems where it - * works. On systems where it doesn't work VT stands for - * "Very Tight" and will mess up your display if you try to - * use it. Tight! So don't use it. I'd accept a patch to - * disable it, but its easy to avoid not using it as long - * as your distro doesn't put the menu choice in the - * application launch button on the panel (don't ship the - * desktop file). + * I would accept a patch to disable it on such systems, but it + * is easy to avoid not using it as long as your distro does not + * put the menu choice in the application launch button on the + * panel (don't ship the desktop file). */ - gtk_init(&argc, &argv); - /* always attempt to get cookie and authenticate. On remote - servers */ + /* + * Always attempt to get cookie and authenticate. On remote + * servers + */ auth_cookie = gdmcomm_get_auth_cookie (); /* check for other displays/logged in users */ |