make login screen window title configurable

ulab-next
Cocoon 10 years ago
parent 8f597584f2
commit bf43deabf1

@ -55,6 +55,9 @@ use_fastpath=both
# configure login screen
#
# Login Screen Window Title
#ls_title=My Login Title
# top level window background color in RGB format
ls_top_window_bg_color=009cb5
@ -66,6 +69,7 @@ ls_height=430
ls_bg_color=dedede
# logo
# full path to bmp-file or file in shared folder
ls_logo_filename=
ls_logo_x_pos=55
ls_logo_y_pos=50

@ -560,9 +560,19 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
self->login_window->notify = xrdp_wm_login_notify;
g_gethostname(buf1, 256);
g_sprintf(buf, "Login to %s", buf1);
set_string(&self->login_window->caption1, buf);
/* if window title not specified, use hostname as default */
if (globals->ls_title[0] == 0)
{
g_gethostname(buf1, 256);
g_sprintf(buf, "Login 1 to %s", buf1);
set_string(&self->login_window->caption1, buf);
}
else
{
/*self->login_window->caption1 = globals->ls_title[0];*/
g_sprintf(buf, "%s", globals->ls_title);
set_string(&self->login_window->caption1, buf);
}
if (regular)
{
@ -827,6 +837,12 @@ load_xrdp_config(struct xrdp_config *config, int bpp)
else if (g_strncmp(n, "ls_bg_color", 64) == 0)
globals->ls_bg_color = HCOLOR(bpp, xrdp_wm_htoi(v));
else if (g_strncmp(n, "ls_title", 255) == 0)
{
g_strncpy(globals->ls_title, v, 255);
globals->ls_title[255] = 0;
}
else if (g_strncmp(n, "ls_logo_filename", 255) == 0)
{
g_strncpy(globals->ls_logo_filename, v, 255);
@ -917,6 +933,7 @@ load_xrdp_config(struct xrdp_config *config, int bpp)
g_writeln("ls_width: %d", globals->ls_width);
g_writeln("ls_height: %d", globals->ls_height);
g_writeln("ls_bg_color: %x", globals->ls_bg_color);
g_writeln("ls_title: %s", globals->ls_title);
g_writeln("ls_logo_filename: %s", globals->ls_logo_filename);
g_writeln("ls_logo_x_pos: %d", globals->ls_logo_x_pos);
g_writeln("ls_logo_y_pos: %d", globals->ls_logo_y_pos);

@ -595,6 +595,7 @@ struct xrdp_cfg_globals
int ls_btn_cancel_y_pos; /* y pos for Cancel button */
int ls_btn_cancel_width; /* width of Cancel button */
int ls_btn_cancel_height; /* height of Cancel button */
char ls_title[256]; /* loginscreen window title */
};
struct xrdp_cfg_logging

Loading…
Cancel
Save