/* set the DISPLAY environment variable for any lauched children, to the
display we're using, so they open in the right place. */
- setenv("DISPLAY", DisplayString(obt_display), TRUE);
+ g_setenv("DISPLAY", DisplayString(obt_display), TRUE);
/* create available cursors */
cursors[OB_CURSOR_NONE] = None;
}
}
- reconfigure = FALSE;
-
ob_set_state(OB_STATE_RUNNING);
- if (startup_cmd) run_startup_cmd();
+ if (!reconfigure && startup_cmd) run_startup_cmd();
+
+ reconfigure = FALSE;
/* look for parsing errors */
{
const gchar *id;
/* unset this so we don't pass it on unknowingly */
- unsetenv("DESKTOP_STARTUP_ID");
+ g_unsetenv("DESKTOP_STARTUP_ID");
/* this is how gnome-session passes in a session client id */
id = g_getenv("DESKTOP_AUTOSTART_ID");
if (id) {
- unsetenv("DESKTOP_AUTOSTART_ID");
+ g_unsetenv("DESKTOP_AUTOSTART_ID");
if (ob_sm_id) g_free(ob_sm_id);
ob_sm_id = g_strdup(id);
ob_debug_type(OB_DEBUG_SM,
}
else if (!strcmp(argv[i], "--startup")) {
if (i == *argc - 1) /* no args left */
- g_printerr(_("--startup requires an argument\n"));
+ g_printerr(_("%s requires an argument\n"), "--startup");
else {
/* this will be in the current locale encoding, which is
what we want */
}
else if (!strcmp(argv[i], "--config-file")) {
if (i == *argc - 1) /* no args left */
- g_printerr(_("--config-file requires an argument\n"));
+ g_printerr(_("%s requires an argument\n"), "--config-file");
else {
/* this will be in the current locale encoding, which is
what we want */