57
61
settings->bitmap_cache = 1;
58
62
settings->bitmap_compression = 1;
59
63
settings->desktop_save = 0;
60
settings->rdp5_performanceflags =
61
RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG | RDP5_NO_MENUANIMATIONS;
64
settings->performanceflags =
65
PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS;
62
66
settings->off_screen_bitmaps = 1;
63
67
settings->triblt = 0;
64
68
settings->new_cursors = 1;
65
69
settings->rdp_version = 5;
66
73
xfi->fullscreen = xfi->fs_toggle = 0;
82
"FreeRDP - A Free Remote Desktop Protocol Client\n"
83
"See http://freerdp.sourceforge.net for more information\n"
85
"Usage: xfreerdp [options] server:port\n"
86
"\t-a: color depth (8, 15, 16, 24 or 32)\n"
90
"\t-k: keyboard layout ID\n"
91
"\t--kbd-list: list all keyboard layout IDs\n"
94
"\t-g: geometry, using format WxH, default is 1024x768\n"
95
"\t-t: alternative port number (default is 3389)\n"
97
"\t-o: console audio\n"
98
"\t-0: console session\n"
99
"\t-f: fullscreen mode\n"
100
"\t-z: enable bulk compression\n"
101
"\t-x: performance flags (m, b or l for modem, broadband or lan)\n"
103
"\t--no-tls: disable TLS encryption\n"
105
"\t--plugin: load a virtual channel plugin\n"
106
"\t--no-osb: disable off screen bitmaps, default on\n"
107
"\t--version: Print out the version and exit\n"
108
"\t-h: show this help\n";
109
printf("%s\n", help);
70
113
/* Returns "true" on errors or other reasons to not continue normal operation */
72
115
process_params(xfInfo * xfi, int argc, char ** argv, int * pindex)
77
120
RD_PLUGIN_DATA plugin_data[MAX_PLUGIN_DATA + 1];
81
125
set_default_params(xfi);
82
126
settings = xfi->settings;
128
i = sizeof(settings->username) - 1;
86
strncpy(settings->username, p, sizeof(settings->username) - 1);
131
strncpy(settings->username, p, i);
135
pw = getpwuid(getuid());
138
if (pw->pw_name != 0)
140
strncpy(settings->username, pw->pw_name, i);
89
145
if (argc < *pindex + 1)
247
303
settings->bulk_compression = 1;
305
else if (strcmp("--no-osb", argv[*pindex]) == 0)
307
settings->off_screen_bitmaps = 0;
249
309
else if (strcmp("-f", argv[*pindex]) == 0)
251
311
xfi->fullscreen = xfi->fs_toggle = 1;
262
322
if (strncmp("m", argv[*pindex], 1) == 0) /* modem */
264
settings->rdp5_performanceflags = RDP5_NO_WALLPAPER |
265
RDP5_NO_FULLWINDOWDRAG | RDP5_NO_MENUANIMATIONS |
324
settings->performanceflags = PERF_DISABLE_WALLPAPER |
325
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
326
PERF_DISABLE_THEMING;
268
328
else if (strncmp("b", argv[*pindex], 1) == 0) /* broadband */
270
settings->rdp5_performanceflags = RDP5_NO_WALLPAPER;
330
settings->performanceflags = PERF_DISABLE_WALLPAPER;
272
332
else if (strncmp("l", argv[*pindex], 1) == 0) /* lan */
274
settings->rdp5_performanceflags = RDP5_DISABLE_NOTHING;
334
settings->performanceflags = PERF_FLAG_NONE;
278
settings->rdp5_performanceflags = strtol(argv[*pindex], 0, 16);
338
settings->performanceflags = strtol(argv[*pindex], 0, 16);
342
else if (strcmp("--no-tls", argv[*pindex]) == 0)
281
347
else if (strcmp("--plugin", argv[*pindex]) == 0)
283
349
*pindex = *pindex + 1;
311
377
else if ((strcmp("-h", argv[*pindex]) == 0) || strcmp("--help", argv[*pindex]) == 0)
315
"FreeRDP - A Free Remote Desktop Protocol Client\n"
316
"See http://freerdp.sourceforge.net for more information\n"
318
"Usage: xfreerdp [options] server:port\n"
319
"\t-a: color depth (16, 24 or 32)\n"
323
"\t-k: keyboard layout ID\n"
324
"\t--kbd-list: list all keyboard layout IDs\n"
327
"\t-g: geometry, using format WxH, default is 1024x768\n"
328
"\t-t: alternative port number (default is 3389)\n"
330
"\t-o: console audio\n"
331
"\t-0: console session\n"
332
"\t-f: fullscreen mode\n"
333
"\t-z: enable bulk compression\n"
334
"\t-x: performance flags (m, b or l for modem, broadband or lan)\n"
335
"\t--plugin: load a virtual channel plugin\n"
336
"\t-h: show this help\n"
342
382
else if (argv[*pindex][0] != '-')
369
409
*pindex = *pindex + 1;
412
else if (strcmp("--version", argv[*pindex]) == 0)
414
printf("This is FreeRDP version %s\n", PACKAGE_VERSION);
374
419
printf("invalid option: %s\n", argv[*pindex]);
574
631
xf_kb_init(xfi->keyboard_layout_id);
576
632
printf("starting thread %d to %s:%d\n", g_thread_count,
577
633
xfi->settings->server, xfi->settings->tcp_port_rdp);
578
pthread_create(&thread, 0, thread_func, xfi);
634
if (pthread_create(&thread, 0, thread_func, xfi) == 0)
581
while (g_thread_count > 0)
640
if (g_thread_count > 0)
642
printf("main thread, waiting for all threads to exit\n");
644
printf("main thread, all threads did exit\n");
586
647
freerdp_chanman_uninit();
648
freerdp_global_finish();