Commit bf38ac49 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Add system-config-display and also check for system-config-mouse. FC2 is


Mon Jun 07 09:17:23 2004  George Lebl <jirka@5z.com>

	* config/XKeepsCrashing: Add system-config-display and also check
	  for system-config-mouse.  FC2 is utter shit when it comes to
	  failing X server anyway so on my test machine system-config-display
	  don't work none anyway, but such is life, maybe it'll work for
	  someone (but FC2 of course doesn't run that on X errors anyway).

	* gui/gdmsetup.c: replace hacks with lesser hacks
parent 5982a3c1
Mon Jun 07 09:17:23 2004 George Lebl <jirka@5z.com>
* config/XKeepsCrashing: Add system-config-display and also check
for system-config-mouse. FC2 is utter shit when it comes to
failing X server anyway so on my test machine system-config-display
don't work none anyway, but such is life, maybe it'll work for
someone (but FC2 of course doesn't run that on X errors anyway).
* gui/gdmsetup.c: replace hacks with lesser hacks
Tue Jun 01 11:24:46 2004 George Lebl <jirka@5z.com>
* gui/gdmlogin.c, gui/greeter/greeter_item_canvas.c,
......
......@@ -63,6 +63,7 @@ MSG9=`gettextfunc "Would you like to view the detailed X server output as well?"
#
XCONFIGURATOR=
for n in \
/usr/bin/system-config-display \
/usr/bin/redhat-config-xfree86 \
/usr/sbin/XFdrake \
/usr/bin/X11/XF86Setup \
......@@ -104,6 +105,12 @@ if grep '^\(Cannot open mouse\|No core pointer\)' "$XLOG" 2> /dev/null ; then
MSG4=`gettextfunc "Would you like me to try to run the mouse configuration program? Note that you will need the root password for this."`
fi
if test -x /usr/bin/system-config-mouse ; then
XCONFIGURATOR=/usr/bin/system-config-mouse
# Note: we know this is a mouse problem and yay we have system-config-mouse
MSG4=`gettextfunc "Would you like me to try to run the mouse configuration program? Note that you will need the root password for this."`
fi
fi
# we require 'gdmopen', to open a console, because we really dont
......
......@@ -57,6 +57,23 @@ static GladeXML *xml;
static GList *timeout_widgets = NULL;
static void
simple_spawn_sync (char **argv)
{
g_spawn_sync (NULL /* working_directory */,
argv,
NULL /* envp */,
G_SPAWN_SEARCH_PATH |
G_SPAWN_STDOUT_TO_DEV_NULL |
G_SPAWN_STDERR_TO_DEV_NULL,
NULL /* child_setup */,
NULL /* user_data */,
NULL /* stdout */,
NULL /* stderr */,
NULL /* exit status */,
NULL /* error */);
}
static void
setup_cursor (GdkCursorType type)
{
......@@ -1953,32 +1970,40 @@ install_response (GtkWidget *chooser, gint response, gpointer data)
g_assert (untar_cmd != NULL);
if (chdir (theme_dir) == 0) {
if (system (untar_cmd) == 0) {
char *cmd;
char *quoted = ve_shell_quote_filename (dir);
char *chown = find_chown ();
char *chmod = find_chmod ();
success = TRUE;
/* HACK! */
cmd = g_strdup_printf ("%s -R root:root %s", chown, quoted);
system (cmd);
g_free (cmd);
cmd = g_strdup_printf ("%s -R a+r %s", chmod, quoted);
system (cmd);
g_free (cmd);
cmd = g_strdup_printf ("%s a+x %s", chmod, quoted);
system (cmd);
g_free (cmd);
g_free (quoted);
g_free (chown);
g_free (chmod);
}
chdir (cwd);
if (chdir (theme_dir) == 0 &&
/* this is a security sanity check */
strchr (dir, '/') == NULL &&
system (untar_cmd) == 0) {
char *argv[5];
char *quoted = g_strconcat ("./", dir, NULL);
char *chown = find_chown ();
char *chmod = find_chmod ();
success = TRUE;
/* HACK! */
argv[0] = chown;
argv[1] = "-R";
argv[2] = "root:root";
argv[3] = quoted;
argv[4] = NULL;
simple_spawn_sync (argv);
argv[0] = chmod;
argv[1] = "-R";
argv[2] = "a+r";
argv[3] = quoted;
argv[4] = NULL;
simple_spawn_sync (argv);
argv[0] = chmod;
argv[1] = "a+x";
argv[2] = quoted;
argv[3] = NULL;
simple_spawn_sync (argv);
g_free (quoted);
g_free (chown);
g_free (chmod);
}
if ( ! success) {
......@@ -2137,12 +2162,14 @@ delete_theme (GtkWidget *button, gpointer data)
strchr (dir, '/') == NULL) {
/* HACK! */
DIR *dp;
char *argv[4];
GtkTreeIter *select_iter = NULL;
char *quoted = ve_shell_quote_filename (dir);
char *cmd = g_strdup_printf ("/bin/rm -fR %s", quoted);
system (cmd);
g_free (cmd);
g_free (quoted);
argv[0] = "/bin/rm";
argv[1] = "-fR";
argv[2] = g_strconcat ("./", dir, NULL);
argv[3] = NULL;
simple_spawn_sync (argv);
g_free (argv[2]);
/* Update the list */
gtk_list_store_clear (store);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment