Home | History | Annotate | Download | only in x11vnc

Lines Matching defs:cmd

101 "                     You can also put cmd= lines in the control file to perform\n"
104 " cmd=quit Disconnect all clients and exit.\n"
105 " cmd=restart Restart all of the x11vnc's.\n"
106 " cmd=noop Do nothing (e.g. ping)\n"
107 " cmd=x11vnc Run ps(1) looking for x11vnc's\n"
108 " cmd=help Print out help text.\n"
109 " cmd=add_window:win Add a window to be watched.\n"
110 " cmd=del_window:win Delete a window.\n"
111 " cmd=add_app:win Add an application to be watched.\n"
112 " cmd=del_app:win Delete an application.\n"
113 " cmd=add_client:host Add client ('internal' mode only)\n"
114 " cmd=del_client:host Del client ('internal' mode only)\n"
115 " cmd=list_windows List all tracked windows.\n"
116 " cmd=list_apps List all tracked applications.\n"
117 " cmd=list_clients List all connected clients.\n"
118 " cmd=list_all List all three.\n"
119 " cmd=print_logs Print out the x11vnc logfiles.\n"
120 " cmd=debug:n Set -debug to n (0 or 1).\n"
121 " cmd=showmenus:n Set -showmenus to n (0 or 1).\n"
122 " cmd=noexit:n Set -noexit to n (0 or 1).\n"
128 " without the leading 'cmd='.\n"
137 " ending with suffix '.cmd' is found, then commands in it\n"
138 " (cmd=...) are processed and then the file is truncated.\n"
140 " client hostnames in the '.cmd' file are ignored. Also\n"
142 " which is similar to '.cmd'\n"
154 " the initial app window or exit the application. Or cmd=quit in -control mode.\n"
163 " In addition to the '.cmd' file channel, for faster response you can set\n"
165 " would go into the '.cmd' file. For example:\n"
167 " xprop -root -f X11VNC_APPSHARE_COMMAND 8s -set X11VNC_APPSHARE_COMMAND cmd=quit\n"
173 " with the cmd=add_client:<client> and cmd=del_client:<client> commands.\n"
239 " cover up existing windows that are being tracked.) See cmd=add_window\n"
240 " and cmd=add_app described above.\n"
394 char *cmd, *tmp, *connto, *name;
441 cmd = (char *) calloc(len, 1);
444 sprintf(cmd, "%s %s 0x%lx -bg -quiet %s -nopw -rfbport 0 "
454 strcat(cmd, tracktmp);
461 strcat(cmd, tmp);
464 strcat(cmd, tmp);
472 strcat(cmd, tmp);
475 char *q = strstr(cmd, "-connect_or_exit");
486 strcat(cmd, " ");
487 strcat(cmd, x11vnc_args);
493 fprintf(stderr, "\nrunning: %s\n\n", cmd);
497 system(cmd);
499 free(cmd);
506 char *cmd;
524 cmd = (char *) malloc(1000 + strlen(x11vnc));
525 sprintf(cmd, "pkill -TERM -f '%s %s 0x%lx -bg'", x11vnc, id_opt, win);
527 fprintf(stdout, "stopping: 0x%08lx - %s\n", win, cmd);
533 system(cmd);
535 sprintf(cmd, "(sleep 0.25 2>/dev/null || sleep 1; pkill -KILL -f '%s "
537 system(cmd);
543 free(cmd);
636 char cmd[1000];
637 sprintf(cmd, "(sleep 3; pkill -TERM -f '%s') &", unique_tag);
638 if (appshare_debug) fprintf(stderr, "%s\n", cmd);
639 system(cmd);
1059 sprintf(tmp, "cmd=close:%s\n", client);
1389 if (strstr(q, "cmd=") == q) {
1390 char *cmd = q + strlen("cmd=");
1391 if (!strcmp(cmd, "quit")) {
1392 if (strcmp(control, file) && strstr(file, ".cmd")) {
1397 } else if (!strcmp(cmd, "wait")) {
1399 } else if (strstr(cmd, "bcast:") == cmd) {
1401 } else if (strstr(cmd, "del_window:") == cmd) {
1402 add_or_del_win(cmd + strlen("del_window:"), 0);
1403 } else if (strstr(cmd, "add_window:") == cmd) {
1404 add_or_del_win(cmd + strlen("add_window:"), 1);
1405 } else if (strstr(cmd, "del:") == cmd) {
1406 add_or_del_win(cmd + strlen("del:"), 0);
1407 } else if (strstr(cmd, "add:") == cmd) {
1408 add_or_del_win(cmd + strlen("add:"), 1);
1409 } else if (strstr(cmd, "del_client:") == cmd) {
1410 add_or_del_client(cmd + strlen("del_client:"), 0);
1411 } else if (strstr(cmd, "add_client:") == cmd) {
1412 add_or_del_client(cmd + strlen("add_client:"), 1);
1413 } else if (strstr(cmd, "-") == cmd) {
1414 add_or_del_client(cmd + strlen("-"), 0);
1415 } else if (strstr(cmd, "+") == cmd) {
1416 add_or_del_client(cmd + strlen("+"), 1);
1417 } else if (strstr(cmd, "del_app:") == cmd) {
1418 add_or_del_app(cmd + strlen("del_app:"), 0);
1419 } else if (strstr(cmd, "add_app:") == cmd) {
1420 add_or_del_app(cmd + strlen("add_app:"), 1);
1421 } else if (strstr(cmd, "debug:") == cmd) {
1422 appshare_debug = atoi(cmd + strlen("debug:"));
1423 } else if (strstr(cmd, "showmenus:") == cmd) {
1424 skip_menus = atoi(cmd + strlen("showmenus:"));
1426 } else if (strstr(cmd, "noexit:") == cmd) {
1427 exit_no_app_win = atoi(cmd + strlen("noexit:"));
1429 } else if (strstr(cmd, "use_forever:") == cmd) {
1430 use_forever = atoi(cmd + strlen("use_forever:"));
1431 } else if (strstr(cmd, "tree_depth:") == cmd) {
1432 tree_depth = atoi(cmd + strlen("tree_depth:"));
1433 } else if (strstr(cmd, "x11vnc_args:") == cmd) {
1434 x11vnc_args = strdup(cmd + strlen("x11vnc_args:"));
1435 } else if (strstr(cmd, "env:") == cmd) {
1436 putenv(cmd + strlen("env:"));
1437 } else if (strstr(cmd, "noop") == cmd) {
1439 } else if (!strcmp(cmd, "restart")) {
1441 } else if (!strcmp(cmd, "list_clients") || !strcmp(cmd, "lc")) {
1443 } else if (!strcmp(cmd, "list_windows") || !strcmp(cmd, "lw")) {
1445 } else if (!strcmp(cmd, "list_apps") || !strcmp(cmd, "la")) {
1447 } else if (!strcmp(cmd, "list_all") || !strcmp(cmd, "ls")) {
1453 } else if (!strcmp(cmd, "print_logs") || !strcmp(cmd, "pl")) {
1455 } else if (!strcmp(cmd, "?") || !strcmp(cmd, "h") || !strcmp(cmd, "help")) {
1533 control_cmd = (char *)malloc(strlen(control) + strlen(".cmd") + 1);
1534 sprintf(control_cmd, "%s.cmd", control);
1660 sprintf(tracktmp, "%s/0xprop.cmd", trackdir);
1663 char tmp[] = "/tmp/x11vnc-appshare.cmd.XXXXXX";
1713 char *cmd = "ps -elf | egrep 'PID|x11vnc' | grep -v egrep";
1714 fprintf(stderr, "%s\n", cmd);
1715 system(cmd);
1717 sprintf(line2, "cmd=%s", str);
1744 if (strstr(str, "cmd=quit") == str || strstr(str, "\ncmd=quit")) {
1766 process_string("cmd=help");