summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog41
-rw-r--r--config/gdm.conf.in67
-rw-r--r--daemon/gdm.c159
-rw-r--r--daemon/gdm.h45
-rw-r--r--daemon/gdmconfig.c62
-rw-r--r--daemon/slave.c35
-rw-r--r--docs/C/gdm.xml263
-rw-r--r--docs/es/gdm.xml679
-rw-r--r--docs/uk/gdm.xml444
-rw-r--r--gui/gdmcommon.c26
-rw-r--r--gui/gdmlogin.c96
-rw-r--r--gui/gdmsetup.c8
-rw-r--r--gui/greeter/greeter.c88
-rw-r--r--gui/greeter/greeter_configuration.h7
-rw-r--r--gui/greeter/greeter_item.c15
-rw-r--r--gui/greeter/greeter_parser.c35
-rw-r--r--gui/greeter/greeter_system.c101
18 files changed, 1864 insertions, 308 deletions
diff --git a/AUTHORS b/AUTHORS
index 0bb7877a..071a9c94 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -76,6 +76,7 @@ Contributions from:
Lee Mallabone <lee0@callnetuk.com>
Leena Gunda <leena.gunda@wipro.com>
Luis Villa <louie@ximian.com>
+ Lukasz Zalewski <lukas@dcs.qmul.ac.uk>
Mark McLoughlin <mark@skynet.ie>
Mathieu Lacage <mathieu@eazel.com>
Matt Forrest <mforrest@scs.ryerson.ca>
diff --git a/ChangeLog b/ChangeLog
index cf71626d..a2700df7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2006-10-25 Lukasz Zalewski <lukas@dcs.qmul.ac.uk>
+
+ Fixes enhancement request #358114.
+ * daemon/gdmconfig.c: Added variables & functions used to read/store
+ CustomCommands related values
+ * daemon/gdm.c (custom_cmd): New function that handles
+ execution of CustomCommands.
+ * daemon/gdm.c (custom_cmd_restart): New function that handles
+ execution of CustomCommand if NoRestart option is set to false
+ * daemon/gdm.c (custom_cmd_no_restart): New function that handles
+ execution of CustomCommand if NoRestart option is set to true
+ * daemon/gdm. [ch]: Updated macros and several functions to accomodate
+ new CustomCommands functionality
+ * daemon/slave.c: Added Custom command interrupt handler to handle
+ the CustomCommands execution.
+ * gui/gdmlogin.c (gdm_custom_cmd_handler): New function that handles
+ execution of CustomCommands
+ * gui/gdmlogin.c: Added variables and updated several functions to
+ accomodate new CustomCommand functionality
+ * gui/greeter/greeter_configuration.h: Added variables used to
+ store CustomCommand related values
+ * gui/greeter/greeter.c: Added variables that use/store
+ CustomCommand related values
+ * gui/greeter/greeter_item.c: Added visibility check for custom_cmd
+ related widgets
+ * gui/greeter/greeter_parser.c: Added code for parsing custom_cmd stock
+ items
+ * gui/greeter/greeter_system.c (greeter_custom_cmd_handler): New
+ function that handles execution of CustomCommand
+ * gui/greeter/greeter_system.c (query_greeter_custom_cmd_handler): New
+ function that handles execution of CustomCommand (with warn message
+ query beforehand)
+ * gui/greeter/greeter_system.c: Updated macros and several functions
+ to accomodate new CustomCommand functionality
+
+2006-10-26 Brian Cameron <brian.cameron@sun.com>
+
+ * gui/gdmcommon.c, gui/greeter/greeter.c: Never die if
+ at-spi-registryd can not be started. Fixes bug #345434. Patch by
+ Ariel Rios <ariel@gnu.org>.
+
2006-10-26 Erwann Chenede - <erwann.chenede@sun.com>
* gui/greeter/greeter_parser.c: introduced altfile[n] property
diff --git a/config/gdm.conf.in b/config/gdm.conf.in
index c1e280e0..eb44a8b5 100644
--- a/config/gdm.conf.in
+++ b/config/gdm.conf.in
@@ -597,3 +597,70 @@ flexible=false
# Run the chooser instead of the greeter. When the user chooses a machine they
# will get this same server but run with "-terminate -query hostname".
chooser=true
+
+[customcommand]
+# This section allows you specify up to 10 custom commands. Each of the
+# commands can be defined by the six parameters listed below. In each of the
+# descriptions of the parameters N can take on any values between 0 and 9,
+# i.e. CustomCommand0=,CustomCommand1=,...,CustomCommand9=. The numbers
+# can have gaps as long as they fit within predefined set of 10, and their
+# placement order within this section and with respect to each other is
+# not important.
+#
+# CustomCommandN, CustomCommandTextN, CustomCommandLabelN,
+# CustomCommandLRLabelN, CustomCommandTooltipN, and CustomCommandNoRestartN
+# must all be defined for a given integer N, where N can be a number from
+# 0-9.
+
+# Custom command to run. Multiple commands may be specified separated by
+# semicolons. GDM will use the first valid command. Examples:
+# /sbin/bootwindoze;/usr/bin/bootwindoze, or
+# /sbin/runupdate;/usr/local/sbin/runupdate
+#
+#CustomCommandN=
+
+# Custom command dialog message that will appear on all warning dialogs.
+# This will vary depending on what you want to do. Examples:
+# Are you sure you want to restart system into Windoze?, or
+# Are you sure you want do do this?
+#CustomCommandTextN=
+
+# Custom command label that will appear as stock label on buttons/menu items.
+# Examples:
+# _Windoze, or
+# _Update Me
+#CustomCommandLabelN=
+
+# Custom command label that will appear as stock label on radio buttons/lista
+# items. Examples:
+# Restart into _Windoze, or
+# Perform system _Update
+#CustomCommandLRLabelN=
+
+# Custom command tooltip. Examples
+# Restarts the computer into Windoze
+# Updates the computer software to the most recent version(s)
+#CustomCommandTooltipN=
+
+# Custom command gdm/system restart option. Setting it to true will not
+# restart gdm after command execution. The default commands (reboot, shut
+# down) all reboot the system by default which is why the default setting
+# is true.
+#CustomCommandNoRestartN=
+#
+# Example layout for more than one command:
+#CustomCommand0=
+#CustomCommandText0=
+#CustomCommandLabel0=
+#CustomCommandLRLabel0=
+#CustomCommandTooltip0=
+#CustomCommandNoRestart0=
+#
+#CustomCommand1=
+#CustomCommandText1=
+#CustomCommandLabel1=
+#CustomCommandLRLabel1=
+#CustomCommandTooltip1=
+#CustomCommandNoRestart1=
+#
+# and so on
diff --git a/daemon/gdm.c b/daemon/gdm.c
index e1c5ffe4..33823963 100644
--- a/daemon/gdm.c
+++ b/daemon/gdm.c
@@ -94,6 +94,8 @@ static void handle_flexi_server (GdmConnection *conn,
uid_t xnest_uid,
const gchar *xnest_auth_file,
const gchar *xnest_cookie);
+static void custom_cmd_restart (long cmd_id);
+static void custom_cmd_no_restart (long cmd_id);
/* Global vars */
gint xdmcp_sessions = 0; /* Number of remote sessions */
@@ -418,8 +420,8 @@ gdm_rmdir(char *thedir)
if (strcmp(dp->d_name, ".") == 0 ||
strcmp(dp->d_name, "..") == 0)
continue ;
- snprintf(thefile, FILENAME_MAX, "%s/%s", thedir, dp->d_name);
- if (stat(thefile, &buf) == -1)
+ snprintf (thefile, FILENAME_MAX, "%s/%s", thedir, dp->d_name);
+ if (stat (thefile, &buf) == -1)
continue ;
if (S_ISDIR(buf.st_mode))
gdm_rmdir(thefile);
@@ -708,6 +710,93 @@ restart_machine (void)
"gdm_child_action", strerror (errno));
}
+static void
+custom_cmd (long cmd_id)
+{
+ if (cmd_id < 0 || cmd_id >= GDM_CUSTOM_COMMAND_MAX) {
+ /* We are just feeling very paranoid */
+ gdm_error (_("custom_cmd: Custom command index %ld outside permitted range [0,%d)"),
+ cmd_id, GDM_CUSTOM_COMMAND_MAX);
+ return;
+ }
+
+ gchar * key_string = g_strdup_printf (_("%s%ld="), GDM_KEY_CUSTOM_CMD_NO_RESTART_TEMPLATE, cmd_id);
+ if (gdm_get_value_bool (key_string))
+ custom_cmd_no_restart (cmd_id);
+ else
+ custom_cmd_restart (cmd_id);
+
+ g_free(key_string);
+}
+
+static void
+custom_cmd_restart (long cmd_id)
+{
+
+ gdm_info (_("Executing custom command %ld with restart option..."), cmd_id);
+
+ gdm_final_cleanup ();
+ VE_IGNORE_EINTR (g_chdir ("/"));
+
+#ifdef __linux__
+ change_to_first_and_clear (TRUE);
+#endif /* __linux */
+
+ gchar * key_string = g_strdup_printf (_("%s%ld="), GDM_KEY_CUSTOM_CMD_TEMPLATE, cmd_id);
+ char **argv;
+ argv = ve_split (gdm_get_value_string (key_string));
+ g_free(key_string);
+ if (argv != NULL && argv[0] != NULL)
+ VE_IGNORE_EINTR (execv (argv[0], argv));
+
+ g_strfreev (argv);
+
+ gdm_error (_("%s: Execution of custom command failed: %s"),
+ "gdm_child_action", strerror (errno));
+}
+
+static void
+custom_cmd_no_restart (long cmd_id)
+{
+
+ gdm_info (_("Executing custom command %ld with no restart option ..."), cmd_id);
+
+ pid_t pid = fork ();
+
+ if (pid < 0) {
+ /*failed fork*/
+ gdm_error (_("custom_cmd: forking process for custom command %ld failed"), cmd_id);
+ return;
+ }
+ else if (pid == 0) {
+ /* child */
+ char **argv;
+ gchar * key_string = g_strdup_printf (_("%s%ld="), GDM_KEY_CUSTOM_CMD_TEMPLATE, cmd_id);
+ argv = ve_split (gdm_get_value_string (key_string));
+ g_free(key_string);
+ if (argv != NULL && argv[0] != NULL)
+ VE_IGNORE_EINTR (execv (argv[0], argv));
+
+ g_strfreev (argv);
+
+ gdm_error (_("%s: Execution of custom command failed: %s"),
+ "gdm_child_action", strerror (errno));
+
+ _exit (0);
+ }
+ else {
+ /* parent */
+ gint exitstatus = 0, status;
+ pid_t p_stat = waitpid (1, &exitstatus, WNOHANG);
+ if(p_stat > 0){
+ if G_LIKELY (WIFEXITED (exitstatus)){
+ status = WEXITSTATUS (exitstatus);
+ gdm_debug (_("custom_cmd: child %d returned %d"), p_stat, status);
+ }
+ return;
+ }
+ }
+}
static gboolean
gdm_cleanup_children (void)
@@ -1080,6 +1169,11 @@ gdm_do_logout_action (GdmLogoutAction logout_action)
break;
default:
+ /* This is a bit ugly but its the only place we can
+ check for the range of values */
+ if (logout_action >= GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST &&
+ logout_action <= GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST)
+ custom_cmd (logout_action - GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST);
break;
}
}
@@ -2383,6 +2477,20 @@ gdm_handle_message (GdmConnection *conn, const char *msg, gpointer data)
send_slave_ack (d, NULL);
}
+ } else if (strncmp (msg, GDM_SOP_CUSTOM_CMD " ",
+ strlen (GDM_SOP_CUSTOM_CMD " ")) == 0) {
+ GdmDisplay *d;
+ long slave_pid;
+ long cmd_id;
+
+ if (sscanf (msg, GDM_SOP_CUSTOM_CMD " %ld %ld", &slave_pid, &cmd_id) != 2)
+ return;
+ d = gdm_display_lookup (slave_pid);
+
+ if (d != NULL) {
+ custom_cmd (cmd_id);
+ send_slave_ack (d, NULL);
+ }
} else if (strcmp (msg, GDM_SOP_FLEXI_XSERVER) == 0) {
handle_flexi_server (NULL, TYPE_FLEXI, gdm_get_value_string (GDM_KEY_STANDARD_XSERVER),
TRUE /* handled */,
@@ -3255,7 +3363,7 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
if (logout_action == GDM_LOGOUT_ACTION_REBOOT)
g_string_append (msg, "!");
sep = ";";
- }
+ }
if (sysmenu && disp->attached &&
! ve_string_empty (gdm_get_value_string (GDM_KEY_SUSPEND))) {
g_string_append_printf (msg, "%s%s", sep, GDM_SUP_LOGOUT_ACTION_SUSPEND);
@@ -3263,6 +3371,21 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
g_string_append (msg, "!");
sep = ";";
}
+
+ register int i = 0;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ gchar *key_string = NULL;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if (sysmenu && disp->attached &&
+ ! ve_string_empty (gdm_get_value_string (key_string))) {
+ g_string_append_printf (msg, "%s%s%d", sep, GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE, i);
+ if (logout_action == (GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST + i))
+ g_string_append (msg, "!");
+ sep = ";";
+ }
+ g_free(key_string);
+ }
+
g_string_append (msg, "\n");
gdm_connection_write (conn, msg->str);
g_string_free (msg, TRUE);
@@ -3313,6 +3436,21 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
was_ok = TRUE;
}
}
+ else if (strncmp (action, GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE,
+ strlen (GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE)) == 0) {
+ int cmd_index;
+ if (sscanf (action, GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE "%d", &cmd_index) == 1) {
+ gchar *key_string = NULL;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, cmd_index);
+ if (sysmenu && disp->attached &&
+ ! ve_string_empty (gdm_get_value_string (key_string))) {
+ disp->logout_action =
+ GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST + cmd_index;
+ was_ok = TRUE;
+ }
+ g_free(key_string);
+ }
+ }
if (was_ok) {
gdm_connection_write (conn, "OK\n");
gdm_try_logout_action (disp);
@@ -3366,6 +3504,21 @@ gdm_handle_user_message (GdmConnection *conn, const gchar *msg, gpointer data)
was_ok = TRUE;
}
}
+ else if (strncmp (action, GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE,
+ strlen (GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE)) == 0) {
+ int cmd_index;
+ if (sscanf (action, GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE "%d", &cmd_index) == 1) {
+ gchar *key_string = NULL;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, cmd_index);
+ if (sysmenu && disp->attached &&
+ ! ve_string_empty (gdm_get_value_string (key_string))) {
+ safe_logout_action =
+ GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST + cmd_index;
+ was_ok = TRUE;
+ }
+ g_free(key_string);
+ }
+ }
if (was_ok) {
gdm_connection_write (conn, "OK\n");
gdm_try_logout_action (disp);
diff --git a/daemon/gdm.h b/daemon/gdm.h
index 411b7b0b..21a311df 100644
--- a/daemon/gdm.h
+++ b/daemon/gdm.h
@@ -127,6 +127,7 @@ enum {
#define GDM_INTERRUPT_SELECT_USER 'U'
#define GDM_INTERRUPT_LOGIN_SOUND 'L'
#define GDM_INTERRUPT_THEME 'H'
+#define GDM_INTERRUPT_CUSTOM_CMD 'M'
#define GDM_INTERRUPT_CANCEL 'X'
/* List delimiter for config file lists */
@@ -234,6 +235,12 @@ enum {
#define GDM_KEY_FAILSAFE_XSERVER "daemon/FailsafeXServer="
#define GDM_KEY_X_KEEPS_CRASHING "daemon/XKeepsCrashing=" GDMCONFDIR "/XKeepsCrashing"
#define GDM_KEY_REBOOT "daemon/RebootCommand=" REBOOT_COMMAND
+#define GDM_KEY_CUSTOM_CMD_TEMPLATE "customcommand/CustomCommand"
+#define GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE "customcommand/CustomCommandLabel"
+#define GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE "customcommand/CustomCommandLRLabel"
+#define GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE "customcommand/CustomCommandText"
+#define GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE "customcommand/CustomCommandTooltip"
+#define GDM_KEY_CUSTOM_CMD_NO_RESTART_TEMPLATE "customcommand/CustomCommandNoRestart"
#define GDM_KEY_ROOT_PATH "daemon/RootPath=/sbin:/usr/sbin:" GDM_USER_PATH
#define GDM_KEY_SERV_AUTHDIR "daemon/ServAuthDir=" AUTHDIR
#define GDM_KEY_SESSION_DESKTOP_DIR "daemon/SessionDesktopDir=/etc/X11/sessions/:" DMCONFDIR "/Sessions/:" DATADIR "/gdm/BuiltInSessions/:" DATADIR "/xsessions/"
@@ -434,11 +441,30 @@ enum {
typedef struct _GdmConnection GdmConnection;
#endif /* TYPEDEF_GDM_CONNECTION */
+#ifndef TYPEDEF_GDM_CUSTOM_CMD
+#define TYPEDEF_GDM_CUSTOM_CMD
+typedef struct _GdmCustomCmd GdmCustomCmd;
+#endif /* TYPEDEF_GDM_CUSTOM_CMD */
+struct _GdmCustomCmd {
+ gchar *command; /* command(s) to execute */
+ gchar *command_label; /* button/menu item label */
+ gchar *command_lr_label; /* radio button/list item label */
+ gchar *command_text; /* warning dialog text */
+ gchar *command_tooltip; /* tooltip string */
+ gboolean command_no_restart; /* no restart flag */
+};
+
+#define GDM_CUSTOM_COMMAND_MAX 10 /* maximum number of supported custom commands */
+
+/* Values between GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST and
+ GDM_LOGOUT_ACTION_CUSTOM_CMD_LAST are reserved and should not be used */
typedef enum {
GDM_LOGOUT_ACTION_NONE = 0,
GDM_LOGOUT_ACTION_HALT,
GDM_LOGOUT_ACTION_REBOOT,
GDM_LOGOUT_ACTION_SUSPEND,
+ GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST,
+ GDM_LOGOUT_ACTION_CUSTOM_CMD_LAST = GDM_LOGOUT_ACTION_CUSTOM_CMD_FIRST + GDM_CUSTOM_COMMAND_MAX - 1,
GDM_LOGOUT_ACTION_LAST
} GdmLogoutAction;
@@ -708,6 +734,9 @@ void gdm_final_cleanup (void);
#define GDM_SOP_SUSPEND_MACHINE "SUSPEND_MACHINE" /* no arguments */
#define GDM_SOP_CHOSEN_THEME "CHOSEN_THEME" /* <slave pid> <theme name> */
+/*Execute custom cmd*/
+#define GDM_SOP_CUSTOM_CMD "CUSTOM_CMD" /* <slave pid> <cmd id> */
+
/* Start a new standard X flexible server */
#define GDM_SOP_FLEXI_XSERVER "FLEXI_XSERVER" /* no arguments */
@@ -731,6 +760,7 @@ void gdm_final_cleanup (void);
#define GDM_NOTIFY_SOUND_ON_LOGIN_FAILURE_FILE "SoundOnLoginFailureFile" /* <sound file> */
#define GDM_NOTIFY_ADD_GTK_MODULES "AddGtkModules" /* <true/false as int> */
#define GDM_NOTIFY_GTK_MODULES_LIST "GtkModulesList" /* <modules list> */
+#define GDM_NOTIFY_CUSTOM_CMD_TEMPLATE "CustomCommand" /* <custom command path> */
/* commands, seel GDM_SLAVE_NOTIFY_COMMAND */
#define GDM_NOTIFY_DIRTY_SERVERS "DIRTY_SERVERS"
@@ -1136,8 +1166,8 @@ void gdm_final_cleanup (void);
* Supported since: 2.5.90.0
* Answers:
* OK <action>;<action>;...
- * Where action is one of HALT, REBOOT or SUSPEND. An empty list
- * can also be returned if no action is possible. A '!' is appended
+ * Where action is one of HALT, REBOOT, SUSPEND or CUSTOM_CMDX (where X in [0,GDM_CUSTOM_COMMAND_MAX)).
+ * An empty list can also be returned if no action is possible. A '!' is appended
* to an action if it was already set with SET_LOGOUT_ACTION or
* SET_SAFE_LOGOUT_ACTION. Note that SET_LOGOUT_ACTION has precedence
* over SET_SAFE_LOGOUT_ACTION.
@@ -1157,6 +1187,7 @@ void gdm_final_cleanup (void);
* HALT Set exit action to 'halt'
* REBOOT Set exit action to 'reboot'
* SUSPEND Set exit action to 'suspend'
+ * CUSTOM_CMDX Set exit action to 'custom command X' where where X in [0,GDM_CUSTOM_COMMAND_MAX)
* Answers:
* OK
* ERROR <err number> <english error description>
@@ -1183,6 +1214,7 @@ void gdm_final_cleanup (void);
* HALT Set exit action to 'halt'
* REBOOT Set exit action to 'reboot'
* SUSPEND Set exit action to 'suspend'
+ * CUSTOM_CMDX Set exit action to 'custom command X' where where X in [0,GDM_CUSTOM_COMMAND_MAX)
*
* Answers:
* OK
@@ -1193,10 +1225,11 @@ void gdm_final_cleanup (void);
* 200 = Too many messages
* 999 = Unknown error
*/
-#define GDM_SUP_LOGOUT_ACTION_NONE "NONE"
-#define GDM_SUP_LOGOUT_ACTION_HALT "HALT"
-#define GDM_SUP_LOGOUT_ACTION_REBOOT "REBOOT"
-#define GDM_SUP_LOGOUT_ACTION_SUSPEND "SUSPEND"
+#define GDM_SUP_LOGOUT_ACTION_NONE "NONE"
+#define GDM_SUP_LOGOUT_ACTION_HALT "HALT"
+#define GDM_SUP_LOGOUT_ACTION_REBOOT "REBOOT"
+#define GDM_SUP_LOGOUT_ACTION_SUSPEND "SUSPEND"
+#define GDM_SUP_LOGOUT_ACTION_CUSTOM_CMD_TEMPLATE "CUSTOM_CMD"
/*
*/
#define GDM_SUP_QUERY_VT "QUERY_VT" /* None */
diff --git a/daemon/gdmconfig.c b/daemon/gdmconfig.c
index 016ac867..0aefacac 100644
--- a/daemon/gdmconfig.c
+++ b/daemon/gdmconfig.c
@@ -115,6 +115,7 @@ static gchar *GdmFailsafeXserver = NULL;
static gchar *GdmXKeepsCrashing = NULL;
static gchar *GdmHalt = NULL;
static gchar *GdmReboot = NULL;
+static GdmCustomCmd *GdmCustomCommands = NULL;
static gchar *GdmSuspend = NULL;
static gchar *GdmServAuthDir = NULL;
static gchar *GdmMulticastAddr;
@@ -506,6 +507,37 @@ gdm_config_init (void)
&GdmPreFetchProgram, &string_type);
gdm_config_add_hash (GDM_KEY_PAM_STACK, &GdmPamStack, &string_type);
+ /* custom command string values */
+ GdmCustomCommands = g_new0 (GdmCustomCmd, GDM_CUSTOM_COMMAND_MAX);
+ register int i = 0;
+ gchar *key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ /* For each possible custom command */
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ GdmCustomCommands[i].command = NULL;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command, &string_type);
+
+ key_string = g_strdup_printf (_("%s%d=_Custom%d"), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i, i);
+ GdmCustomCommands[i].command_label = NULL;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command_label, &string_type);
+
+ key_string = g_strdup_printf (_("%s%d=Execute _custom command %d"), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i, i);
+ GdmCustomCommands[i].command_lr_label = NULL;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command_lr_label, &string_type);
+
+ key_string = g_strdup_printf (_("%s%d=Are you sure?"), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, i);
+ GdmCustomCommands[i].command_text = NULL;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command_text, &string_type);
+
+ key_string = g_strdup_printf (_("%s%d=Execute custom command %d"), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i, i);
+ GdmCustomCommands[i].command_tooltip = NULL;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command_tooltip, &string_type);
+
+ key_string = g_strdup_printf (_("%s%d=false"), GDM_KEY_CUSTOM_CMD_NO_RESTART_TEMPLATE, i);
+ GdmCustomCommands[i].command_no_restart = FALSE;
+ gdm_config_add_hash (key_string, &GdmCustomCommands[i].command_no_restart, &bool_type);
+ }
+
/* int values */
gdm_config_add_hash (GDM_KEY_XINERAMA_SCREEN, &GdmXineramaScreen, &int_type);
gdm_config_add_hash (GDM_KEY_RETRY_DELAY, &GdmRetryDelay, &int_type);
@@ -1159,6 +1191,23 @@ _gdm_set_value_string (gchar *key, gchar *value_in, gboolean doing_update)
/* All others */
} else {
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ /* For each possible custom command */
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if(is_key (key, key_string)) {
+ if (value != NULL)
+ *setting = ve_get_first_working_command (value, FALSE);
+ else
+ *setting = NULL;
+
+ break;
+ }
+ }
+
+ g_free(key_string);
+
if (value != NULL)
*setting = g_strdup (value);
else {
@@ -1192,6 +1241,19 @@ _gdm_set_value_string (gchar *key, gchar *value_in, gboolean doing_update)
notify_displays_string (GDM_NOTIFY_GTK_MODULES_LIST, *setting);
else if (is_key (key, GDM_KEY_TIMED_LOGIN))
notify_displays_string (GDM_NOTIFY_TIMED_LOGIN, *setting);
+
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ /* For each possible custom command */
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if (is_key (key, key_string)) {
+ g_free(key_string);
+ key_string = g_strdup_printf (_("%s%d"), GDM_NOTIFY_CUSTOM_CMD_TEMPLATE, i);
+ notify_displays_string (key_string, *setting);
+ }
+ }
+ g_free(key_string);
}
if (setting_copy != NULL)
diff --git a/daemon/slave.c b/daemon/slave.c
index 72b4c128..c4231e53 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -4955,6 +4955,17 @@ check_for_interruption (const char *msg)
case GDM_INTERRUPT_CANCEL:
do_cancel = TRUE;
break;
+ case GDM_INTERRUPT_CUSTOM_CMD:
+ if (d->attached &&
+ ! ve_string_empty (&msg[2])) {
+ gchar *message = g_strdup_printf ("%s %ld %s",
+ GDM_SOP_CUSTOM_CMD,
+ (long)getpid (), &msg[2]);
+
+ gdm_slave_send (message, TRUE);
+ g_free (message);
+ }
+ return TRUE;
case GDM_INTERRUPT_THEME:
g_free (d->theme_name);
d->theme_name = NULL;
@@ -5541,6 +5552,30 @@ gdm_slave_handle_notify (const char *msg)
}
}
}
+ } else if (strncmp (msg, GDM_NOTIFY_CUSTOM_CMD_TEMPLATE,
+ strlen (GDM_NOTIFY_CUSTOM_CMD_TEMPLATE)) == 0) {
+ if (sscanf (msg, GDM_NOTIFY_CUSTOM_CMD_TEMPLATE "%d", &val) == 1) {
+ gchar * key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, val);
+ /* This assumes that the number of commands is < 100, i.e two digits
+ if that is not the case then this will fail */
+ gdm_set_value_string (key_string, ((gchar *)&msg[strlen (GDM_NOTIFY_CUSTOM_CMD_TEMPLATE) + 2]));
+ g_free(key_string);
+
+ if (d->attached) {
+ do_restart_greeter = TRUE;
+ if (restart_greeter_now) {
+ ; /* will get restarted later */
+ } else if (d->type == TYPE_STATIC) {
+ /* FIXME: can't handle flexi servers like this
+ * without going all cranky */
+ if ( ! d->logged_in) {
+ gdm_slave_quick_exit (DISPLAY_REMANAGE);
+ } else {
+ remanage_asap = TRUE;
+ }
+ }
+ }
+ }
} else if (strncmp (msg, GDM_NOTIFY_REMOTE_GREETER " ",
strlen (GDM_NOTIFY_REMOTE_GREETER) + 1) == 0) {
gdm_set_value_string (GDM_KEY_REMOTE_GREETER,
diff --git a/docs/C/gdm.xml b/docs/C/gdm.xml
index d17fdd5b..9deeedcf 100644
--- a/docs/C/gdm.xml
+++ b/docs/C/gdm.xml
@@ -141,7 +141,7 @@
The Gnome Display Manager (GDM) is a display manager that
implements all significant features required for managing
local and remote displays. GDM was written from scratch and
- does not contain any XDM / X Consortium code.
+ does not contain any XDM / X Consortium code.
</para>
<para>
@@ -170,8 +170,9 @@
(ServAuthDir, PidFile, etc.), system applications (SoundProgram), etc.
Some configuration values depend on OS interfaces may need to be
modified to work on a given OS. Typical examples are HaltCommand,
- RebootCommand, SuspendCommand, StandardXServer, Xnest, SoundProgram,
- and the &quot;command&quot; value for each &quot;server-foo&quot;.
+ RebootCommand, CustomCommands, SuspendCommand, StandardXServer, Xnest,
+ SoundProgram, and the &quot;command&quot; value for each
+ &quot;server-foo&quot;.
</para>
<para>
@@ -1860,7 +1861,7 @@ PostSession/
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>DefaultPath</term>
<listitem>
@@ -2067,7 +2068,7 @@ PostSession/
missing, the shut down command is not available. Note that the
default for this value is not empty, so to disable
&quot;Shut Down&quot; it must be
- set to an empty value.
+ set to an empty value.
</para>
</listitem>
</varlistentry>
@@ -3965,6 +3966,122 @@ gdm:.my.domain
</variablelist>
</sect3>
+ <sect3 id="customcmdsection">
+ <title>Custom Commands</title>
+
+ <para>
+ You can create up to 10 different commands. Gaps between command
+ numbers are allowed and their relative positioning within the
+ section and with respect to each other is not important as long as
+ they conform to the permitted range of [0-9].
+
+ </para>
+
+ <variablelist>
+ <title>[customcommand]</title>
+
+ <varlistentry>
+ <term>CustomCommand[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommand[0-9]=</synopsis>
+ <para>
+ Full path and arguments to command to be executed when user
+ selects <filename>n-th</filename> &quot;Custom Command&quot;
+ from the Actions menu. This can be a ';' separated list of
+ commands to try. If the value is empty or missing, then the
+ custom command is not available. By default this value is not
+ enabled, so to enable &quot;Custom Command&quot; it must be
+ set to a nonempty value. [0-9] represents the
+ <filename>CustomCommand</filename> suffix and can be an
+ integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> &quot;Custom Command&quot;
+ buttons and menu items. If not specified the default value is
+ &quot;_Custom[0-9]&quot;. This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ [0-9] represents <filename>CustomCommand</filename> suffix
+ and can be an integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLRLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLRLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> &quot;Custom Command&quot;
+ list items and radio buttons. If not specified the default
+ value is &quot;Execute _custom command [0-9]&quot;. This
+ option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined. [0-9]
+ represents <filename>CustomCommand</filename> suffix and
+ can be an integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandNoRestart[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandNoRestart[0-9]=</synopsis>
+ <para>
+ Specifies if gdm will be stopped/restarted once
+ <filename>n-th</filename> &quot;Custom Command&quot;
+ has been executed. If not specified the default value is
+ &quot;false&quot;. This option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined. [0-9]
+ represents <filename>CustomCommand</filename> suffix and
+ can be an integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandText[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandText[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on the warning
+ dialog box once <filename>n-th</filename>
+ &quot;Custom Command&quot; button/menu item/radio button/list
+ item has been activated. If not specified the default value is
+ &quot;Are you sure?&quot;. This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ [0-9] represents <filename>CustomCommand</filename> suffix and
+ can be an integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandTooltip[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandTooltip[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on tooltips for
+ <filename>n-th</filename> &quot;Custom Command&quot;
+ entries. If not specified the default value is &quot;Execute
+ custom command [0-9]&quot;. This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ [0-9] represents <filename>CustomCommand</filename> suffix and
+ can be an integer between 0 and 9.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect3>
+
<sect3 id="serverdefs">
<title>X Server Definitions</title>
@@ -4665,8 +4782,8 @@ QUERY_LOGOUT_ACTION: Query which logout actions are possible
Supported since: 2.5.90.0
Answers:
OK &lt;action&gt;;&lt;action&gt;;...
- Where action is one of HALT, REBOOT or SUSPEND. An
- empty list can also be returned if no action is possible.
+ Where action is one of HALT, REBOOT, SUSPEND or CUSTOM_CMD[0-9].
+ An empty list can also be returned if no action is possible.
A '!' is appended to an action if it was already set with
SET_LOGOUT_ACTION or SET_SAFE_LOGOUT_ACTION. Note that
SET_LOGOUT_ACTION has precedence over
@@ -4765,10 +4882,11 @@ SET_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend after
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -4795,10 +4913,11 @@ SET_SAFE_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -5917,7 +6036,7 @@ homogeneous=&quot;bool&quot;&gt;
An image that will be displayed only when a pam-error message
is being displayed. This is useful for displaying an
&quot;Attention&quot; icon, for example. This feature is
- supported in GDM 2.14.6 and later.
+ supported in GDM 2.14.6 and later.
</para>
</listitem>
</varlistentry>
@@ -5992,6 +6111,15 @@ homogeneous=&quot;bool&quot;&gt;
</varlistentry>
<varlistentry>
+ <term>custom_cmd_button[0-9]</term>
+ <listitem>
+ <para>
+ Runs the <filename>n-th</filename> custom command.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>disconnect_button</term>
<listitem>
<para>
@@ -6179,6 +6307,10 @@ homogeneous=&quot;bool&quot;&gt;
&quot;true&quot; in the GDM configuration.
</para>
<para>
+ <filename>custom_cmd[0-9]</filename>, if <filename>n-th</filename>
+ CustomCommand is specified in the GDM configuration.
+ </para>
+ <para>
<filename>halt</filename>, if HaltDaemon is specified in
the GDM configuration.
</para>
@@ -6398,6 +6530,9 @@ homogeneous=&quot;bool&quot;&gt;
<filename>config</filename>, _(&quot;_Configure&quot;
</para>
<para>
+ <filename>custom_cmd[0-9]</filename>, _(&quot;_Custom[0-9]&quot;
+ </para>
+ <para>
<filename>disconnect</filename>, _(&quot;D_isconnect&quot;
</para>
<para>
@@ -6931,6 +7066,102 @@ Hosts=appserverone,appservertwo
chooser to the other X terminals.
</para>
</sect2>
+
+ <sect2 id="customcommand">
+ <title>Defining Custom Commands</title>
+
+ <para>
+ Suppose you want to add a custom command to the GDM menu that will give
+ you the oportunity to boot into other operating system such as Windoze.
+ Jsut add the following options into the
+ <filename>[customcommand]</filename> section of the GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+ </screen>
+
+ CustomCommand0 specifies two commands separated by a semicolon:
+ <filename>/sbin/rebootwindoze</filename> and
+ <filename>/usr/local/sbin/rebootwindoze</filename>. GDM will use
+ the first valid command in the list. This allows different
+ commands for different operating systems to be included.
+ </para>
+ <para>
+ Note, that besides being able to customise this option to reboot into
+ different operating systems you can also use it to define your own
+ custom behaviours that you wish to run from the GDM menu. Suppose you
+ want to give users the oportunity to run system update scripts from the
+ login screen. Add the following options into the
+ <filename>[customcommand]</filename> section of your GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel0=_Update Me
+ CustomCommandLRLabel0=Update the system
+ CustomCommandText0=Are you sure you want to update the system software?
+ CustomCommandTooltip0=Updates the system
+ CustomCommandNoRestart0=true
+ </screen>
+ </para>
+
+ <para>
+ Both custom commands could be defined as follows.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+ </screen>
+ </para>
+
+ <para>
+ There can be up to 10 custom commands numbered 0-9.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+
+ CustomCommand3=/sbin/do_something
+ .
+ .
+ .
+
+ CustomCommand4=/sbin/do_something_else
+ .
+ .
+ .
+ </screen>
+ </para>
+ </sect2>
</sect1>
<sect1 id="troubleshooting">
diff --git a/docs/es/gdm.xml b/docs/es/gdm.xml
index 77f5ca77..36f09d41 100644
--- a/docs/es/gdm.xml
+++ b/docs/es/gdm.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
-<!ENTITY version "2.15.1">
+<!ENTITY version "2.17.0">
<!ENTITY date "05/12/2006">
]>
<article id="index" lang="es">
@@ -71,13 +71,19 @@
- <releaseinfo>Este manual describe la versión 2.15 del Gestor de entrada de GNOME. Se actualizó por última vez en 12/05/2006.</releaseinfo>
+ <releaseinfo>
+ This manual describes version 2.17.0 of the GNOME Display Manager.
+ It was last updated on 05/12/2006.
+ </releaseinfo>
</articleinfo>
<sect1 id="preface">
<title>Términos y convenciones usados en este manual</title>
- <para>Este manual describe la versión 2.15 del Gestor de entrada de GNOME. Se actualizó por última vez en 12/05/2006.</para>
+ <para>
+ This manual describes version 2.17.0 of the GNOME Display Manager.
+ It was last updated on 05/12/2006.
+ </para>
<para>Selector - Un programa que se usa para seleccionar un equipo remoto para gestionar una pantalla remotamente en la pantalla local (<command>gdmchooser</command>).</para>
@@ -114,7 +120,19 @@
<sect2 id="stability">
<title>Estabilidad de interfaces</title>
- <para>Los valores de pares de clave/valor definidos en los archivos de configuración de GDM y la ubicación de estos archivos se consideran «estables» y deberían cambiar sólo de formas compatibles hacia atrás. Note que esto incluye funcionalidad como los scripts de GDM (Init, PreSession, PostSession, PostLogin, XKeepsCrashing, etc), ubicaciones de directorios (ServAuthDir, PidFile, etc), aplicaciones del sistema (SoundProgram), etc. Algunos valores de configuración dependen de interfaces del SO y quizá necesiten ser modificados para que funcionen en un determinado SO. Los ejemplos típicos son HaltCommand, RebootCommand, SuspendCommand, StandardXServer, Xnest, SoundProgram, y el valor del «comando» para cada «server-tal».</para>
+ <para>
+ The key/value pairs defined in the GDM configuration files and
+ the location of these files are considered "stable" interfaces
+ and should only change in ways that are backwards compatible. Note that
+ this includes functionality like the GDM scripts (Init, PreSession,
+ PostSession, PostLogin, XKeepsCrashing, etc.); directory locations
+ (ServAuthDir, PidFile, etc.), system applications (SoundProgram), etc.
+ Some configuration values depend on OS interfaces may need to be
+ modified to work on a given OS. Typical examples are HaltCommand,
+ RebootCommand, CustomCommands, SuspendCommand, StandardXServer, Xnest,
+ SoundProgram, and the "command" value for each
+ "server-foo".
+ </para>
<para>Nota: las distribuciones a menudo cambian los valores predeterminados de las claves para soportar su plataforma. Los interfaces de línea de comandos para los programas GDM instalados en <filename>&lt;bin&gt;</filename> y <filename>&lt;sbin&gt;</filename> se consideran estables. Refiérase a su documentación de la distribución para ver si hay cualquier cambio específico de la distribución a estos interfaces de GDM y qué soporte existe para ellos.</para>
@@ -136,7 +154,22 @@
<para>La pantalla del IGU de la entrada permite al usuario seleccionar qué sesión quiere iniciar y qué idioma quiere usar. Las sesiones se definen por archivos que terminan con la extensión .desktop y puede encontrar más información sobre estos archivos en la sección de «Configuración». El usuario introduce su nombre y contraseña y si éstos le autentican con éxito, GDM iniciará la sesión solicitada para el usuario. Es posible configurar GDM para evitar el proceso de autenticación activando las características de Entrada automática o Entrada temporizada en la configuración de GDM. El IGU de entrada puede configurarse además para para proporcionar características adicionales al usuario, como un visor de rostros, la capacidad de detener, reiniciar o suspender el sistema; y o editar la configuración de entrada (tras introducir la contraseña de root).</para>
- <para>GDM, por omisión, usará Pluggable Authentication Modules (PAM) para autenticar, pero puede usar además contraseñas crypt y shadow en sistemas legados. Tras autenticar al usuario, el demonio ejecuta el script <filename>PostLogin</filename> como root, y bifurca un proceso esclavo para iniciar la sesión solicitada. Este proceso esclavo ejecuta el script de <filename>PreSession</filename> como root, establece el entorno del usuario e inicia la sesión solicitada. GDM conserva la sesión predeterminada del usuario y el idioma en el archivo <filename>~/.dmrc</filename> del usuario y usará estos predeterminados si el usuario no seleccionó una sesión o idioma en el IGU de entrada. En Solaris, GDM (desde la versión 2.8.0.3) usa el interfaz SDTLOGIN después de autenticar al usuario para decir al servidor X que se reinicie como el usuario en vez de como root para mayor seguridad. Cuando la sesión del usuario sale, el demonio de GDM ejecutará el script <filename>PostSession</filename> como root.</para>
+ <para>
+ GDM, by default, will use Pluggable Authentication Modules (PAM) for
+ authentication, but can also support regular crypt and shadow passwords
+ on legacy systems. After authenticating a user, the daemon runs the
+ <filename>PostLogin</filename> script as root, and forks a slave
+ process to start the requested session. This slave process runs the
+ <filename>PreSession</filename> script as root, sets up the user's
+ environment, and starts the requested session. GDM keeps track of the
+ user's default session and language in the user's
+ <filename>~/.dmrc</filename> and will use these defaults if the user
+ did not pick a session or language in the login GUI. On Solaris, GDM
+ (since version 2.8.0.3) uses the SDTLOGIN interface after user
+ authentication to tell the X server to be restarted as the user instead
+ of as root for added security. When the user's session exits, the GDM
+ daemon will run the <filename>PostSession</filename> script as root.
+ </para>
</sect2>
<sect2 id="displaytypes">
@@ -215,7 +248,22 @@
<para>Note que cargar y escalar los iconos de rostros situados en los directorios personales de los usuarios puede ser una tarea que consuma mucho tiempo. Debido a que no es práctico cargar imágenes sobre NIS o NFS, GDM no intenta cargar imágenes de rostros desde directorios personales remotos. Además, GDM parará de cargar imágenes de rostros después de 5 segundos de actividad y sólo mostrará los usuarios cuyas imágenes haya obtenido hasta entonces. La opción <filename>Include</filename> de <filename>gdm.conf</filename> puede usarse para especificar un conjunto de usuarios que deberían aparecer en el visor de rostros. Mientras los usuarios a incluir tengan un tamaño razonable, no debería haber ningún problema con GDM siendo incapaz de acceder a las imágenes de rostros. Para evitar estos problemas, se recomienda situar las imágenes de rostros en el directorio especificado por la opción de configuración <filename>GlobalFaceDir</filename>.</para>
- <para>Para controlar qué usuarios se muestran en el examinador de rostros, hay varias opciones de configuración que pueden usarse. Si se establece a true la opción <filename>IncludeAll</filename>, entonces se analizará el archivo de contraseñas y se mostrarán todos los usuarios. Si la opción <filename>IncludeAll</filename> se establece a falso, entonces la opción <filename>Include</filename> debería contener una lista de usuarios separada por comas. Sólo los usuarios especificados se mostrarán. Cualquier usuario listado en la opción <filename>Exclude</filename> y los usuarios cuyo UID sea inferior a <filename>MinimalUID</filename> se filtrarán con independencia de lo que esté establecido en <filename>IncludeAll</filename>. <filename>IncludeAll</filename> no está recomendado para sistemas donde las contraseñas se carguen por medio de una red (como cuando se usa NIS), debido a que puede ser muy lento cargar más de un pequeño número de usuarios sobre la red.</para>
+ <para>
+ To control the users who get displayed in the face browser, there are
+ a number of configuration options that can be used. If the
+ <filename>IncludeAll</filename> option is set to true, then the
+ password file will be scanned and all users will be displayed. If
+ <filename>IncludeAll</filename> option is set to false, then the
+ <filename>Include</filename> option should contain a list of users
+ separated by commas. Only the users specified will be displayed.
+ Any user listed in the <filename>Exclude</filename> option and users
+ whose UID's is lower than <filename>MinimalUID</filename> will be
+ filtered out regardless of the <filename>IncludeAll</filename>
+ setting. <filename>IncludeAll</filename> is not recommended
+ for systems where the passwords are loaded over a network (such as
+ when NIS is used), since it can be very slow to load more than a
+ small number of users over the network..
+ </para>
<para>Cuando el examinador está activado, los nombres de usuario válidos en el equipo están expuestos inherentemente a un intruso potencial. Esto puede ser una mala idea si no sabe quién puede acceder a una pantalla de entrada. Esto es especialmente cierto si ejecuta XDMCP (desactivado por omisión).</para>
</sect2>
@@ -231,7 +279,18 @@
<para>Puede suprimir la advertencia de los 10 segundos devolviendo un código 66 desde el script <filename>Xsession</filename> desde el binario de la sesión (el script <filename>Xsession</filename> predeterminado propaga esos códigos hacia atrás). Esto es útil si tiene alguna clase de inicios de sesión especiales para los que no es un error retornar menos de esos 10 segundos después, o si configura la sesión para mostrar algún mensaje de error y el mensaje de GDM podría ser confuso y redundante.</para>
- <para>La salida de la sesión se encauza a través del demonio gdm y así el archivo <filename>~/.xsession-errors</filename> está capado a cerca de 200 Kbytes por GDM para prevenir una posible denegación de servicio en la sesión. Una aplicación podría quizás leer algunos datos erróneos, imprimir advertencias o errores en stderr o stdout. Esto podría quizás llenar el directorio personal del usuario quien tendría que cerrar sesión e iniciar sesión de nuevo para limpiar esto. Esto podría ser especialmente duro si hay cuotas puestas. GDM además atrapa correctamente la señal XFSZ y para de escribir el archivo, lo que podría conducir a sesiones matadas si el archivo fue redirigido en la forma antigua desde el script.</para>
+ <para>
+ The session output is piped through the GDM daemon and so the
+ <filename>~/.xsession-errors</filename> file is capped at about
+ 200 kilobytes by GDM to prevent a possible denial of service attack
+ on the session. An app could perhaps on reading some wrong data print
+ out warnings or errors on the stderr or stdout. This could perhaps
+ fill up the user's home directory who would then have to log out and
+ log back in to clear this. This could be especially nasty if quotas
+ are set. GDM also correctly traps the XFSZ signal and stops writing
+ the file, which would lead to killed sessions if the file was
+ redirected in the old fashioned way from the script.
+ </para>
<para>Note que algunos distribuidores parecen ignorar la redirección de <filename>~/.xsession-errors</filename> y la hacen ellos mismos en su propio script Xsession (establecido por la clave de configuración <filename>BaseXsession</filename>) que significa que GDM no será capaz de atrapar la salida y cubrir este archivo. Puede también perder datos de salida del script <filename>PreSession</filename> lo que puede hacer la depuración mucho más complicada ya que quizás la salida de lo que está equivocado no se imprimirá. Vea la descripción de la clave de configuración <filename>BaseXsession</filename> para más información, especialmente acerca de cómo manejar múltiples gestores de entrada usando el mismo script.</para>
@@ -271,7 +330,12 @@
<para>Algunas características de GDM (como activar la entrada automática) quizá requieran que actualice su configuración PAM. PAM tiene interfaces distintos, pero similares, en diferentes sistemas operativos, así que compruebe su página man de pam.d o pam.conf para los detalles acerca de cómo configurarlo. Asegúrese de leer la documentación de PAM (eg: página man de pam.d/pam.conf) y tenga cuidado con las implicaciones de seguridad de cualquier cambio que intente hacer a su configuración.</para>
- <para>Si no hay ninguna entrada para GDM en su archivo de configuración de PAM, entonces las características como la entrada automática quizá no funcionen. No tener una entrada hará que GDM use el comportamiento predeterminado, se recomiendan configuraciones conservadoras y probablemente sean los que se entreguen con su distribución.</para>
+ <para>
+ If there is no entry for GDM in your system's PAM configuration file,
+ then features like automatic login may not work. Not having an entry
+ will cause GDM to use default behavior, conservative settings are
+ recommended and probably shipped with your distribution.
+ </para>
<para>Si desea que GDM funciona con otros tipos de mecanismos de autenticación (como una SmartCard), entonces debe implementar esto escribiendo un módulo PAM en vez de intentando modificar el código de GDM directamente. Refiérase a la documentación de PAM de su sistema. Esta cuestión se ha discutido en la lista de correo <address><email>gdm-list@gnome.org</email></address>, así que puede referirse a los archivadores de la lista para más información.</para>
</sect2>
@@ -452,7 +516,16 @@ PostSession/
<para><filename>locale.alias</filename> es un archivo que se parece mucho al archivo de alias regionales del sistema pero no es el mismo. Éstos son los idiomas que están disponibles en su sistema. Todos los idiomas además se prueban para ver si actualmente existen antes de presentárselos al usuario.</para>
- <para><filename>Xsession</filename> es un script que configura una sesión de usuario y después ejecuta la selección de sesión del usuario. Note que el script de sesión se inicia típicamente por el archivo <filename>desktop</filename> asociado con la sesión que el usuario a escogido. Algunas sesiones quizá inicien la sesión del usuario por medio de un mecanismo diferente que el script <filename>Xsession</filename> así que marque el <filename>desktop</filename> apropiado antes de asumir que el problema de inicio está causado por este archivo.</para>
+ <para>
+ <filename>Xsession</filename> is a script which sets up a user session
+ and then executes the user's choice of session. Note that the session
+ script is typically started via the <filename>desktop</filename>
+ file associated with the session the user has picked. Some
+ sessions may start the user's session via a different mechanism than
+ the <filename>Xsession</filename> script, so please check the
+ appropriate <filename>desktop</filename> before assuming a session
+ startup issue is being caused by this file.
+ </para>
<para><filename>XKeepsCrashing</filename> es un script que se ejecuta cuando el servidor X continúa colgándose y no se puede recuperar. El script predeterminado incluido funcionará con la mayoría de las distribuciones de Linux y puede ejecutar la aplicación de configuración de X siempre que la persona en la consola conozca la contraseña de root.</para>
@@ -467,7 +540,23 @@ PostSession/
<para>En esta sección explicaremos los directorios <filename>Init</filename>, <filename>PostLogin</filename>, <filename>PreSession</filename> y <filename>PostSession</filename> ya que son muy similares.</para>
- <para>Cuando el servidor X se haya iniciado con éxito, GDM intentará ejecutar el script llamado <filename>Init/&lt;displayname&gt;</filename>. Ej: <filename>Init/:0</filename> para la primera pantalla local. Si este archivo no se encuentra, GDM intentará ejecutar <filename>Init/&lt;hostname&gt;</filename>. Ej: <filename>Init/somehost</filename>. Si esto aún no se encuentra, GDM intentará <filename>Init/XDMCP</filename> para todas las entradas XDMCP o <filename>Init/Flexi</filename> para todas las pantallas bajo demanda. Si no se encuentra ninguno de los anteriores, GDM ejecutará <filename>Init/Default</filename>. El script se ejecutará como root y GDM se bloquea hasta que termina. Use el script <filename>Init/*</filename> para las aplicaciones que se suponen que se ejecutan junto con la ventana de entrada de GDM. xconsole por ejemplo. Los comandos para poner el fondo de pantalla, etc. van también en este archivo.</para>
+ <para>
+ When the X server has been successfully started, GDM will try to run
+ the script called <filename>Init/&lt;displayname&gt;</filename>. I.e.
+ <filename>Init/:0</filename> for the first local display. If this file
+ is not found, GDM will attempt to to run
+ <filename>Init/&lt;hostname&gt;</filename>. I.e.
+ <filename>Init/somehost</filename>.
+ If this still is not found, GDM will try
+ <filename>Init/XDMCP</filename> for all XDMCP logins or
+ <filename>Init/Flexi</filename> for all on demand flexible
+ displays. If none of the above were found, GDM will run
+ <filename>Init/Default</filename>. The script will be run as root and
+ GDM blocks until it terminates. Use the <filename>Init/*</filename>
+ script for applications that are supposed to run alongside with the GDM
+ login window. xconsole for instance. Commands to set the background
+ etc. go in this file too.
+ </para>
<para>Es responsabilidad del administrador de sistemas decidir si los clientes iniciados por el script Init deben matarse antes de iniciar la sesión del usuario. Esto se controla con la opción de configuración <filename>KillInitClients</filename></para>
@@ -477,7 +566,15 @@ PostSession/
<para>Después de esto se ejecuta el script <filename>Xsession</filename> base con el ejecutable de la sesión seleccionada como primer argumento. Esto se ejecuta como el usuario, y realmente esta es la sesión del usuario. Los ejecutables de sesiones disponibles se toman de la línea <filename>Exec=</filename> en los archivos <filename>.desktop</filename> de la ruta especificada en <filename>SessionDesktopDir</filename>. Usualmente esta ruta es <filename>&lt;etc&gt;/X11/sessions/:&lt;etc&gt;/dm/Sessions:/usr/share/xsessions/</filename>. Se usa el primer archivo encontrado. El usuario o escoge de estas sesiones o GDM buscará dentro del archivo <filename>~/.dmrc</filename> la preferencia almacenada.</para>
- <para>Este script debería cargar realmente el perfil de los usuarios y generalmente hacer todo el vudú que se necesita para lanzar una sesión. Debido a que muchos sistemas restablecen las selecciones de idioma realizadas por GDM, GDM también establece la variable <filename>$GDM_LANG</filename> al idioma seleccionado. Puede usar esto para restaurar las variables de entorno de idiomas tras ejecutar el perfil del usuario. Si el usuario eligió el idioma del sistema, entonces <filename>$GDM_LANG</filename> no se establece.</para>
+ <para>
+ This script should really load the user's profile and generally do all
+ the voodoo that is needed to launch a session. Since many systems
+ reset the language selections done by GDM, GDM will also set the
+ <filename>$GDM_LANG</filename> variable to the selected language. You
+ can use this to reset the language environmental variables after you
+ run the user's profile. If the user elected to use the system language,
+ then <filename>$GDM_LANG</filename> is not set.
+ </para>
<para>Cuando el usuario termina su sesión, se ejecuta el script <filename>PostSession</filename>. De nuevo la operación es similar a <filename>Init</filename>, <filename>PostLogin</filename> y <filename>PreSession</filename>. De nuevo el script se ejecuta con privilegios de root, el demonio esclavo se bloqueará y la variable de entorno <filename>$USER</filename> contendrá el nombre del usuario que acaba de cerrar sesión y <filename>$DISPLAY</filename> se establecerá al visualizador que el usuario usó, sin embargo note que el servidor X para este visualizador quizá ya esté muerto y así que no debería intentar acceder a él. Además la variable de entorno <filename>$X_SERVERS</filename> está establecida y ésta apunta a un archivo generado falsificado de servidores X para usar con la aplicación de contabilidad sessreg.</para>
@@ -514,6 +611,12 @@ PostSession/
<listitem>
<synopsis>AddGtkModules=false</synopsis>
<para>Si es true, entonces activa <command>gdmgreeter</command> o <command>gdmlogin</command> para que se lancen con módulos GTK+ adicionales. esto es útil cuando se requieren características extra como un inicio sesión accesible. Note que sólo deberían usarse los módulos «confiables» para minimizar las cuestiones de seguridad.</para>
+ <para>
+ If true, then the registry daemon
+ <command>at-spi-registryd</command>
+ will be launched by <command>gdmgreeter</command> or
+ <command>gdmlogin</command> starting with version GDM 2.17.
+ </para>
<para>Usualmente esto se usa para los módulos de accesibilidad. Los módulos que se cargan se especifican con la clave <filename>GtkModulesList</filename>.</para>
</listitem>
</varlistentry>
@@ -530,7 +633,14 @@ PostSession/
<term>AlwaysLoginCurrentSession</term>
<listitem>
<synopsis>AlwaysLoginCurrentSession=true</synopsis>
- <para>Si es «true», cuando el usuario entra y ya tiene una sesión existente, entonces se concecta a esa sesión en lugar de iniciar una sesión nueva. Esto sólo funciona en sesiones que se ejecutan en VTs (Virtual Terminals) iniciados con gdmflexiserver, y no con XDMCP. Note que los VTs no están soportados en todos los sistemas operativos.</para>
+ <para>
+ If true, then when the user logs in and already has an
+ existing session, then they are connected to that session
+ rather than starting a new session. This only works for
+ sessions running on VTs (Virtual Terminals) started with
+ gdmflexiserver, and not with XDMCP. Note that VTs are not
+ supported on all operating systems.
+ </para>
</listitem>
</varlistentry>
@@ -550,17 +660,11 @@ PostSession/
<para>Se reconocen los siguientes caracteres de control dentro del nombre especificado:</para>
- <para>
- &percnt;&percnt; &mdash; the `&percnt;' character
- </para>
+ <para>&percnt;&percnt;&mdash; carácter `&percnt;'</para>
- <para>
- &percnt;d &mdash; display's name
- </para>
+ <para>&percnt;d &mdash; nombre de la pantalla</para>
- <para>
- &percnt;h &mdash; display's hostname
- </para>
+ <para>&percnt;h &mdash; nombre de host de la pantalla</para>
<para>Alternativamente, el nombre podría terminar con una barra vertical |, el símbolo de cauce. El nombre se usa entonces como una aplicación a ejecutar que revuelve el nombre de usuario deseado en la salida estándar. Si se devuelve un nombre de usuario vacío o inválido, no se realiza el inicio de sesión automático. Esta característica se usa típicamente cuando se usan varios visores remotos como kioscos de Internet, con un usuario específico para iniciar sesión automáticamente en cada visualizador.</para>
</listitem>
@@ -609,7 +713,7 @@ PostSession/
<para>Si es false, gdm no mostrará un diálogo de mensaje en la consola cuando ocurra un error.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>DefaultPath</term>
<listitem>
@@ -712,13 +816,7 @@ PostSession/
<term>GtkModulesList</term>
<listitem>
<synopsis>GtkModulesList=module-1:module-2:...</synopsis>
- <para>
- A colon separated list of Gtk+ modules that
- <command>gdmgreeter</command> or <command>gdmlogin</command>
- will be invoked with if <filename>AddGtkModules</filename> is
- true. The format is the same as the standard Gtk+ module
- interface.
- </para>
+ <para>Una lista separada por dos puntos de módulos GTK+ que <command>gdmgreeter</command> o <command>gdmlogin</command> invocar´an si <filename>AddGtkModules</filename> está a true. El formato es el mismo que el interfaz Gtk+ estándar.</para>
</listitem>
</varlistentry>
@@ -726,15 +824,7 @@ PostSession/
<term>HaltCommand</term>
<listitem>
<synopsis>HaltCommand=&lt;sbin&gt;/shutdown -h now</synopsis>
- <para>
- Full path and arguments to command to be executed when user
- selects "Shut Down" from the Actions menu. This can
- be a ';' separated list of commands to try. If a value is
- missing, the shut down command is not available. Note that the
- default for this value is not empty, so to disable
- "Shut Down" it must be
- set to an empty value.
- </para>
+ <para>ruta completa y argumentos al comando que ejecutar cuando el usuario selecciona «Apagar» desde el menú Acciones. Esto puede ser una lista separada por ";" de comandos a intentar. Si falta un valor, el comando de apagado no estará disponible. Note que lo predeterminado para este valor no está vacío, así que para desactivar «Apagar» debe establecerse a un valor vacío.</para>
</listitem>
</varlistentry>
@@ -742,10 +832,7 @@ PostSession/
<term>KillInitClients</term>
<listitem>
<synopsis>KillInitClients=true</synopsis>
- <para>
- Determines whether GDM should kill X clients started by the
- init scripts when the user logs in.
- </para>
+ <para>Determina si GDM sebe matar los clientes X iniciados por los scripts de inicio cuando el usuario inicia sesión.</para>
</listitem>
</varlistentry>
@@ -753,10 +840,7 @@ PostSession/
<term>Directorio de registro</term>
<listitem>
<synopsis>LogDir=&lt;var&gt;/log/gdm</synopsis>
- <para>
- Directory containing the log files for the individual displays.
- By default this is the same as the ServAuthDir.
- </para>
+ <para>Directorio conteniendo los archivos de sucesos para las pantallas individuales. Por omisión éste es el mismo que el de ServAuthDir.</para>
</listitem>
</varlistentry>
@@ -772,18 +856,7 @@ PostSession/
<term>PreFetchProgram</term>
<listitem>
<synopsis>PreFetchProgram=command</synopsis>
- <para>
- Program to be run by the GDM greeter/login program when the
- initial screen is displayed. The purpose is to provide a hook
- where files which will be used after login can be preloaded to
- speed performance for the user. The program will be called
- once only, the first time a greeter is displayed. The
- gdmprefetch command may be used. This utility will load any
- libraries passed in on the command line, or if the argument
- starts with a "@" character, it will process the file assuming
- it is an ASCII file containing a list of libraries, one per
- line, and load each library in the file.
- </para>
+ <para>Programa que se ejecutará por el programa de entrada/interfaz de GDM cuando se muestre la pantalla inicial. El propósito es proporcionar un gancho donde los archivos que se usarán tras la entrada puedan precargarse para mejorar la velocidad para el usuario. El programa se llamará sólo una vez, la primera vez que se muestre la interfaz de entrada. El comando gdmprefetch será usado. Esta utilidad cargará cualquier biblioteca pasada en la línea de comandos, o si el argumento empieza por un carácter «@», procesará el archivo asumiendo que es un archivo ASCII conteniendo una lista de bibliotecas, una por línea, y cargará cada biblioteca en el archivo.</para>
</listitem>
</varlistentry>
@@ -791,11 +864,7 @@ PostSession/
<term>PostLoginScriptDir</term>
<listitem>
<synopsis>PostLoginScriptDir=&lt;etc&gt;/gdm/PostLogin</synopsis>
- <para>
- Directory containing the scripts run right after the user logs
- in, but before any session setup is done. See the
- ``The Script Directories'' section for more info.
- </para>
+ <para>Directorio que contiene los scripts ejecutados justo después de que el usuario inicie sesión, pero antes de que se realice ninguna configuración de sesión. Vea la sección ``Los directorios de Scripts'' para más información.</para>
</listitem>
</varlistentry>
@@ -803,10 +872,7 @@ PostSession/
<term>PostSessionScriptDir</term>
<listitem>
<synopsis>PostSessionScriptDir=&lt;etc&gt;/gdm/PostSession</synopsis>
- <para>
- Directory containing the scripts run after the user logs out.
- See the ``The Script Directories'' section for more info.
- </para>
+ <para>Directorio conteniendo los scripts ejecutados después de que el usuario cierre la sesión. Vea la sección ``Los directorios de Scripts'' para más información.</para>
</listitem>
</varlistentry>
@@ -814,10 +880,7 @@ PostSession/
<term>PreSessionScriptDir</term>
<listitem>
<synopsis>PreSessionScriptDir=&lt;etc&gt;/gdm/PreSession</synopsis>
- <para>
- Directory containing the scripts run before the user logs in.
- See the ``The Script Directories'' section for more info.
- </para>
+ <para>Directorio que contiene los scripts ejecutados antes de que el usuario inicie sesión. Vea la sección ``Los directorios de Scripts'' para más información.</para>
</listitem>
</varlistentry>
@@ -825,14 +888,7 @@ PostSession/
<term>RebootCommand</term>
<listitem>
<synopsis>RebootCommand=&lt;sbin&gt;/shutdown -r now</synopsis>
- <para>
- Full path and optional arguments to the command to be
- executed when user selects Restart from the Actions menu. This
- can be a ';' separated list of commands to try. If missing,
- the restart command is not available. Note that the default
- for this value is not empty so to disable restart you must set
- this explicitly to an empty value.
- </para>
+ <para>Ruta completa y argumentos opcionales para el comando que ejecutar cuando el usuario selecciona Reiniciar desde el menú de Acciones. Esto puede ser una lista separada por «;» de comandos que probar. Si falta, el comandos de reinicio no está disponible. Note que lo predeterminado para este valor es no vacío así que para desactivar el reinicio debe establecerlo explícitamente a un valor vacío.</para>
</listitem>
</varlistentry>
@@ -1032,7 +1088,7 @@ PostSession/
</para>
<para>
- Normally if this is the users home directory GDM will still
+ Normally if this is the user's home directory GDM will still
refuse to put cookies there if it thinks it is NFS (by testing
root-squashing). This can be changed by setting
<filename>NeverPlaceCookiesOnNFS</filename> in the
@@ -1065,14 +1121,7 @@ PostSession/
<term>VTAllocation</term>
<listitem>
<synopsis>VTAllocation=true</synopsis>
- <para>
- On systems where GDM supports automatic VT (virtual terminal)
- allocation (currently Linux and FreeBSD only), you can have
- GDM automatically append the vt argument to the X server
- executable. This way races that come up from each X server
- managing it's own vt allocation can be avoided. See also
- <filename>FirstVT</filename>.
- </para>
+ <para>En sistemas donde GDM soporta reserva de TV (terminales virtuales) automáticos (actualmente Linux y FreeBSD sólo), puede hacer que GDM agregue automáticamente el argumento del tv al ejecutable del servidor X. De esta manera las carreras que surjan de cada servidor X gestionando su propia reserva de tv se pueden evitar. Vea además <filename>FirstVT</filename>.</para>
</listitem>
</varlistentry>
@@ -1219,7 +1268,7 @@ PostSession/
<synopsis>NeverPlaceCookiesOnNFS=true</synopsis>
<para>
Normally if this is true (which is by default), GDM will not
- place cookies into the users home directory if this directory
+ place cookies into the user's home directory if this directory
is on NFS. Well, GDM will consider any filesystem with
root-squashing an NFS filesystem. Sometimes however the remote
file system can have root squashing and be safe (perhaps by
@@ -1788,7 +1837,14 @@ PostSession/
<term>DefaultFace</term>
<listitem>
<synopsis>DefaultFace=&lt;share&gt;/pixmaps/nophoto.png</synopsis>
- <para>Si un usuario no tiene una imagen de rostro definida, GDM usará el icono "stock_person" definido en el tema GTK+ actual. Si dicha imagen no está definida, entonces usará la imagen especificada en la opción de configuración <filename>DefaultFace</filename>. La imagen debe estar en un formato soportado por gdk-pixbuf y el archivo debe poderlo leer el usuario de GDM.</para>
+ <para>
+ If a user has no defined face image, GDM will use the
+ "stock_person" icon defined in the current GTK+
+ theme. If no such image is defined, the image specified by
+ <filename>DefaultFace</filename> will be used. The image must
+ be in a gdk-pixbuf supported format and the file must be
+ readable to the GDM user.
+ </para>
</listitem>
</varlistentry>
@@ -1942,7 +1998,7 @@ PostSession/
<synopsis>Logo=&lt;share&gt;/pixmaps/gnome-logo-large.png</synopsis>
<para>
Image file to display in the logo box. The file must be
- in an gdk-pixbuf supported format and it must be readable by
+ in a gdk-pixbuf supported format and it must be readable by
the GDM user. If no file is specified the logo feature
is disabled.
This only affects the GTK+ Greeter.
@@ -2267,33 +2323,19 @@ PostSession/
<synopsis>Welcome=Welcome</synopsis>
<para>Controla qué texto se muestra junto a la imagen del logotipo en el interfaz estándar. Están soportados los siguientes caracteres de control:</para>
- <para>
- &percnt;&percnt; &mdash; the `&percnt;' character
- </para>
+ <para>&percnt;&percnt;&mdash; carácter `&percnt;'</para>
- <para>
- &percnt;d &mdash; display's hostname
- </para>
+ <para>&percnt;d &mdash; nombre de host de la pantalla</para>
- <para>
- &percnt;h &mdash; Fully qualified hostname
- </para>
+ <para>&percnt;h &mdash; Nombre de host completamente cualificado</para>
- <para>
- &percnt;m &mdash; machine (processor type)
- </para>
+ <para>&percnt;m &mdash; máquina (tipo de procesador)</para>
- <para>
- &percnt;n &mdash; Nodename (i.e. hostname without .domain)
- </para>
+ <para>&percnt;n &mdash; Nombre de nodo (ej. nombre del host sin .dominio)</para>
- <para>
- &percnt;r &mdash; release (OS version)
- </para>
+ <para>&percnt;r &mdash; lanzamiento (versión del SO)</para>
- <para>
- &percnt;s &mdash; sysname (i.e. OS)
- </para>
+ <para>&percnt;s sysname (i.e. OS)</para>
<para>Estas cadenas se usan sólo para inicios de sesión locales. Para inicios de sesión remotos XDMCP se usa <filename>RemoteWelcome</filename>.</para>
@@ -2372,9 +2414,7 @@ PostSession/
<term>MulticastAddr</term>
<listitem>
<synopsis>MulticastAddr=ff02::1</synopsis>
- <para>
- This is the Link-local Multicast address and is hardcoded here.
- </para>
+ <para>Esta es la dirección de enlace local multicast y está codificada aquí.</para>
</listitem>
</varlistentry>
@@ -2382,7 +2422,12 @@ PostSession/
<term>DefaultHostImage</term>
<listitem>
<synopsis>DefaultHostImage=&lt;share&gt;/pixmaps/nohost.png</synopsis>
- <para>El nombre del archivo para el icono de host predeterminado. Esta imagen debe mostrarse si no hay ningún icono especificado en un host dado. El archivo debe estar en un formato soportado por gdk-pixbuf y deben tener permiso de lectura para el usuario de GDM.</para>
+ <para>
+ File name for the default host icon. This image will be
+ displayed if no icon is specified for a given host. The
+ file must be in a gdk-pixbuf supported format and it must be
+ readable for the GDM user.
+ </para>
</listitem>
</varlistentry>
@@ -2396,7 +2441,7 @@ PostSession/
<filename>gdmchooser</filename>.
</para>
- <para>El nombre del archvivo debe coincidir con el nombre completamente cualificado (FQDN) para el host. Los iconos deben almacenarse en un formato soportado por gdk-pixbuf y deben tener permiso de lectura para el usuario de GDM.</para>
+ <para>El nombre del archivo debe coincidir con el nombre completamente cualificado (FQDN) para el host. Los iconos deben almacenarse en un formato soportado por gdk-pixbuf y deben tener permiso de lectura para el usuario de GDM.</para>
</listitem>
</varlistentry>
@@ -2455,6 +2500,109 @@ PostSession/
</variablelist>
</sect3>
+ <sect3 id="customcmdsection">
+ <title>Custom Commands</title>
+
+ <para>
+ You can create up to 10 different commands. Gaps between command
+ numbers are allowed and their relative positioning within the
+ section is not important as long as they conform to the permitted
+ range of [0-9].
+
+ </para>
+
+ <variablelist>
+ <title>[customcommand]</title>
+
+ <varlistentry>
+ <term>CustomCommand[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommand[0-9]=</synopsis>
+ <para>
+ Full path and arguments to command to be executed when user
+ selects n-th "Custom Command" from the Actions menu.
+ This can be a ';' separated list of commands to try. If the
+ value is empty or missing, then the custom command is not
+ available. By default this value is not enabled, so to enable
+ "Custom Command" it must be set to a nonempty value.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> "Custom Command"
+ buttons and menu items. If not specified the default value is
+ "_Custom[0-9]". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLRLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLRLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> "Custom Command"
+ list items and radio buttons. If not specified the default
+ value is "Execute _custom command [0-9]". This
+ option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandNoRestart[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandNoRestart[0-9]=</synopsis>
+ <para>
+ Specifies if gdm will be stopped/restarted once
+ <filename>n-th</filename> "Custom Command"
+ has been executed. If not specified the default value is
+ "false". This option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandText[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandText[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on the warning
+ dialog box once <filename>n-th</filename>
+ "Custom Command" button/menu item/radio button/list
+ item has been activated. If not specified the default value is
+ "Are you sure?". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandTooltip[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandTooltip[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on tooltips for
+ <filename>n-th</filename> "Custom Command"
+ entries. If not specified the default value is "Execute
+ custom command [0-9]". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect3>
+
<sect3 id="serverdefs">
<title>Definiciones del servidor X</title>
@@ -2773,23 +2921,23 @@ VERSION
<sect3 id="adddynamic">
<title>ADD_DYNAMIC_DISPLAY</title>
<screen>
-ADD_DYNAMIC_DISPLAY: Create a new server definition that will
- run on the specified display leaving, it
- in DISPLAY_CONFIG state.
-Supported since: 2.8.0.0
-Arguments: &lt;display to run on&gt;=&lt;server&gt;
- Where &lt;server&gt; is either a configuration named in the
- GDM configuration or a literal command name.
-Answers:
- OK &lt;display&gt;
- ERROR &lt;err number&gt; &lt;english error description&gt;
- 0 = Not implemented
- 2 = Existing display
- 3 = No server string
- 4 = Display startup failure
- 100 = Not authenticated
- 200 = Dynamic Displays not allowed
- 999 = Unknown error
+ADD_DYNAMIC_DISPLAY: Creauna nueva definición de servidor que
+ se ejecutará en el visor especificado,
+ dejándolo en estado DISPLAY_CONFIG.
+Suportado desde: 2.8.0.0
+Argumentos: &lt;visor en el que ejecutar&gt;=&lt;servidor&gt;
+ Donde &lt;servidor&gt; es o una configuración nombrada en
+ la configuración de GDM o un nombre de comando literal.
+Respuestas:
+ OK &lt;visor&gt;
+ ERROR &lt;número de error&gt; &lt;descripción del error en inglés&gt;
+ 0 = No implementado
+ 2 = Visor existente
+ 3 = Falta la cadena del servidor
+ 4 = Fallo al iniciar el visor
+ 100 = No autenticado
+ 200 = Visores dinámicos no permitidos
+ 999 = Error desconocido
</screen>
</sect3>
@@ -3085,8 +3233,8 @@ QUERY_LOGOUT_ACTION: Query which logout actions are possible
Supported since: 2.5.90.0
Answers:
OK &lt;action&gt;;&lt;action&gt;;...
- Where action is one of HALT, REBOOT or SUSPEND. An
- empty list can also be returned if no action is possible.
+ Where action is one of HALT, REBOOT, SUSPEND or CUSTOM_CMD[0-9].
+ An empty list can also be returned if no action is possible.
A '!' is appended to an action if it was already set with
SET_LOGOUT_ACTION or SET_SAFE_LOGOUT_ACTION. Note that
SET_LOGOUT_ACTION has precedence over
@@ -3185,10 +3333,11 @@ SET_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend after
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -3215,10 +3364,11 @@ SET_SAFE_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -4090,17 +4240,47 @@ homogeneous="bool"&gt;
</varlistentry>
</variablelist>
+ <para>
+ List items by default display as lists, but the combo="true" attribute
+ can be used to specify combo box style (combo style supported since GDM 2.18).
+ Some predefined lists may be included in a theme by using the following id values.
+ Customized lists may also be defined, which are explained below.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term>session</term>
+ <listitem>
+ <para>
+ A list of available sessions, which allows the user to pick
+ the session to use. Supported since GDM 2.18.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
- <para>Los elementos de listas pueden tener valores id como siguen:</para>
+ <variablelist>
+ <varlistentry>
+ <term>language</term>
+ <listitem>
+ <para>
+ A list of available languages, which allows the user to pick
+ the language to use. Supported since GDM 2.18.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<variablelist>
<varlistentry>
<term>userlist</term>
<listitem>
<para>
- A Face Browser list, so that users can pick
- their username by clicking on this instead
- of typing.
+ A Face Browser list, so that users can pick their username
+ by clicking on this instead of typing. This obviously exposes
+ the usernames to viewers of the login screen, and is not
+ recommended for users who feel that this reduces security.
+ The face browser does not support combo box style.
</para>
</listitem>
</varlistentry>
@@ -4188,7 +4368,9 @@ homogeneous="bool"&gt;
</screen>
</para>
- <para>Los valores posibles para los ids de los botones son los siguientes:</para>
+ <para>
+ Possible values for button ids are as follows.
+ </para>
<variablelist>
<varlistentry>
@@ -4206,6 +4388,15 @@ homogeneous="bool"&gt;
</varlistentry>
<varlistentry>
+ <term>custom_cmd_button[0-9]</term>
+ <listitem>
+ <para>
+ Runs the <filename>n-th</filename> custom command.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>disconnect_button</term>
<listitem>
<para>Desconecta de una sesión remota.</para>
@@ -4345,6 +4536,10 @@ homogeneous="bool"&gt;
<para><filename>chooser</filename>, si ChooserButton está puesto a «true» en la configuración de GDM.</para>
<para><filename>configurar</filename>, si ConfigAvailable está puesto a «true» en la configuración de GDM.</para>
+ <para>
+ <filename>custom_cmd[0-9]</filename>, if <filename>n-th</filename>
+ CustomCommand is specified in the GDM configuration.
+ </para>
<para><filename>halt</filename>, si HaltDaemon está especificado en la configuración de GDM.</para>
<para><filename>reiniciar</filename>, si RebootCommand está especificado en la configuración de GDM.</para>
<para><filename>suspend</filename>, si SuspendCommand está especificado en la configuración de GDM.</para>
@@ -4481,6 +4676,9 @@ homogeneous="bool"&gt;
<para><filename>caps-lock-warning</filename>, _("La tecla BloqMayús está activada."</para>
<para><filename>chooser</filename>, _("Entrada remota via _XDMCP"</para>
<para><filename>config</filename>, _("_Configurar"</para>
+ <para>
+ <filename>custom_cmd[0-9]</filename>, _("_Custom[0-9]"
+ </para>
<para><filename>disconnect</filename>, _("D_esconectar"</para>
<para><filename>halt</filename>, _("_Apagar")</para>
<para><filename>language</filename>, _("_Idioma"</para>
@@ -4503,9 +4701,23 @@ homogeneous="bool"&gt;
<sect3 id="customwidgetry">
<title>Widgets personalizados</title>
- <para>Actualmente hay un elemento que puede ser personalizable y este es el elemento de la lista. Si necesita preguntar al usuario cosas adicionales, como para escoger de una lista o lugares desde donde entrar, o establecer un conjunto de sesiones de entrada personalizadas puede configurar el elemento de la lista y añadir hijos del elemento de la lista que describan las selecciones. Cada elemento de la lista debe tener un id y un texto hijo. La elección será grabada en el archivo <filename>&lt;ServAuthDir&gt;/&lt;display&gt;.GreeterInfo</filename> como <filename>&lt;list id&gt;=&lt;listitem id&gt;</filename>.</para>
+ <para>
+ Currently there is one item which is customizable and this is
+ the list item. If you need to ask the user extra things, such as
+ to pick from a list of places to log into, or set of custom login
+ sessions you can setup the list item and add listitem children that
+ describe the choices. Each listitem must have an id and a text
+ child. The choice will be recorded in the file
+ <filename>&lt;ServAuthDir&gt;/&lt;display&gt;.GreeterInfo</filename>
+ as <filename>&lt;list id&gt;=&lt;listitem id&gt;</filename>.
+ </para>
- <para>Por ejemplo suponga que estamos en la pantalla 0, <filename>ServAuthDir</filename> es <filename>/var/gdm</filename> y necesitamos tener lo siguiente en el tema:</para>
+ <para>
+ For example suppose we are on display :0,
+ <filename>ServAuthDir</filename> is
+ <filename>&lt;var&gt;/lib/gdm</filename> and we have the following in the
+ theme:
+ </para>
<screen>
&lt;item type="list" id="custom-config"&gt;
@@ -4519,9 +4731,13 @@ homogeneous="bool"&gt;
&lt;/item&gt;
</screen>
- <para>Entonces si el usuario elije «Foo» entonces <filename>&lt;var&gt;/gdm/:0.GreeterInfo</filename> contendrá <screen>
+ <para>
+ Then if the user chooses 'Foo' then
+ <filename>&lt;var&gt;/lib/gdm/:0.GreeterInfo</filename> will contain:
+<screen>
custom-config=foo
-</screen></para>
+</screen>
+ </para>
</sect3>
</sect2>
</sect1>
@@ -4560,6 +4776,13 @@ GtkThemesToAllow=HighContrast,HighContrastInverse
GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
</screen>
+ <para>
+ The use of assistive technologies and the atk-bridge module
+ requires the registry daemon, <command>at-spi-registryd</command>,
+ to be running. This is handled by the GDM GUI starting with
+ version 2.17.
+ </para>
+
<para>Los administradores de sistema quizá deseen cargar sólo un subconjunto mínimo de estos módulos que se requieren para soportar su base de usuarios. Dependiendo de las necesidades de los usuarios finales, no todos los GtkModules necesitan ser cargados. Si sus usuarios finales necesitan el lector de pantalla integrado y la lupa, debe incuir «gail» y «atk-bridge». Si sus usuarios finales estarán usando un dispositivo apuntador sin botones o interruptores, incluya «dwellmouselistener». si algunos de sus usuarios usarán dispositivos apuntadores con interruptores, alternativos a teclados físicos o despositivos de botones, incluya «keymouselistener». Incluir los cuatro es apropiado para la mayoría de las configuraciones del sistema. El teclado en pantalla puede funcionar singail o atk-bridge, pero con un conjunto de características reducido; paa accesibilidad optima recomendamos incluir tanto gail como atk-bridge.</para>
<para>
@@ -4663,53 +4886,26 @@ GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
<sect2 id="solarisconfiguration">
<title>Configuración de Solaris</title>
- <para>
- On Solaris, the following configuration is recommended.
- This turns on IPv6 and also turns on PreFetch for
- performance benefit.
-
-<screen>
+ <para>En Solaris, la siguiente configuración está recomendada. Esto activa IPv6 y además activa PreFetch para beneficiar el rendimiento. <screen>
./autogen.sh --prefix=/usr --sysconfdir=/etc/X11 --localstatedir=/var
--libexecdir=/usr/lib --enable-ipv6=yes --with-at-bindir=/usr/sfw/bin
--with-prefetch --with-post-path=/usr/openwin/bin
-</screen>
- </para>
+</screen></para>
- <para>
- Configuring GDM with the
- "--with-post-path=/usr/openwin/bin" on Solaris is
- recommended for access to programs like Xnest.
- </para>
+ <para>Configurar GDM con "--with-post-path=/usr/openwin/bin" en Solaris está recomendado para acceder a programas como Xnest.</para>
</sect2>
<sect2 id="solarislogindevperm">
<title>Solaris /etc/logindevperm</title>
- <para>
- GDM supports /etc/logindevperm, but only on Solaris 10 and higher.
- Refer to the logindevperm.4 man page for more information.
- </para>
+ <para>GDM soporta /etc/logindevperm, pero sólo en Solaris 10 y superiores. Vea la página man logindevperm.4 para más información.</para>
- <para>
- To make /etc/logindevperm functionality work on Solaris 9 or
- earlier you would have to hack the GDM PreSession and
- PostSession script to chmod the device permissions directly. In
- other words, if /etc/logindevperm had a listing like this:
- </para>
+ <para>Para hacer funcionar /etc/logindevperm en Solaris 9 o anteriores, deberá haquear los scripts de GDM PreSession y PostSession para hacer un chmod a los permisos del dispositivo directamente. En otras palabras, si /etc/logindevperm se lista como esto:</para>
<screen>
/dev/console 0600 /dev/sound/* # audio devices
</screen>
- <para>
- The PreSession script would need to be modified to chown
- /dev/console to the user:group who is logging into the console
- and ensure whatever permissions is specified in /etc/logindevperm
- (0600 for the line above). Then in the PostSession script chmod
- the device back to root:root and ensure 0600 this time (do not
- use the value in the /etc/logindevperm file). Linux uses a
- different mechanism for managing device permissions, so this
- extra scripting is not needed.
- </para>
+ <para>El script de PreSession debería tener que modificarse para que haga chown de /dev/console al usuario:grupo de quien esté entrando en la consola y asegurarse cualesquiera de los permisos estén especificados en /etc/logindevperm (0600 para la línea de arriba). Después en el script PostSession volver a hacer un chmod del dispositivo a root:root y asegurarse de que los permisos son 0600 esta vez (no usar el valor en el archivo /etc/logindevperm esta vez). Linux usa un mecanismo diferente para gestionar los permisos de dispositivos, así que este script previo no es necesario.</para>
</sect2>
<sect2 id="solarisautomaticlogin">
@@ -4721,7 +4917,7 @@ GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
would only notice this problem if you try to make use of it.
Turning this feature on causes your computer to login to a
specified username on startup without asking for username
- and password. This is an unsecure way to set up your
+ and password. This is an insecure way to set up your
computer.
</para>
@@ -4800,15 +4996,10 @@ GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
<filename>appserver</filename>. You install GDM on both.
</para>
- <para>
- On <filename>appserver</filename> you enable XDMCP, so you have
-<screen>
+ <para>En <filename>appserver</filename> activa XDMCP, así que tiene <screen>
[xdmcp]
Enable=true
-</screen>
- If you want no local screens here, you can then
- make the <filename>[servers]</filename> section empty.
- </para>
+</screen> Si no quiere pantallas locales aquí, puede dejar vacía la sección <filename>[servers]</filename>.</para>
<para>
On the <filename>xterminal</filename> you disable XDMCP (you don't
@@ -4840,7 +5031,7 @@ handled=false
<sect2 id="terminallabtwo">
<title>Laboratorio con terminales con dos o más servidores</title>
- <para>Suponga que quiere hacer un laboratorio lleno de terminales X que todas se conectan a una selección de servidores. Por ahora llamémoslos <filename>appserveruno</filename> y<filename>appserverdos</filename>. De nuevo llamamos a nuestro servidor de terminales X <filename>xterminal</filename>. La configuración de ambos servidores es la mismoa que con el caso de un servidor en la sección anterior. No necesita activar explícitamente las consultas indirectas en el servidor debido a que ejecutamos los selectores localmente en las terminales X.</para>
+ <para>Suponga que quiere hacer un laboratorio lleno de terminales X que todas se conectan a una selección de servidores. Por ahora llamémoslos <filename>appserveruno</filename> y<filename>appserverdos</filename>. De nuevo llamamos a nuestro servidor de terminales X <filename>xterminal</filename>. La configuración de ambos servidores es la misma que con el caso de un servidor en la sección anterior. No necesita activar explícitamente las consultas indirectas en el servidor debido a que ejecutamos los selectores localmente en las terminales X.</para>
<para>
So on the <filename>xterminal</filename> you again disable XDMCP.
@@ -4896,6 +5087,102 @@ Hosts=appserverone,appservertwo
chooser to the other X terminals.
</para>
</sect2>
+
+ <sect2 id="customcommand">
+ <title>Defining Custom Commands</title>
+
+ <para>
+ Suppose you want to add a custom command to the GDM menu that will give
+ you the oportunity to boot into other operating system such as Windoze.
+ Jsut add the following options into the
+ <filename>[customcommand]</filename> section of the GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+ </screen>
+
+ CustomCommand0 specifies two commands separated by a semicolon:
+ <filename>/sbin/rebootwindoze</filename> and
+ <filename>/usr/local/sbin/rebootwindoze</filename>. GDM will use
+ the first valid command in the list. This allows different
+ commands for different operating systems to be included.
+ </para>
+ <para>
+ Note, that besides being able to customise this option to reboot into
+ different operating systems you can also use it to define your own
+ custom behaviours that you wish to run from the GDM menu. Suppose you
+ want to give users the oportunity to run system update scripts from the
+ login screen. Add the following options into the
+ <filename>[customcommand]</filename> section of your GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel0=_Update Me
+ CustomCommandLRLabel0=Update the system
+ CustomCommandText0=Are you sure you want to update the system software?
+ CustomCommandTooltip0=Updates the system
+ CustomCommandNoRestart0=true
+ </screen>
+ </para>
+
+ <para>
+ Both custom commands could be defined as follows.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+ </screen>
+ </para>
+
+ <para>
+ There can be up to 10 custom commands numbered 0-9.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+
+ CustomCommand3=/sbin/do_something
+ .
+ .
+ .
+
+ CustomCommand4=/sbin/do_something_else
+ .
+ .
+ .
+ </screen>
+ </para>
+ </sect2>
</sect1>
<sect1 id="troubleshooting">
@@ -4975,7 +5262,7 @@ Hosts=appserverone,appservertwo
language, in the <filename>~/.dmrc</filename>. Other files, such
as the user's <filename>~/.Xauthority</filename> file will also
affect login. GDM, by default, is strict about how it tries to
- access files in the users home directory, and will ignore the file if
+ access files in the user's home directory, and will ignore the file if
they do not conform to certain rules. You can use the
<filename>RelaxPermissions</filename> configuration option to
make GDM less strict about how it accesses files in the user's
diff --git a/docs/uk/gdm.xml b/docs/uk/gdm.xml
index 337ad839..1a2e58c9 100644
--- a/docs/uk/gdm.xml
+++ b/docs/uk/gdm.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
-<!ENTITY version "2.15.1">
+<!ENTITY version "2.17.0">
<!ENTITY date "05/12/2006">
]>
<article id="index" lang="uk">
@@ -72,7 +72,7 @@
<releaseinfo>
- This manual describes version 2.15.1 of the GNOME Display Manager.
+ This manual describes version 2.17.0 of the GNOME Display Manager.
It was last updated on 05/12/2006.
</releaseinfo>
</articleinfo>
@@ -81,7 +81,7 @@
<title>Терміни та домовленості використані у цьому посібнику</title>
<para>
- This manual describes version 2.15.1 of the GNOME Display Manager.
+ This manual describes version 2.17.0 of the GNOME Display Manager.
It was last updated on 05/12/2006.
</para>
@@ -129,8 +129,9 @@
(ServAuthDir, PidFile, etc.), system applications (SoundProgram), etc.
Some configuration values depend on OS interfaces may need to be
modified to work on a given OS. Typical examples are HaltCommand,
- RebootCommand, SuspendCommand, StandardXServer, Xnest, SoundProgram,
- and the "command" value for each "server-foo".
+ RebootCommand, CustomCommands, SuspendCommand, StandardXServer, Xnest,
+ SoundProgram, and the "command" value for each
+ "server-foo".
</para>
<para>
@@ -227,14 +228,14 @@
on legacy systems. After authenticating a user, the daemon runs the
<filename>PostLogin</filename> script as root, and forks a slave
process to start the requested session. This slave process runs the
- <filename>PreSession</filename> script as root, sets up the users
+ <filename>PreSession</filename> script as root, sets up the user's
environment, and starts the requested session. GDM keeps track of the
user's default session and language in the user's
<filename>~/.dmrc</filename> and will use these defaults if the user
did not pick a session or language in the login GUI. On Solaris, GDM
(since version 2.8.0.3) uses the SDTLOGIN interface after user
authentication to tell the X server to be restarted as the user instead
- of as root for added security. When the users session exits, the GDM
+ of as root for added security. When the user's session exits, the GDM
daemon will run the <filename>PostSession</filename> script as root.
</para>
</sect2>
@@ -435,7 +436,22 @@
configuration option.
</para>
- <para>Для керування відображенням портретів у конфігураційному файлі є декілька параметрів. Якщо параметр <filename>IncludeAll</filename> встановлено у true, тоді у параметрі <filename>Include</filename> вказується список розділених комою імен користувачів, які будуть відображатись. Не залежно від параметра <filename>IncludeAll</filename> не будуть відображатись будь-які користувачі, перелічені у списку <filename>Exclude</filename> та користувачі, ідентифікатор користувача (UID) яких менший за <filename>MinimalUID</filename>. <filename>IncludeAll</filename> не рекомендується для систем, на яких паролі передаються через мережу (наприклад NIS), тому що передавання великої кількості зображень через мережу може бути досить повільним.</para>
+ <para>
+ To control the users who get displayed in the face browser, there are
+ a number of configuration options that can be used. If the
+ <filename>IncludeAll</filename> option is set to true, then the
+ password file will be scanned and all users will be displayed. If
+ <filename>IncludeAll</filename> option is set to false, then the
+ <filename>Include</filename> option should contain a list of users
+ separated by commas. Only the users specified will be displayed.
+ Any user listed in the <filename>Exclude</filename> option and users
+ whose UID's is lower than <filename>MinimalUID</filename> will be
+ filtered out regardless of the <filename>IncludeAll</filename>
+ setting. <filename>IncludeAll</filename> is not recommended
+ for systems where the passwords are loaded over a network (such as
+ when NIS is used), since it can be very slow to load more than a
+ small number of users over the network..
+ </para>
<para>Якщо ввімкнено перегляд портретів, потенційному зловмиснику виставляється на показ список дійсних імен користувачів. Це погана ідея, якщо ви не знаєте хто може отримати доступ до екрану входу. Особливо це стосується випадку, коли використовується XDMCP (зазвичай вимкнено). </para>
</sect2>
@@ -451,7 +467,18 @@
<para>Можна позбутись виводу повідомлення про малу тривалість сеансу, якщо вернути код результату 66 із сценарію <filename>Xsession</filename> або двійкового файлу сеансу (типовий сценарій <filename>Xsession</filename> передає цей код назад). Це корисно, якщо у вас є особливий тип входу у сеанс, для якого тривалість сеансу менша за 10 секунд не є помилкою, або якщо ваш сеанс вже налаштований для відображення повідомлення про помилку, та повідомлення від gdm буде зайвим і буде збивати з пантелику.</para>
- <para>Інформація від сеансу перенаправляється через сервер GDM, тому GDM обмежує розмір файлу <filename>~/.xsession-errors</filename> значенням 200 кілобайт, щоб запобігти атакам на сеанс типу <quote>відмова у обслуговуванні</quote>. Програма могла б при читанні деяких неправильних даних виводити попередження та помилки у стандартний потік виводу чи у стандартний потік помилок. Це могло б призвести до заповнення домашнього каталогу користувача, якому б довелось вийти та зайти знову щоб очистити файл реєстрації. Це було б особливо неприємно, якщо встановлено дискові квоти. GDM також коректно перехоплює сигнал XFSZ та припиняє запис у файл, що могло б призвести до знищення сеансів, якщо файл був переправлений старим способом зі сценарію.</para>
+ <para>
+ The session output is piped through the GDM daemon and so the
+ <filename>~/.xsession-errors</filename> file is capped at about
+ 200 kilobytes by GDM to prevent a possible denial of service attack
+ on the session. An app could perhaps on reading some wrong data print
+ out warnings or errors on the stderr or stdout. This could perhaps
+ fill up the user's home directory who would then have to log out and
+ log back in to clear this. This could be especially nasty if quotas
+ are set. GDM also correctly traps the XFSZ signal and stops writing
+ the file, which would lead to killed sessions if the file was
+ redirected in the old fashioned way from the script.
+ </para>
<para>Зауважте, у деяких дистрибутивах перевизначають перенаправлення <filename>~/.xsession-errors</filename> та роблять перенаправлення у своєму власному сценарії Xsession (визначається конфігураційною змінною <filename>BaseXsession</filename>). Це означає, що GDM не зможе перехоплювати вивід та обмежувати цей файлу. Також ви втрачаєте інформацію, яка виводиться сценарієм <filename>PreSession</filename>, що може ускладнити налагодження та пошук помилки, бо частина інформації не буде виведена. Докладнішу інформацію дивіться у описі конфігураційного параметра <filename>BaseXsession</filename>, особливо спосіб обробки інформації від декількох менеджерів дисплеїв у одному сценарії.</para>
@@ -533,7 +560,7 @@
<para>
If there is no entry for GDM in your system's PAM configuration file,
then features like automatic login may not work. Not having an entry
- will causes GDM to use default behavior, conservative settings are
+ will cause GDM to use default behavior, conservative settings are
recommended and probably shipped with your distribution.
</para>
@@ -1039,7 +1066,7 @@ PostSession/
<para>
<filename>Xsession</filename> is a script which sets up a user session
- and then executes the users choice of session. Note that the session
+ and then executes the user's choice of session. Note that the session
script is typically started via the <filename>desktop</filename>
file associated with the session the user has picked. Some
sessions may start the user's session via a different mechanism than
@@ -1061,7 +1088,23 @@ PostSession/
<para>У цьому розділі описуються каталоги <filename>Init</filename>, <filename>PostLogin</filename>, <filename>PreSession</filename> та <filename>PostSession</filename>, котрі дуже подібні один до одного.</para>
- <para>Після успішного запуску X-сервера, GDM намагається запусти сценарій з назвою <filename>Init/&lt;displayname&gt;</filename>. Тобто <filename>Init/:0</filename> для першого локального дисплею. Якщо файл не існує, GDM намагається запустити сценарій <filename>Init/&lt;hostname&gt;</filename>. Тобто <filename>Init/somehost</filename>. Якщо він також не існує, GDM намагається виконати <filename>Init/XDMCP</filename> для всіх входів типу XDMCP, або <filename>Init/Flexi</filename> для всіх гнучких серверів за вимогою. Якщо жоден з них не існує, GDM запускає <filename>Init/Default</filename>. Сценарій запускається з правами адміністратора (root) та GDM блокується до його завершення. Використовуйте сценарії <filename>Init/*</filename> для програм, які допускають одночасний запуск з вікном входу GDM. Наприклад xconsole. Також у цьому файлі можуть використовуватись команди встановлення тла, тощо.</para>
+ <para>
+ When the X server has been successfully started, GDM will try to run
+ the script called <filename>Init/&lt;displayname&gt;</filename>. I.e.
+ <filename>Init/:0</filename> for the first local display. If this file
+ is not found, GDM will attempt to to run
+ <filename>Init/&lt;hostname&gt;</filename>. I.e.
+ <filename>Init/somehost</filename>.
+ If this still is not found, GDM will try
+ <filename>Init/XDMCP</filename> for all XDMCP logins or
+ <filename>Init/Flexi</filename> for all on demand flexible
+ displays. If none of the above were found, GDM will run
+ <filename>Init/Default</filename>. The script will be run as root and
+ GDM blocks until it terminates. Use the <filename>Init/*</filename>
+ script for applications that are supposed to run alongside with the GDM
+ login window. xconsole for instance. Commands to set the background
+ etc. go in this file too.
+ </para>
<para>Системний адміністратор може вказати, чи потрібно завершувати запущені у сценарії Init програми перед початком вибраного користувачем сеансу. Це контролюється параметром <filename>KillInitClients</filename>.</para>
@@ -1071,7 +1114,15 @@ PostSession/
<para>Після цього запускається основний сценарій <filename>Xsession</filename>, якому у першому аргументі передається вибраний виконуваний файл сеансу. Він запускається з правами користувача. Наявні виконувані файли сеансів беруться з рядка <filename>Exec=</filename> у <filename>.desktop</filename> файлах з каталогів вказаних у <filename>SessionDesktopDir</filename>. Зазвичай цей шлях такий: <filename>&lt;etc&gt;/X11/sessions/:&lt;etc&gt;/dm/Sessions:/usr/share/xsessions/</filename>. Використовується перший знайдений файл. Вподобання користувача або вибираються або з цих сеансів, або GDM шукає їх у файлі <filename>~/.dmrc</filename>.</para>
- <para>Цей сценарій повинен зчитати профіль користувача та виконати всю роботу, необхідну для встановлення сеансу. Через те, що у деяких системах скидається вибране користувачем у GDM значення мови, GDM також встановлює змінну оточення <filename>$GDM_LANG</filename> у вибране значення мови. Можна її використовувати для встановлення змінних оточення після запуску профілю, які відповідають за вибір мови. Якщо користувач вибрав системну мову, тоді <filename>$GDM_LANG</filename> не встановлюється.</para>
+ <para>
+ This script should really load the user's profile and generally do all
+ the voodoo that is needed to launch a session. Since many systems
+ reset the language selections done by GDM, GDM will also set the
+ <filename>$GDM_LANG</filename> variable to the selected language. You
+ can use this to reset the language environmental variables after you
+ run the user's profile. If the user elected to use the system language,
+ then <filename>$GDM_LANG</filename> is not set.
+ </para>
<para>Коли користувач завершує сеанс, знову виконується сценарій з <filename>PostSession</filename>. Всі дії такі самі як і у <filename>Init</filename>, <filename>PostLogin</filename> та <filename>PreSession</filename>. Знову ж таки сценарій запускається з правами адміністратора (root), допоміжний процес сервера блокується. Змінна оточення <filename>$USER</filename> містить ім'я користувача, який завершує сеанс, змінна оточення <filename>$DISPLAY</filename> буде встановлена у значення дисплею, але зверніть увагу, що X-сервер для цього дисплею може бути вже завершений, тому не слід намагатись отримати до нього доступ. Тут встановлена змінна оточення <filename>$X_SERVERS</filename>, вона має значення фальшивого згенерованого файлу x-сервера для використання з програмою обліку sessreg.</para>
@@ -1143,6 +1194,12 @@ PostSession/
<listitem>
<synopsis>AddGtkModules=false</synopsis>
<para>Якщо має значення true, це дозволяє запускати <command>gdmgreeter</command> чи <command>gdmlogin</command> з додатковими модулями Gtk+. Це корисно якщо необхідні додаткові властивості, наприклад підтримку спеціальних можливостей. Зверніть увагу, для мінімізації загроз безпеці повинні використовуватись лише "довірені" модулі.</para>
+ <para>
+ If true, then the registry daemon
+ <command>at-spi-registryd</command>
+ will be launched by <command>gdmgreeter</command> or
+ <command>gdmlogin</command> starting with version GDM 2.17.
+ </para>
<para>Зазвичай використовується для підтримки спеціальних можливостей. Модулі, які завантажуються, визначаються параметром <filename>GtkModulesList</filename>.</para>
</listitem>
</varlistentry>
@@ -1163,8 +1220,8 @@ PostSession/
If true, then when the user logs in and already has an
existing session, then they are connected to that session
rather than starting a new session. This only works for
- session's running on VT's (Virtual Terminals) started with
- gdmflexiserver, and not with XDMCP. Note that VT's are not
+ sessions running on VTs (Virtual Terminals) started with
+ gdmflexiserver, and not with XDMCP. Note that VTs are not
supported on all operating systems.
</para>
</listitem>
@@ -1239,7 +1296,7 @@ PostSession/
<para>Якщо встановлено значення false, то gdm не відображатиме повідомлення про помилки на консолі.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>DefaultPath</term>
<listitem>
@@ -1545,7 +1602,13 @@ PostSession/
<para>Якщо ви не використовуєте тильду, тоді назва створюваного файлу буде випадковою, подібна до <filename>UserAuthFBDir</filename>. Таким чином користувачі матимуть однаковий каталог аутентифікації. Наприклад, якщо домашній каталог користувача на NFS, ви можете встановити значення цього параметра <filename>/tmp</filename>, щоб файли cookie не передавались через мережу. Користувачі повинні мати право запису у цьому каталозі, та для цього каталогу має бути виставлений sticky-біт, як для каталогу <filename>/tmp</filename>.</para>
- <para>Зазвичай, якщо це домашній каталог користувачів, GDM не зберігатиме у ньому cookies, якщо вважатиме що він знаходиться на NFS (шляхом перевірки root-squashing). Це можна змінити призначивши параметру <filename>NeverPlaceCookiesOnNFS</filename> у розділі <filename>[security]</filename> значення false.</para>
+ <para>
+ Normally if this is the user's home directory GDM will still
+ refuse to put cookies there if it thinks it is NFS (by testing
+ root-squashing). This can be changed by setting
+ <filename>NeverPlaceCookiesOnNFS</filename> in the
+ <filename>[security]</filename> section to false.
+ </para>
</listitem>
</varlistentry>
@@ -1667,7 +1730,16 @@ PostSession/
<term>NeverPlaceCookiesOnNFS</term>
<listitem>
<synopsis>NeverPlaceCookiesOnNFS=true</synopsis>
- <para>Зазвичай, якщо встановлено значення true (типово), GDM не зберігає cookie к домашньому каталозі користувача, якщо каталог знаходиться на NFS. GDM вважатиме будь-яку файлову систему з root-squashing файловою системою NFS. Проте іноді віддалені файлова система може мати root squashing та бути безпечною (можливо, з використанням шифрування). У цьому випадку встановіть значення 'false'. Зауважте, що цей параметр з'явився у версії 2.4.4.4 та ігнорується попередніми версіями.</para>
+ <para>
+ Normally if this is true (which is by default), GDM will not
+ place cookies into the user's home directory if this directory
+ is on NFS. Well, GDM will consider any filesystem with
+ root-squashing an NFS filesystem. Sometimes however the remote
+ file system can have root squashing and be safe (perhaps by
+ using encryption). In this case set this to 'false'. Note
+ that this option appeared in version 2.4.4.4 and is ignored in
+ previous versions.
+ </para>
</listitem>
</varlistentry>
@@ -2030,7 +2102,14 @@ gdm:.my.domain
<term>DefaultFace</term>
<listitem>
<synopsis>DefaultFace=&lt;share&gt;/pixmaps/nophoto.png</synopsis>
- <para>Якщо користувач не визначив зображення для перегляду портретів, GDM використовує стандартний_значок з поточної теми GTK+. Якщо такий значок не визначений, використовується <filename>DefaultFace</filename>. Зображення має бути у форматі, який підтримує gdk-pixbuf та файл має бути доступним для читання користувачу GDM.</para>
+ <para>
+ If a user has no defined face image, GDM will use the
+ "stock_person" icon defined in the current GTK+
+ theme. If no such image is defined, the image specified by
+ <filename>DefaultFace</filename> will be used. The image must
+ be in a gdk-pixbuf supported format and the file must be
+ readable to the GDM user.
+ </para>
</listitem>
</varlistentry>
@@ -2149,7 +2228,13 @@ gdm:.my.domain
<term>Logo</term>
<listitem>
<synopsis>Logo=&lt;share&gt;/pixmaps/gnome-logo-large.png</synopsis>
- <para>Файл зображення, що відображається у діалоговому вікні. Файл має бути у форматі, який підтримується gdk-pixbuf та повинен бути доступний для читання користувачу GDM. Якщо файл не вказано, функція показу зображення вимикається. Цей параметр впливає лише на програму привітання на базі GTK+.</para>
+ <para>
+ Image file to display in the logo box. The file must be
+ in a gdk-pixbuf supported format and it must be readable by
+ the GDM user. If no file is specified the logo feature
+ is disabled.
+ This only affects the GTK+ Greeter.
+ </para>
</listitem>
</varlistentry>
@@ -2433,7 +2518,12 @@ gdm:.my.domain
<term>DefaultHostImage</term>
<listitem>
<synopsis>DefaultHostImage=&lt;share&gt;/pixmaps/nohost.png</synopsis>
- <para>Назва файлу типового значка. Це зображення відображатиметься, якщо для вказаного вузла не вказано власний значок. Файл повинен мати формат, який підтримується gdk-pixbuf, та користувач GDM повинен мати доступ на читання до нього.</para>
+ <para>
+ File name for the default host icon. This image will be
+ displayed if no icon is specified for a given host. The
+ file must be in a gdk-pixbuf supported format and it must be
+ readable for the GDM user.
+ </para>
</listitem>
</varlistentry>
@@ -2501,6 +2591,109 @@ gdm:.my.domain
</variablelist>
</sect3>
+ <sect3 id="customcmdsection">
+ <title>Custom Commands</title>
+
+ <para>
+ You can create up to 10 different commands. Gaps between command
+ numbers are allowed and their relative positioning within the
+ section is not important as long as they conform to the permitted
+ range of [0-9].
+
+ </para>
+
+ <variablelist>
+ <title>[customcommand]</title>
+
+ <varlistentry>
+ <term>CustomCommand[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommand[0-9]=</synopsis>
+ <para>
+ Full path and arguments to command to be executed when user
+ selects n-th "Custom Command" from the Actions menu.
+ This can be a ';' separated list of commands to try. If the
+ value is empty or missing, then the custom command is not
+ available. By default this value is not enabled, so to enable
+ "Custom Command" it must be set to a nonempty value.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> "Custom Command"
+ buttons and menu items. If not specified the default value is
+ "_Custom[0-9]". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandLRLabel[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandLRLabel[0-9]=</synopsis>
+ <para>
+ Specifies the stock label that will be displayed on the
+ <filename>n-th</filename> "Custom Command"
+ list items and radio buttons. If not specified the default
+ value is "Execute _custom command [0-9]". This
+ option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandNoRestart[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandNoRestart[0-9]=</synopsis>
+ <para>
+ Specifies if gdm will be stopped/restarted once
+ <filename>n-th</filename> "Custom Command"
+ has been executed. If not specified the default value is
+ "false". This option is only valid if corresponding
+ <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandText[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandText[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on the warning
+ dialog box once <filename>n-th</filename>
+ "Custom Command" button/menu item/radio button/list
+ item has been activated. If not specified the default value is
+ "Are you sure?". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>CustomCommandTooltip[0-9]</term>
+ <listitem>
+ <synopsis>CustomCommandTooltip[0-9]=</synopsis>
+ <para>
+ Specifies the message that will be displayed on tooltips for
+ <filename>n-th</filename> "Custom Command"
+ entries. If not specified the default value is "Execute
+ custom command [0-9]". This option is only valid if
+ corresponding <filename>CustomCommand</filename> is defined.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect3>
+
<sect3 id="serverdefs">
<title>X Server Definitions</title>
@@ -3127,8 +3320,8 @@ QUERY_LOGOUT_ACTION: Query which logout actions are possible
Supported since: 2.5.90.0
Answers:
OK &lt;action&gt;;&lt;action&gt;;...
- Where action is one of HALT, REBOOT or SUSPEND. An
- empty list can also be returned if no action is possible.
+ Where action is one of HALT, REBOOT, SUSPEND or CUSTOM_CMD[0-9].
+ An empty list can also be returned if no action is possible.
A '!' is appended to an action if it was already set with
SET_LOGOUT_ACTION or SET_SAFE_LOGOUT_ACTION. Note that
SET_LOGOUT_ACTION has precedence over
@@ -3227,10 +3420,11 @@ SET_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend after
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -3257,10 +3451,11 @@ SET_SAFE_LOGOUT_ACTION: Tell the daemon to halt/restart/suspend
connections that passed AUTH_LOCAL.
Supported since: 2.5.90.0
Arguments: &lt;action&gt;
- NONE Set exit action to 'none'
- HALT Set exit action to 'halt'
- REBOOT Set exit action to 'reboot'
- SUSPEND Set exit action to 'suspend'
+ NONE Set exit action to 'none'
+ HALT Set exit action to 'halt'
+ REBOOT Set exit action to 'reboot'
+ SUSPEND Set exit action to 'suspend'
+ CUSTOM_CMD[0-9] Set exit action to 'custom command [0-9]'
Answers:
OK
ERROR &lt;err number&gt; &lt;english error description&gt;
@@ -4137,14 +4332,48 @@ homogeneous="bool"&gt;
</varlistentry>
</variablelist>
+ <para>
+ List items by default display as lists, but the combo="true" attribute
+ can be used to specify combo box style (combo style supported since GDM 2.18).
+ Some predefined lists may be included in a theme by using the following id values.
+ Customized lists may also be defined, which are explained below.
+ </para>
- <para>Елементи списку можуть мати такі значення:</para>
+ <variablelist>
+ <varlistentry>
+ <term>session</term>
+ <listitem>
+ <para>
+ A list of available sessions, which allows the user to pick
+ the session to use. Supported since GDM 2.18.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <variablelist>
+ <varlistentry>
+ <term>language</term>
+ <listitem>
+ <para>
+ A list of available languages, which allows the user to pick
+ the language to use. Supported since GDM 2.18.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<variablelist>
<varlistentry>
<term>userlist</term>
<listitem>
- <para>Елемент перегляду портретів. Ці користувачі можуть вибирати їх ім'я користувача натискаючи на портреті.</para>
+ <para>
+ A Face Browser list, so that users can pick their username
+ by clicking on this instead of typing. This obviously exposes
+ the usernames to viewers of the login screen, and is not
+ recommended for users who feel that this reduces security.
+ The face browser does not support combo box style.
+ </para>
</listitem>
</varlistentry>
</variablelist>
@@ -4190,7 +4419,7 @@ homogeneous="bool"&gt;
An image that will be displayed only when a pam-error message
is being displayed. This is useful for displaying an
"Attention" icon, for example. This feature is
- supported in GDM 2.14.6 and later.
+ supported in GDM 2.14.6 and later.
</para>
</listitem>
</varlistentry>
@@ -4233,7 +4462,9 @@ homogeneous="bool"&gt;
</screen>
</para>
- <para>Можливі значення для кнопок:</para>
+ <para>
+ Possible values for button ids are as follows.
+ </para>
<variablelist>
<varlistentry>
@@ -4251,6 +4482,15 @@ homogeneous="bool"&gt;
</varlistentry>
<varlistentry>
+ <term>custom_cmd_button[0-9]</term>
+ <listitem>
+ <para>
+ Runs the <filename>n-th</filename> custom command.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>disconnect_button</term>
<listitem>
<para>Відключає від віддаленого сеансу.</para>
@@ -4384,6 +4624,10 @@ homogeneous="bool"&gt;
"true" in the GDM configuration.
</para>
<para>
+ <filename>custom_cmd[0-9]</filename>, if <filename>n-th</filename>
+ CustomCommand is specified in the GDM configuration.
+ </para>
+ <para>
<filename>halt</filename>, if HaltDaemon is specified in
the GDM configuration.
</para>
@@ -4532,6 +4776,9 @@ homogeneous="bool"&gt;
<filename>config</filename>, _("_Configure"
</para>
<para>
+ <filename>custom_cmd[0-9]</filename>, _("_Custom[0-9]"
+ </para>
+ <para>
<filename>disconnect</filename>, _("D_isconnect"
</para>
<para>
@@ -4584,9 +4831,23 @@ homogeneous="bool"&gt;
<sect3 id="customwidgetry">
<title>Власні віджети</title>
- <para>Наразі є один елемент, який може налаштовуватись - це список елементів. Якщо треба запитати у користувача додаткову інформацію, таку як вибір місця входу з і списку, або встановити власні сеанси входу ви можете налаштувати елемент списку та додати дочірній елемент списку, який описує вибір. Кожен елемент списку повинен мати ідентифікатор та дочірній елемент text. Вибір буде записано у файл <filename>&lt;ServAuthDir&gt;/&lt;display&gt;.GreeterInfo</filename> у вигляді <filename>&lt;list id&gt;=&lt;listitem id&gt;</filename>.</para>
+ <para>
+ Currently there is one item which is customizable and this is
+ the list item. If you need to ask the user extra things, such as
+ to pick from a list of places to log into, or set of custom login
+ sessions you can setup the list item and add listitem children that
+ describe the choices. Each listitem must have an id and a text
+ child. The choice will be recorded in the file
+ <filename>&lt;ServAuthDir&gt;/&lt;display&gt;.GreeterInfo</filename>
+ as <filename>&lt;list id&gt;=&lt;listitem id&gt;</filename>.
+ </para>
- <para>Наприклад, припустимо, ви на дисплеї :0, <filename>ServAuthDir</filename> дорівнює <filename>&lt;var&gt;/gdm</filename> та у вас наступна тема:</para>
+ <para>
+ For example suppose we are on display :0,
+ <filename>ServAuthDir</filename> is
+ <filename>&lt;var&gt;/lib/gdm</filename> and we have the following in the
+ theme:
+ </para>
<screen>
&lt;item type="list" id="custom-config"&gt;
@@ -4602,7 +4863,7 @@ homogeneous="bool"&gt;
<para>
Then if the user chooses 'Foo' then
- <filename>&lt;var&gt;/gdm/:0.GreeterInfo</filename> will contain:
+ <filename>&lt;var&gt;/lib/gdm/:0.GreeterInfo</filename> will contain:
<screen>
custom-config=foo
</screen>
@@ -4676,6 +4937,13 @@ GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
</screen>
<para>
+ The use of assistive technologies and the atk-bridge module
+ requires the registry daemon, <command>at-spi-registryd</command>,
+ to be running. This is handled by the GDM GUI starting with
+ version 2.17.
+ </para>
+
+ <para>
System administrators may wish to load only the minimum subset of
these modules which is required to support their user base.
Depending on the end-user needs, not all of the above GtkModules
@@ -4846,7 +5114,7 @@ GtkModulesList=gail:atk-bridge:dwellmouselistener:keymouselistener
would only notice this problem if you try to make use of it.
Turning this feature on causes your computer to login to a
specified username on startup without asking for username
- and password. This is an unsecure way to set up your
+ and password. This is an insecure way to set up your
computer.
</para>
@@ -5025,6 +5293,102 @@ Hosts=appserverone,appservertwo
chooser to the other X terminals.
</para>
</sect2>
+
+ <sect2 id="customcommand">
+ <title>Defining Custom Commands</title>
+
+ <para>
+ Suppose you want to add a custom command to the GDM menu that will give
+ you the oportunity to boot into other operating system such as Windoze.
+ Jsut add the following options into the
+ <filename>[customcommand]</filename> section of the GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+ </screen>
+
+ CustomCommand0 specifies two commands separated by a semicolon:
+ <filename>/sbin/rebootwindoze</filename> and
+ <filename>/usr/local/sbin/rebootwindoze</filename>. GDM will use
+ the first valid command in the list. This allows different
+ commands for different operating systems to be included.
+ </para>
+ <para>
+ Note, that besides being able to customise this option to reboot into
+ different operating systems you can also use it to define your own
+ custom behaviours that you wish to run from the GDM menu. Suppose you
+ want to give users the oportunity to run system update scripts from the
+ login screen. Add the following options into the
+ <filename>[customcommand]</filename> section of your GDM configuration
+ file.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel0=_Update Me
+ CustomCommandLRLabel0=Update the system
+ CustomCommandText0=Are you sure you want to update the system software?
+ CustomCommandTooltip0=Updates the system
+ CustomCommandNoRestart0=true
+ </screen>
+ </para>
+
+ <para>
+ Both custom commands could be defined as follows.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+ </screen>
+ </para>
+
+ <para>
+ There can be up to 10 custom commands numbered 0-9.
+
+ <screen>
+ [customcommand]
+ CustomCommand0=/sbin/rebootwindoze;/usr/local/sbin/rebootwindoze
+ CustomCommandLabel0=_Windoze
+ CustomCommandLRLabel0=Reboot into _Windoze
+ CustomCommandText0=Are you sure you want to restart the computer into Windoze?
+ CustomCommandTooltip0=Restarts the computer into Windoze
+
+ CustomCommand1=/sbin/updatesystem;/usr/local/sbin/updatesystem
+ CustomCommandLabel1=_Update Me
+ CustomCommandLRLabel1=Update the system
+ CustomCommandText1=Are you sure you want to update the system software?
+ CustomCommandTooltip1=Updates the system
+ CustomCommandNoRestart1=true
+
+ CustomCommand3=/sbin/do_something
+ .
+ .
+ .
+
+ CustomCommand4=/sbin/do_something_else
+ .
+ .
+ .
+ </screen>
+ </para>
+ </sect2>
</sect1>
<sect1 id="troubleshooting">
@@ -5111,7 +5475,7 @@ Hosts=appserverone,appservertwo
language, in the <filename>~/.dmrc</filename>. Other files, such
as the user's <filename>~/.Xauthority</filename> file will also
affect login. GDM, by default, is strict about how it tries to
- access files in the users home directory, and will ignore the file if
+ access files in the user's home directory, and will ignore the file if
they do not conform to certain rules. You can use the
<filename>RelaxPermissions</filename> configuration option to
make GDM less strict about how it accesses files in the user's
diff --git a/gui/gdmcommon.c b/gui/gdmcommon.c
index 21f374d1..a2a57f50 100644
--- a/gui/gdmcommon.c
+++ b/gui/gdmcommon.c
@@ -622,45 +622,33 @@ filter_watch (GdkXEvent *xevent, GdkEvent *event, gpointer data){
return GDK_FILTER_CONTINUE;
}
-
-static void
-error_dialog (void)
-{
- GtkWidget *dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Assistive technology support has been requested for this session, but the accessibility registry was not found. Please ensure that the AT-SPI package is installed. Your session has been started without assistive technology support."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-}
-
-
-
static gboolean
filter_timeout (gpointer data)
{
- error_dialog ();
+ gdm_common_info (_("The accessibility registry was not found."));
gtk_main_quit ();
return FALSE;
}
-
void
gdm_common_atspi_launch (void)
{
GdkWindow *w = gdk_get_default_root_window ();
+ gboolean a11y = gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES);
guint tid;
+
+ if (! a11y)
+ return;
if ( ! AT_SPI_IOR)
AT_SPI_IOR = XInternAtom (GDK_DISPLAY (), "AT_SPI_IOR", False);
gdk_window_set_events (w, GDK_PROPERTY_CHANGE_MASK);
- if ( ! pre_atspi_launch ()){
- error_dialog ();
+ if ( ! pre_atspi_launch ()) {
+ gdm_common_info (_("The accessibility registry could not be started."));
return;
}
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index 3f19982a..89b19d9f 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -669,6 +669,21 @@ gdm_login_restart_handler (void)
}
}
+static void
+gdm_custom_cmd_handler (GtkWidget *widget, gint *cmd_id)
+{
+ if (cmd_id) {
+ gchar * key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, *cmd_id);
+ if (gdm_wm_warn_dialog (
+ gdm_config_get_string (key_string) , "", GTK_STOCK_OK, NULL, TRUE) == GTK_RESPONSE_YES) {
+
+ printf ("%c%c%c%d\n", STX, BEL, GDM_INTERRUPT_CUSTOM_CMD, *cmd_id);
+ fflush (stdout);
+ }
+
+ g_free (key_string);
+ }
+}
static void
gdm_login_halt_handler (void)
@@ -2379,6 +2394,25 @@ gdm_login_gui_init (void)
got_anything = TRUE;
}
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if (gdm_working_command_exists (gdm_config_get_string (key_string))) {
+ gint * cmd_index = g_new0(gint, 1);
+ *cmd_index = i;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ item = gtk_menu_item_new_with_mnemonic (gdm_config_get_string (key_string));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ g_signal_connect (G_OBJECT (item), "activate",
+ G_CALLBACK (gdm_custom_cmd_handler),
+ cmd_index);
+ gtk_widget_show (GTK_WIDGET (item));
+ got_anything = TRUE;
+ }
+ }
+ g_free (key_string);
+
if (gdm_working_command_exists (gdm_config_get_string (GDM_KEY_HALT))) {
item = gtk_menu_item_new_with_mnemonic (_("Shut _Down"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
@@ -2976,6 +3010,27 @@ gdm_read_config (void)
gdm_config_get_string (GDM_KEY_USE_24_CLOCK);
gdm_config_get_string (GDM_KEY_WELCOME);
+ /* String keys for custom commands */
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+ }
+ g_free (key_string);
+
gdm_config_get_int (GDM_KEY_BACKGROUND_TYPE);
gdm_config_get_int (GDM_KEY_BACKGROUND_PROGRAM_INITIAL_DELAY);
gdm_config_get_int (GDM_KEY_BACKGROUND_PROGRAM_RESTART_DELAY);
@@ -3104,6 +3159,45 @@ gdm_reread_config (int sig, gpointer data)
return TRUE;
}
+ /* Keys for custom commands */
+ register int i = 0;
+ gboolean custom_changed = FALSE;
+ gchar *key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if(gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ if(gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ if(gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, i);
+ if(gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i);
+ if(gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+ }
+ g_free (key_string);
+
+ if(custom_changed){
+ /* Set busy cursor */
+ gdm_common_setup_cursor (GDK_WATCH);
+
+ gdm_wm_save_wm_order ();
+ gdm_kill_thingies ();
+ gdmcomm_comm_bulk_stop ();
+
+ _exit (DISPLAY_RESTARTGREETER);
+ return TRUE;
+ }
+
if (gdm_config_reload_string (GDM_KEY_BACKGROUND_IMAGE) ||
gdm_config_reload_string (GDM_KEY_BACKGROUND_COLOR) ||
gdm_config_reload_int (GDM_KEY_BACKGROUND_TYPE) ||
@@ -3113,7 +3207,7 @@ gdm_reread_config (int sig, gpointer data)
gdm_kill_thingies ();
setup_background ();
back_prog_launch_after_timeout ();
- }
+ }
gdm_config_reload_string (GDM_KEY_SOUND_PROGRAM);
gdm_config_reload_bool (GDM_KEY_SOUND_ON_LOGIN);
diff --git a/gui/gdmsetup.c b/gui/gdmsetup.c
index ac4ba519..7f9e473a 100644
--- a/gui/gdmsetup.c
+++ b/gui/gdmsetup.c
@@ -578,7 +578,7 @@ xservers_get_displays (GtkListStore *store)
XSERVER_COLUMN_SERVER, server,
XSERVER_COLUMN_OPTIONS, options,
-1);
- g_free(server);
+ g_free (server);
}
for (li = displays; li != NULL; li = li->next) {
gchar *disp = li->data;
@@ -3542,7 +3542,7 @@ selected_toggled (GtkCellRendererToggle *cell,
} else { /* Checkboxes */
/* Clear list of all selected themes */
- g_free(selected_themes);
+ g_free (selected_themes);
selected_themes = NULL;
/* Loop through all checkboxes */
@@ -3576,7 +3576,7 @@ selected_toggled (GtkCellRendererToggle *cell,
selected_themes = strings_list_add (selected_themes,
theme_name, GDM_DELIMITER_THEMES);
- g_free(theme_name);
+ g_free (theme_name);
gtk_tree_path_next (path);
}
@@ -4381,7 +4381,7 @@ xserver_toggle_timeout (GtkWidget *toggle)
break;
}
}
- g_free(section);
+ g_free (section);
return FALSE;
}
diff --git a/gui/greeter/greeter.c b/gui/greeter/greeter.c
index 01da7bf5..495534df 100644
--- a/gui/greeter/greeter.c
+++ b/gui/greeter/greeter.c
@@ -70,6 +70,8 @@ gboolean GDM_IS_LOCAL = FALSE;
static gboolean ignore_buttons = FALSE;
gboolean GdmHaltFound = FALSE;
gboolean GdmRebootFound = FALSE;
+gboolean *GdmCustomCmdsFound = NULL;
+gboolean GdmAnyCustomCmdsFound = FALSE;
gboolean GdmSuspendFound = FALSE;
gboolean GdmConfiguratorFound = FALSE;
@@ -775,6 +777,28 @@ gdm_read_config (void)
gdm_config_get_bool (GDM_KEY_DEFAULT_REMOTE_WELCOME);
gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES);
+ /* Keys for custom commands */
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i);
+ gdm_config_get_string (key_string);
+ }
+
+ g_free (key_string);
+
/* Keys not to include in reread_config */
gdm_config_get_string (GDM_KEY_SESSION_DESKTOP_DIR);
gdm_config_get_string (GDM_KEY_PID_FILE);
@@ -845,6 +869,43 @@ greeter_reread_config (int sig, gpointer data)
_exit (DISPLAY_RESTARTGREETER);
}
+ register int i = 0;
+ gboolean custom_changed = FALSE;
+ gchar *key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ if (gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ if (gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ if (gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, i);
+ if (gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i);
+ if (gdm_config_reload_string (key_string))
+ custom_changed = TRUE;
+ }
+
+ g_free (key_string);
+
+ if(custom_changed){
+ /* Set busy cursor */
+ gdm_common_setup_cursor (GDK_WATCH);
+
+ gdm_wm_save_wm_order ();
+ gdmcomm_comm_bulk_stop ();
+
+ _exit (DISPLAY_RESTARTGREETER);
+ }
+
gdm_config_reload_string (GDM_KEY_SOUND_PROGRAM);
gdm_config_reload_bool (GDM_KEY_SOUND_ON_LOGIN);
gdm_config_reload_string (GDM_KEY_SOUND_ON_LOGIN_FILE);
@@ -1051,9 +1112,9 @@ main (int argc, char *argv[])
*/
gdk_init (&argc, &argv);
if (! DOING_GDM_DEVELOPMENT) {
- gdm_common_atspi_launch ();
+ gdm_common_atspi_launch ();
}
-
+
gtk_init (&argc, &argv);
gdm_common_setup_cursor (GDK_WATCH);
@@ -1158,12 +1219,23 @@ main (int argc, char *argv[])
* is displayed it doesn't show as 0. Also determine if the Halt,
* Reboot, Suspend and Configurator commands work.
*/
- gdm_timed_delay = gdm_config_get_int (GDM_KEY_TIMED_LOGIN_DELAY);
- GdmHaltFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_HALT));
- GdmRebootFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_REBOOT));
- GdmSuspendFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_SUSPEND));
- GdmConfiguratorFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_CONFIGURATOR));
-
+ gdm_timed_delay = gdm_config_get_int (GDM_KEY_TIMED_LOGIN_DELAY);
+ GdmHaltFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_HALT));
+ GdmRebootFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_REBOOT));
+ GdmSuspendFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_SUSPEND));
+ GdmConfiguratorFound = gdm_working_command_exists (gdm_config_get_string (GDM_KEY_CONFIGURATOR));
+
+ GdmCustomCmdsFound = g_new0 (gboolean, GDM_CUSTOM_COMMAND_MAX);
+ register int i = 0;
+ gchar * key_string = NULL;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ /* For each possible custom command */
+ key_string = g_strdup_printf(_("%s%d="), GDM_KEY_CUSTOM_CMD_TEMPLATE, i);
+ GdmCustomCmdsFound[i] = gdm_working_command_exists (gdm_config_get_string (key_string));
+ if (GdmCustomCmdsFound[i])
+ GdmAnyCustomCmdsFound = TRUE;
+ }
+ g_free (key_string);
if (g_getenv ("GDM_THEME") != NULL)
gdm_graphical_theme = g_strdup (g_getenv ("GDM_THEME"));
diff --git a/gui/greeter/greeter_configuration.h b/gui/greeter/greeter_configuration.h
index b51a4024..51ab82fe 100644
--- a/gui/greeter/greeter_configuration.h
+++ b/gui/greeter/greeter_configuration.h
@@ -29,10 +29,17 @@ extern gboolean GdmConfigAvailable;
extern gboolean GdmChooserButton;
extern gchar *GdmHalt;
extern gchar *GdmReboot;
+extern gchar *GdmCustomCmdText;
+extern gchar *GdmCustomCmdLabel;
+extern gchar *GdmCustomCmdLRLabel;
+extern gchar *GdmCustomCmdTooltip;
extern gchar *GdmSuspend;
extern gchar *GdmConfigurator;
extern gboolean GdmHaltFound;
extern gboolean GdmRebootFound;
+extern gboolean GdmCustomCmdFound;
+extern gboolean *GdmCustomCmdsFound;
+extern gboolean GdmAnyCustomCmdsFound;
extern gboolean GdmSuspendFound;
extern gboolean GdmConfiguratorFound;
extern gchar *GdmSessionDir;
diff --git a/gui/greeter/greeter_item.c b/gui/greeter/greeter_item.c
index 55bc2cbf..0fa14a3c 100644
--- a/gui/greeter/greeter_item.c
+++ b/gui/greeter/greeter_item.c
@@ -35,6 +35,8 @@
extern gboolean GdmHaltFound;
extern gboolean GdmRebootFound;
+extern gboolean GdmCustomCmdFound;
+extern gboolean *GdmCustomCmdsFound;
extern gboolean GdmSuspendFound;
extern gboolean GdmConfiguratorFound;
@@ -156,6 +158,8 @@ greeter_item_is_visible (GreeterItemInfo *info)
static gboolean GDM_IS_LOCAL = FALSE;
static gboolean GDM_FLEXI_SERVER = FALSE;
gboolean sysmenu = FALSE;
+ gchar *key_string = NULL;
+ int i = 0;
if ( ! checked)
{
@@ -209,6 +213,17 @@ greeter_item_is_visible (GreeterItemInfo *info)
strcmp (info->show_type, "suspend") == 0))
return FALSE;
+ for (i=0; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ key_string = g_strdup_printf (_("custom_cmd%d"), i);
+ if (( ! sysmenu || ! GdmCustomCmdsFound[i]) &&
+ (info->show_type != NULL &&
+ strcmp (info->show_type, key_string) == 0)) {
+ g_free (key_string);
+ return FALSE;
+ }
+ }
+ g_free (key_string);
+
if (( ! gdm_config_get_bool (GDM_KEY_TIMED_LOGIN_ENABLE) ||
ve_string_empty (gdm_config_get_string (GDM_KEY_TIMED_LOGIN)) ||
NULL == g_getenv("GDM_TIMED_LOGIN_OK")) &&
diff --git a/gui/greeter/greeter_parser.c b/gui/greeter/greeter_parser.c
index 642c07a5..0431f2df 100644
--- a/gui/greeter/greeter_parser.c
+++ b/gui/greeter/greeter_parser.c
@@ -34,6 +34,7 @@
#include "greeter_configuration.h"
#include "greeter_parser.h"
#include "greeter_events.h"
+#include "gdm.h"
/* FIXME: hack */
extern GreeterItemInfo *welcome_string_info;
@@ -354,7 +355,7 @@ parse_stock (xmlNodePtr node,
{
g_free (*translated_text);
*translated_text = g_strdup (_("_Restart"));
- }
+ }
else if (g_ascii_strcasecmp ((char *) prop, "chooser") == 0)
{
g_free (*translated_text);
@@ -411,12 +412,32 @@ parse_stock (xmlNodePtr node,
}
else
{
- g_set_error (error,
- GREETER_PARSER_ERROR,
- GREETER_PARSER_ERROR_BAD_SPEC,
- "Bad stock label type");
- xmlFree (prop);
- return FALSE;
+ gboolean is_error = TRUE;
+ register int i = 0;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ gchar * key_string = NULL;
+ key_string = g_strdup_printf (_("custom_cmd%d"), i);
+ if (g_ascii_strcasecmp ((char *) prop, key_string) == 0) {
+ g_free (*translated_text);
+ g_free (key_string);
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ *translated_text = g_strdup(gdm_config_get_string (key_string));
+ g_free (key_string);
+ is_error = FALSE;
+ break;
+ }
+ g_free (key_string);
+ }
+
+ if (is_error)
+ {
+ g_set_error (error,
+ GREETER_PARSER_ERROR,
+ GREETER_PARSER_ERROR_BAD_SPEC,
+ "Bad stock label type");
+ xmlFree (prop);
+ return FALSE;
+ }
}
/* This is the very very very best "translation" */
diff --git a/gui/greeter/greeter_system.c b/gui/greeter/greeter_system.c
index 1c4b586f..07c2e5d8 100644
--- a/gui/greeter/greeter_system.c
+++ b/gui/greeter/greeter_system.c
@@ -36,11 +36,13 @@
#include "gdmwm.h"
#include "misc.h"
-GtkWidget *dialog;
-extern gboolean GdmHaltFound;
-extern gboolean GdmRebootFound;
-extern gboolean GdmSuspendFound;
-extern gboolean GdmConfiguratorFound;
+GtkWidget *dialog;
+extern gboolean GdmHaltFound;
+extern gboolean GdmRebootFound;
+extern gboolean *GdmCustomCmdsFound;
+extern gboolean GdmAnyCustomCmdsFound;
+extern gboolean GdmSuspendFound;
+extern gboolean GdmConfiguratorFound;
/* doesn't check for executability, just for existance */
static gboolean
@@ -79,6 +81,20 @@ query_greeter_restart_handler (void)
}
static void
+query_greeter_custom_cmd_handler (GtkWidget *widget, gint *cmd_id)
+{
+ if (cmd_id) {
+ gchar * key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TEXT_TEMPLATE, *cmd_id);
+ if (gdm_wm_warn_dialog (gdm_config_get_string (key_string) , "",
+ GTK_STOCK_OK, NULL, TRUE) == GTK_RESPONSE_YES) {
+ printf ("%c%c%c%d\n", STX, BEL, GDM_INTERRUPT_CUSTOM_CMD, *cmd_id);
+ fflush (stdout);
+ }
+ g_free (key_string);
+ }
+}
+
+static void
query_greeter_halt_handler (void)
{
if (gdm_wm_warn_dialog (_("Are you sure you want to Shut Down the computer?"), "",
@@ -107,6 +123,12 @@ greeter_restart_handler (void)
_exit (DISPLAY_REBOOT);
}
+static void
+greeter_custom_cmd_handler (gint cmd_id)
+{
+ printf ("%c%c%c%d\n", STX, BEL, GDM_INTERRUPT_CUSTOM_CMD, cmd_id);
+ fflush (stdout);
+}
static void
greeter_halt_handler (void)
@@ -174,7 +196,7 @@ greeter_system_append_system_menu (GtkWidget *menu)
NULL);
}
- if (GdmRebootFound || GdmHaltFound || GdmSuspendFound) {
+ if (GdmRebootFound || GdmHaltFound || GdmSuspendFound || GdmAnyCustomCmdsFound) {
sep = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), sep);
gtk_widget_show (sep);
@@ -191,6 +213,25 @@ greeter_system_append_system_menu (GtkWidget *menu)
NULL);
}
+ if (GdmAnyCustomCmdsFound) {
+ register int i = 0;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ if (GdmCustomCmdsFound[i]){
+ gint * cmd_index = g_new0(gint, 1);
+ *cmd_index = i;
+ gchar * key_string = NULL;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LABEL_TEMPLATE, i);
+ w = gtk_menu_item_new_with_mnemonic (gdm_config_get_string(key_string));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
+ gtk_widget_show (GTK_WIDGET (w));
+ g_signal_connect (G_OBJECT (w), "activate",
+ G_CALLBACK (query_greeter_custom_cmd_handler),
+ cmd_index);
+ g_free (key_string);
+ }
+ }
+ }
+
if (GdmHaltFound) {
w = gtk_image_menu_item_new_with_mnemonic (_("Shut _Down"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (w),
@@ -238,10 +279,11 @@ greeter_system_handler (GreeterItemInfo *info,
GtkWidget *halt_radio = NULL;
GtkWidget *suspend_radio = NULL;
GtkWidget *restart_radio = NULL;
+ GtkWidget **custom_cmds_radio = NULL;
GtkWidget *config_radio = NULL;
GtkWidget *chooser_radio = NULL;
gchar *s;
- int ret;
+ int ret, i;
GSList *radio_group = NULL;
static GtkTooltips *tooltips = NULL;
@@ -322,6 +364,33 @@ greeter_system_handler (GreeterItemInfo *info,
gtk_widget_show (restart_radio);
}
+ if (GdmAnyCustomCmdsFound) {
+ custom_cmds_radio = g_new0 (GtkWidget*, GDM_CUSTOM_COMMAND_MAX);
+ for (i = 0; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ custom_cmds_radio[i] = NULL;
+ if (GdmCustomCmdsFound[i]){
+ gchar * key_string = NULL;
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_LR_LABEL_TEMPLATE, i);
+ radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (group_radio));
+ custom_cmds_radio[i] = gtk_radio_button_new_with_mnemonic (radio_group,
+ gdm_config_get_string(key_string));
+ group_radio = custom_cmds_radio[i];
+ g_free (key_string);
+ key_string = g_strdup_printf (_("%s%d="), GDM_KEY_CUSTOM_CMD_TOOLTIP_TEMPLATE, i);
+ gtk_tooltips_set_tip (tooltips, GTK_WIDGET (custom_cmds_radio[i]),
+ gdm_config_get_string(key_string),
+ NULL);
+ g_signal_connect (G_OBJECT(custom_cmds_radio[i]), "button_press_event",
+ G_CALLBACK(radio_button_press_event), NULL);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ custom_cmds_radio[i],
+ FALSE, FALSE, 4);
+ gtk_widget_show (custom_cmds_radio[i]);
+ g_free (key_string);
+ }
+ }
+ }
+
if (GdmSuspendFound) {
if (group_radio != NULL)
radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (group_radio));
@@ -411,6 +480,11 @@ greeter_system_handler (GreeterItemInfo *info,
greeter_config_handler ();
else if (chooser_radio != NULL && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (chooser_radio)))
greeter_chooser_handler ();
+ else
+ for (i = 0; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ if (custom_cmds_radio[i] != NULL && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (custom_cmds_radio[i])))
+ greeter_custom_cmd_handler (i);
+ }
gtk_widget_destroy (dialog);
}
@@ -421,7 +495,7 @@ greeter_item_system_setup (void)
{
greeter_item_register_action_callback ("reboot_button",
(ActionFunc)query_greeter_restart_handler,
- NULL);
+ NULL);
greeter_item_register_action_callback ("halt_button",
(ActionFunc)query_greeter_halt_handler,
NULL);
@@ -437,4 +511,15 @@ greeter_item_system_setup (void)
greeter_item_register_action_callback ("chooser_button",
(ActionFunc)greeter_chooser_handler,
NULL);
+
+ register int i = 0;
+ for (; i < GDM_CUSTOM_COMMAND_MAX; i++) {
+ gint * cmd_index = g_new0(gint, 1);
+ *cmd_index = i;
+ gchar * key_string = g_strdup_printf (_("custom_cmd_button%d"), i);
+ greeter_item_register_action_callback (key_string,
+ (ActionFunc)query_greeter_custom_cmd_handler,
+ cmd_index);
+ g_free (key_string);
+ }
}