summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-04-17 21:40:47 -0700
committerJay Sorg <jay.sorg@gmail.com>2014-04-17 21:40:47 -0700
commit0ed4932e957dbd1047d966d63f003d5299a7658f (patch)
tree0edaa286ce43c686b3ea5ea797c270ac84fd7004
parentaa983d2b460ea3bc4d3b4483a53c1b13b155d4ef (diff)
parent8004a782a27838d2df78134ddc474814523759a9 (diff)
downloadxrdp-proprietary-0ed4932e957dbd1047d966d63f003d5299a7658f.tar.gz
xrdp-proprietary-0ed4932e957dbd1047d966d63f003d5299a7658f.zip
Merge branch 'devel' of github.com:neutrinolabs/xrdp into devel
-rw-r--r--xrdp/xrdp.ini4
-rw-r--r--xrdp/xrdp_login_wnd.c23
-rw-r--r--xrdp/xrdp_types.h1
3 files changed, 25 insertions, 3 deletions
diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini
index 22e7d644..b27e0fbe 100644
--- a/xrdp/xrdp.ini
+++ b/xrdp/xrdp.ini
@@ -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
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c
index bf4fcb12..8b14cb26 100644
--- a/xrdp/xrdp_login_wnd.c
+++ b/xrdp/xrdp_login_wnd.c
@@ -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 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);
diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h
index 7e1c81f0..973b64e8 100644
--- a/xrdp/xrdp_types.h
+++ b/xrdp/xrdp_types.h
@@ -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