openbsd-ports/x11/gnome/controlcenter2/patches/patch-capplets_about-me_gnome-about-me_c
2010-04-22 22:32:19 +00:00

35 lines
1.1 KiB
Plaintext

$OpenBSD: patch-capplets_about-me_gnome-about-me_c,v 1.5 2010/04/22 22:32:19 ajacoutot Exp $
Spawn a gnome-terminal to allow users to change their passwords, as we cannot
fork passwd(1) to the background.
From Open Solaris' control-center-01-passwd-in-terminal.diff
--- capplets/about-me/gnome-about-me.c.orig Mon Mar 29 16:22:56 2010
+++ capplets/about-me/gnome-about-me.c Fri Apr 23 00:12:22 2010
@@ -824,7 +824,25 @@ about_me_passwd_clicked_cb (GtkWidget *button, GnomeAb
GtkBuilder *dialog;
dialog = me->dialog;
+#if defined __OpenBSD__
+ /* Use gnome-terminal embedded passwd due to inability to fork passwd in
+ * the background.
+ */
+ {
+ GError *error = NULL;
+ gchar *command = NULL;
+
+ command = g_strdup_printf("gnome-terminal --window --title '%s' --hide-menubar -e /usr/bin/passwd",
+ _("Change password") );
+
+ if ( command != NULL ) {
+ g_spawn_command_line_async( command, &error);
+ g_free(command);
+ }
+ }
+#else
gnome_about_me_password (GTK_WINDOW (WID ("about-me-dialog")));
+#endif
}
static void