char set_color[] = "dcop kdesktop KBackgroundIface setColor '%s' 1"; char bg_off[] = "dcop kdesktop KBackgroundIface setBackgroundEnabled 0"; char bg_on[]  = "dcop kdesktop KBackgroundIface setBackgroundEnabled 1"; char *cmd;
char set_color[] = "dcop --user '%s' kdesktop KBackgroundIface setColor '%s' 1"; char bg_off[] = "dcop --user '%s' kdesktop KBackgroundIface setBackgroundEnabled 0"; char bg_on[] = "dcop --user '%s' kdesktop KBackgroundIface setBackgroundEnabled 1"; char *cmd, *user = NULL; int len;  user = get_user_name(); if (strstr(user, "'") != NULL)  { rfbLog("bad user: %s\n", user); free(user); return; }
void solid_kde(char *color) {	char set_color[] = "dcop kdesktop KBackgroundIface setColor '%s' 1";	char bg_off[] = "dcop kdesktop KBackgroundIface setBackgroundEnabled 0";	char bg_on[]  = "dcop kdesktop KBackgroundIface setBackgroundEnabled 1";	char *cmd;	if (! color) {		do_cmd(bg_on);		return;	}	if (strstr(color, "'") != NULL)  {		rfbLog("bad color: %s\n", color);		return;	}	cmd = (char *)malloc(strlen(set_color) - 2 + strlen(color) + 1);	sprintf(cmd, set_color, color);	do_cmd(cmd);	do_cmd(bg_off);	free(cmd);}