summaryrefslogtreecommitdiffstats
path: root/driver/demo-Xm.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/demo-Xm.c')
-rw-r--r--driver/demo-Xm.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/driver/demo-Xm.c b/driver/demo-Xm.c
index 547bbe9..2a95bff 100644
--- a/driver/demo-Xm.c
+++ b/driver/demo-Xm.c
@@ -451,6 +451,7 @@ await_xscreensaver (Widget widget)
support" in the following expression... */
# endif
strcat (buf,
+/*
"You are running as root. This usually means that xscreensaver\n"
"was unable to contact your X server because access control is\n"
"turned on. Try running this command:\n"
@@ -465,7 +466,11 @@ await_xscreensaver (Widget widget)
"manual and FAQ for more information.\n"
"\n"
"You shouldn't run X as root. Instead, you should log in as a\n"
- "normal user, and `su' as necessary.");
+ "normal user, and `su' as necessary."
+ */
+ "You are running as root. Don't do that. Instead, you should\n"
+ "log in as a normal user and use `sudo' as necessary."
+ );
else
strcat (buf, "Please check your $PATH and permissions.");
@@ -605,13 +610,21 @@ apply_changes_and_save (Widget widget)
/* Something was changed -- store results into the struct,
and write the file.
*/
+ int status;
free (p->screenhacks[which]->visual);
free (p->screenhacks[which]->command);
p->screenhacks[which]->visual = strdup (visual);
p->screenhacks[which]->command = strdup (command);
p->screenhacks[which]->enabled_p = enabled_p;
- return demo_write_init_file (widget, p);
+ status = demo_write_init_file (widget, p);
+
+ /* Tell the xscreensaver daemon to wake up and reload the init file,
+ in case the timeout has changed. Without this, it would wait
+ until the *old* timeout had expired before reloading. */
+ xscreensaver_command (XtDisplay (widget), XA_DEACTIVATE, 0, 0, 0);
+
+ return status;
}
/* No changes made */
@@ -1530,7 +1543,7 @@ the_network_is_not_the_computer (Widget parent)
sprintf (msg,
"Warning:\n\n"
"The XScreenSaver daemon doesn't seem to be running\n"
- "on display \"%s\". You can launch it by selecting\n"
+ "on display \"%.25s\". You can launch it by selecting\n"
"`Restart Daemon' from the File menu, or by typing\n"
"\"xscreensaver &\" in a shell.",
d);