control-center 1.4.0.4 fix for xscreensaver 4.01
- From: jgotts linuxsavvy com
- To: gnome-devel-list gnome org
- Cc: kmaraas gnome org, jwz jwz org
- Subject: control-center 1.4.0.4 fix for xscreensaver 4.01
- Date: Sat, 16 Mar 2002 23:30:20 -0500
The -timeout, -lock-mode, and -nice command line options have been removed from
the xscreensaver executable. The following patch takes the path of least
resistance and makes gnomecc work again (the changes should be backwards
compatible with xscreensaver 3.x as well). xscreensaver also tries to override
the screensaver-properties capplet with its own capplet, but locally we prefer
to use gnomecc's version due to packaging conflicts.
The long answer is that these options should really be set through
xscreensaver's configuration mechanism, and these changes override
xscreensaver's settings. However, these changes do not harm those settings.
The author of xscreensaver and another individual have apparently both written
replacements for the screensaver-properties capplet, so this issue may have
been addressed.
John
--- control-center-1.4.0.4/capplets/screensaver-properties/callbacks.c.orig Sat Mar 16 21:34:09 2002
+++ control-center-1.4.0.4/capplets/screensaver-properties/callbacks.c Sat Mar 16 22:53:25 2002
@@ -755,14 +755,15 @@
if (sd && waitmins) {
if (sd->dialog)
store_screensaver_data (sd);
- command = g_string_new ("xscreensaver -no-splash -timeout ");
+ command = g_string_new ("xscreensaver -no-splash -xrm \"xscreensaver.timeout:\t");
snprintf (temp, 5, "%d", waitmins );
g_string_append (command, temp);
- g_string_append (command, " -nice ");
+ g_string_append (command, "\" -xrm \"xscreensaver.nice:\t");
snprintf (temp, 5, "%d",20 - ss_priority);
g_string_append (command, temp);
+ g_string_append (command, "\"");
if (password)
- g_string_append (command, " -lock-mode");
+ g_string_append (command, " -xrm \"xscreensaver.lock:\ttrue\"");
if (sd->name != random_screensaver) {
g_string_append (command," -xrm \"*programs:\t");
#ifdef HAVE_REDHAT_XSCREENSAVER_RPM
@@ -834,14 +835,15 @@
if (sd && waitmins) {
if (sd->dialog)
store_screensaver_data (sd);
- command = g_string_new ("xscreensaver -no-splash -timeout ");
+ command = g_string_new ("xscreensaver -no-splash -xrm \"xscreensaver.timeout:\t");
snprintf (temp, 5, "%d", waitmins );
g_string_append (command, temp);
- g_string_append (command, " -nice ");
+ g_string_append (command, "\" -xrm \"xscreensaver.nice:\t");
snprintf (temp, 5, "%d",20 - ss_priority);
g_string_append (command, temp);
+ g_string_append (command, "\"");
if (password)
- g_string_append (command, " -lock-mode");
+ g_string_append (command, " -xrm \"xscreensaver.lock:\ttrue\"");
if (sd->name != random_screensaver) {
g_string_append (command," -xrm \"*programs:\t");
#ifdef HAVE_REDHAT_XSCREENSAVER_RPM
@@ -905,7 +907,7 @@
gdk_draw_rectangle (monitor->window,monitor->style->black_gc, TRUE, 0, 0, monitor->allocation.width, monitor->allocation.height);
- temp = gnome_config_get_string ("/Screensaver/Default/command=xscreensaver -no-splash -timeout 20 -nice 10");
+ temp = gnome_config_get_string ("/Screensaver/Default/command=xscreensaver -no-splash -xrm \"xscreensaver.timeout:\t20\" -xrm \"xscreensaver.nice:\t10\"");
if (!strchr(temp, '&')) {
/* ugh! */
temp2 = g_strconcat (temp, " &", NULL);
--- control-center-1.4.0.4/capplets/screensaver-properties/screensaver-properties-capplet.c.orig Sat Mar 16 21:33:55 2002
+++ control-center-1.4.0.4/capplets/screensaver-properties/screensaver-properties-capplet.c Sat Mar 16 22:12:11 2002
@@ -251,7 +251,7 @@
gchar *command, *r_command;
gchar dpmscmd[32];
gint mypid;
- command = gnome_config_get_string ("/Screensaver/Default/command=xscreensaver -no-splash -timeout 20 -nice 10");
+ command = gnome_config_get_string ("/Screensaver/Default/command=xscreensaver -no-splash -xrm \"xscreensaver.timeout:\t20\" -xrm \"xscreensaver.nice:\t10\"");
if (strcmp (command, "NONE")) {
r_command = g_strconcat (command, " &", NULL);
system ("xscreensaver-command -exit");
--
John GOTTS <jgotts linuxsavvy com> http://linuxsavvy.com/staff/jgotts
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]