1 /*
2    Copyright (C) 2002-2010 Karl J. Runge <runge@karlrunge.com>
3    All rights reserved.
4 
5 This file is part of x11vnc.
6 
7 x11vnc is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or (at
10 your option) any later version.
11 
12 x11vnc is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with x11vnc; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
20 or see <http://www.gnu.org/licenses/>.
21 
22 In addition, as a special exception, Karl J. Runge
23 gives permission to link the code of its release of x11vnc with the
24 OpenSSL project's "OpenSSL" library (or with modified versions of it
25 that use the same license as the "OpenSSL" library), and distribute
26 the linked executables.  You must obey the GNU General Public License
27 in all respects for all of the code used other than "OpenSSL".  If you
28 modify this file, you may extend this exception to your version of the
29 file, but you are not obligated to do so.  If you do not wish to do
30 so, delete this exception statement from your version.
31 */
32 
33 #ifndef _X11VNC_OPTIONS_H
34 #define _X11VNC_OPTIONS_H
35 
36 /* -- options.h -- */
37 
38 /*
39  * variables for the command line options
40  */
41 extern int debug;
42 
43 extern char *use_dpy;
44 extern int display_N;
45 extern int auto_port;
46 extern char *auth_file;
47 extern char *visual_str;
48 extern int set_visual_str_to_something;
49 extern char *logfile;
50 extern int logfile_append;
51 extern char *flagfile;
52 extern char *rm_flagfile;
53 extern char *passwdfile;
54 extern int unixpw;
55 extern int unixpw_nis;
56 extern char *unixpw_list;
57 extern char *unixpw_cmd;
58 extern int unixpw_system_greeter;
59 extern int unixpw_system_greeter_active;
60 extern int use_stunnel;
61 extern int stunnel_port;
62 extern char *stunnel_pem;
63 extern int use_openssl;
64 extern int http_ssl;
65 extern int ssl_no_fail;
66 extern char *openssl_pem;
67 extern char *ssl_certs_dir;
68 extern char *enc_str;
69 extern int vencrypt_mode;
70 extern int vencrypt_kx;
71 extern int vencrypt_enable_plain_login;
72 extern int anontls_mode;
73 extern int create_fresh_dhparams;
74 extern char *dhparams_file;
75 extern int http_try_it;
76 extern int stunnel_http_port;
77 extern int https_port_num;
78 extern int https_port_redir;
79 extern char *ssl_verify;
80 extern char *ssl_crl;
81 extern int ssl_initialized;
82 extern int ssl_timeout_secs;
83 extern char *ssh_str;
84 extern pid_t ssh_pid;
85 extern int usepw;
86 extern char *blackout_str;
87 extern int blackout_ptr;
88 extern char *clip_str;
89 extern int use_solid_bg;
90 extern char *solid_str;
91 extern char *solid_default;
92 
93 extern char *wmdt_str;
94 
95 extern char *speeds_str;
96 extern char *rc_rcfile;
97 extern int rc_rcfile_default;
98 extern int rc_norc;
99 extern int got_norc;
100 extern int opts_bg;
101 
102 extern int shared;
103 extern int connect_once;
104 extern int got_connect_once;
105 extern int got_findauth;
106 extern int deny_all;
107 extern int accept_remote_cmds;
108 extern char *remote_prefix;
109 extern int remote_direct;
110 extern int query_default;
111 extern int safe_remote_only;
112 extern int priv_remote;
113 extern int more_safe;
114 extern int no_external_cmds;
115 extern char *allowed_external_cmds;
116 extern int started_as_root;
117 extern int host_lookup;
118 extern char *unix_sock;
119 extern int unix_sock_fd;
120 extern int ipv6_listen;
121 extern int got_ipv6_listen;
122 extern int ipv6_listen_fd;
123 extern int ipv6_http_fd;
124 extern int noipv6;
125 extern int noipv4;
126 extern char *ipv6_client_ip_str;
127 extern char *users_list;
128 extern char **user2group;
129 extern char *allow_list;
130 extern char *listen_str;
131 extern char *listen_str6;
132 extern char *allow_once;
133 extern char *accept_cmd;
134 extern char *afteraccept_cmd;
135 extern char *gone_cmd;
136 extern int view_only;
137 extern char *allowed_input_view_only;
138 extern char *allowed_input_normal;
139 extern char *allowed_input_str;
140 extern char *viewonly_passwd;
141 extern char **passwd_list;
142 extern int begin_viewonly;
143 extern int inetd;
144 extern int tightfilexfer;
145 extern int got_ultrafilexfer;
146 extern int first_conn_timeout;
147 extern int ping_interval;
148 extern int flash_cmap;
149 extern int shift_cmap;
150 extern int force_indexed_color;
151 extern int advertise_truecolor;
152 extern int advertise_truecolor_reset;
153 extern int cmap8to24;
154 extern char *cmap8to24_str;
155 extern int xform24to32;
156 extern int launch_gui;
157 
158 extern int avahi;
159 extern int vnc_redirect;
160 extern int vnc_redirect_sock;
161 
162 extern int use_modifier_tweak;
163 extern int watch_capslock;
164 extern int skip_lockkeys;
165 extern int use_iso_level3;
166 extern int clear_mods;
167 extern int nofb;
168 extern char *raw_fb_str;
169 extern char *raw_fb_pixfmt;
170 extern char *raw_fb_full_str;
171 extern char *freqtab;
172 extern char *pipeinput_str;
173 extern char *pipeinput_opts;
174 extern FILE *pipeinput_fh;
175 extern int pipeinput_tee;
176 extern int pipeinput_int;
177 extern int pipeinput_cons_fd;
178 extern char *pipeinput_cons_dev;
179 
180 extern int macosx_nodimming;
181 extern int macosx_nosleep;
182 extern int macosx_noscreensaver;
183 extern int macosx_wait_for_switch;
184 extern int macosx_mouse_wheel_speed;
185 extern int macosx_console;
186 extern int macosx_swap23;
187 extern int macosx_resize;
188 extern int macosx_icon_anim_time;
189 extern int macosx_no_opengl;
190 extern int macosx_no_rawfb;
191 extern int macosx_read_opengl;
192 extern int macosx_read_rawfb;
193 
194 extern unsigned long subwin;
195 extern int subwin_wait_mapped;
196 extern int freeze_when_obscured;
197 extern int subwin_obscured;
198 
199 extern int debug_xevents;
200 extern int debug_xdamage;
201 extern int debug_wireframe;
202 extern int debug_tiles;
203 extern int debug_grabs;
204 extern int debug_sel;
205 
206 extern int xtrap_input;
207 extern int xinerama;
208 extern int xrandr;
209 extern int xrandr_maybe;
210 extern char *xrandr_mode;
211 extern char *pad_geometry;
212 extern time_t pad_geometry_time;
213 extern int use_snapfb;
214 
215 extern int use_xrecord;
216 extern int noxrecord;
217 
218 extern char *client_connect;
219 extern char *client_connect_file;
220 extern int connect_or_exit;
221 extern int vnc_connect;
222 extern char *connect_proxy;
223 
224 extern int show_cursor;
225 extern int show_multiple_cursors;
226 extern char *multiple_cursors_mode;
227 extern int cursor_drag_changes;
228 extern int cursor_pos_updates;
229 extern int cursor_shape_updates;
230 extern int use_xwarppointer;
231 extern int always_inject;
232 extern int show_dragging;
233 extern int wireframe;
234 extern int wireframe_local;
235 
236 extern char *wireframe_str;
237 extern char *wireframe_copyrect;
238 extern char *wireframe_copyrect_default;
239 extern int wireframe_in_progress;
240 
241 extern int ncache;
242 extern int ncache0;
243 extern int ncache_default;
244 extern int ncache_copyrect;
245 extern int ncache_wf_raises;
246 extern int ncache_dt_change;
247 extern int ncache_pad;
248 extern int ncache_xrootpmap;
249 extern int ncache_keep_anims;
250 extern int ncache_old_wm;
251 extern int macosx_ncache_macmenu;
252 extern int macosx_us_kbd;
253 extern int ncache_beta_tester;
254 extern int ncdb;
255 
256 extern Atom atom_NET_ACTIVE_WINDOW;
257 extern Atom atom_NET_CURRENT_DESKTOP;
258 extern Atom atom_NET_CLIENT_LIST_STACKING;
259 extern Atom atom_XROOTPMAP_ID;
260 extern double got_NET_ACTIVE_WINDOW;
261 extern double got_NET_CURRENT_DESKTOP;
262 extern double got_NET_CLIENT_LIST_STACKING;
263 extern double got_XROOTPMAP_ID;
264 
265 extern char *scroll_copyrect_str;
266 extern char *scroll_copyrect;
267 extern char *scroll_copyrect_default;
268 extern char *scroll_key_list_str;
269 extern KeySym *scroll_key_list;
270 
271 extern int scaling_copyrect0;
272 extern int scaling_copyrect;
273 
274 extern int scrollcopyrect_min_area;
275 extern int debug_scroll;
276 extern double pointer_flush_delay;
277 extern double last_scroll_event;
278 extern int max_scroll_keyrate;
279 extern double max_keyrepeat_time;
280 extern char *max_keyrepeat_str;
281 extern char *max_keyrepeat_str0;
282 extern int max_keyrepeat_lo, max_keyrepeat_hi;
283 
284 extern char **scroll_good_all;
285 extern char **scroll_good_key;
286 extern char **scroll_good_mouse;
287 extern char *scroll_good_str;
288 extern char *scroll_good_str0;
289 
290 extern char **scroll_skip_all;
291 extern char **scroll_skip_key;
292 extern char **scroll_skip_mouse;
293 extern char *scroll_skip_str;
294 extern char *scroll_skip_str0;
295 
296 extern char **scroll_term;
297 extern char *scroll_term_str;
298 extern char *scroll_term_str0;
299 
300 extern char* screen_fixup_str;
301 extern double screen_fixup_V;
302 extern double screen_fixup_C;
303 extern double screen_fixup_X;
304 extern double screen_fixup_8;
305 
306 extern int no_autorepeat;
307 extern int no_repeat_countdown;
308 extern int watch_bell;
309 extern int sound_bell;
310 extern int xkbcompat;
311 extern int use_xkb_modtweak;
312 extern int skip_duplicate_key_events;
313 extern char *skip_keycodes;
314 extern int sloppy_keys;
315 extern int add_keysyms;
316 
317 extern char *remap_file;
318 extern char *pointer_remap;
319 extern int pointer_mode;
320 extern int pointer_mode_max;
321 extern int single_copytile;
322 extern int single_copytile_orig;
323 extern int single_copytile_count;
324 extern int tile_shm_count;
325 
326 extern int using_shm;
327 extern int flip_byte_order;
328 extern int waitms;
329 extern int got_waitms;
330 extern double wait_ui;
331 extern double slow_fb;
332 extern double xrefresh;
333 extern int wait_bog;
334 extern int extra_fbur;
335 extern int defer_update;
336 extern int set_defer;
337 extern int got_defer;
338 extern int got_deferupdate;
339 
340 extern int screen_blank;
341 
342 extern int no_fbu_blank;
343 extern int take_naps;
344 extern int naptile;
345 extern int napfac;
346 extern int napmax;
347 extern int ui_skip;
348 extern int all_input;
349 extern int handle_events_eagerly;
350 
351 extern int watch_fbpm;
352 extern int watch_dpms;
353 extern int force_dpms;
354 extern int client_dpms;
355 extern int no_ultra_dpms;
356 extern int no_ultra_ext;
357 extern int saw_ultra_chat;
358 extern int saw_ultra_file;
359 extern int chat_window;
360 extern rfbClientPtr chat_window_client;
361 
362 extern int watch_selection;
363 extern int watch_primary;
364 extern int watch_clipboard;
365 extern char *sel_direction;
366 
367 extern char *sigpipe;
368 
369 extern VisualID visual_id;
370 extern int visual_depth;
371 
372 extern int overlay;
373 extern int overlay_cursor;
374 
375 extern double fs_frac;
376 extern int tile_fuzz;
377 
378 extern int grow_fill;
379 extern int gaps_fill;
380 
381 extern int debug_pointer;
382 extern int debug_keyboard;
383 
384 extern int quiet;
385 extern int verbose;
386 
387 extern int use_threads;
388 extern int started_rfbRunEventLoop;
389 extern int threads_drop_input;
390 
391 extern int got_noxwarppointer;
392 extern int got_rfbport;
393 extern int got_rfbport_val;
394 extern int got_alwaysshared;
395 extern int got_nevershared;
396 extern int got_cursorpos;
397 extern int got_pointer_mode;
398 extern int got_noviewonly;
399 extern int got_wirecopyrect;
400 extern int got_scrollcopyrect;
401 extern int got_noxkb;
402 extern int got_nomodtweak;
403 
404 #endif /* _X11VNC_OPTIONS_H */
405