Commit Graph

53 Commits

Author SHA1 Message Date
matt335672 ba1d93930a Allow keycode set to be specified for the X server
This commit allows a keycode_set to be specified as a module parameter
in xrdp.ini. This has the following effects:-
1) xrdp loads the specified keycode set for mapping RDP scancodes to
   X11 keycodes. These are then passed to xorgxrdp as part of key press/
   key release events.
2) The name of the XKB rules which use the specified keycode set are
   passed to xorgxrdp so that XKB can be configured with rules which
   match the chosen keycodes.

The effect is to remove all keycode set dependencies from xorgxrdp.
Normally evdev rules and evdev keycodes will be used but base rules and
base keycodes can be used instead for applications that require them.
Also, any systems which do not ship the evdev rules can be made to
work with base rules.
2024-08-05 10:58:09 +01:00
matt335672 c9a2039858 Move and rename xrdp_load_keyboard_layout()
xrdp_load_keyboard_layout() is used exclusively by the xup module to
work out the parameters to pass to xorgxrdp for XKB. This function
does not need to be called locally from the SEC module.

This commit moves the function to xrdp/lang.c and renames it as
xrdp_init_xkb_layout(). The module interface is modified so that xup can
call this function. Other modules do not need to call it.
2024-08-05 10:44:10 +01:00
matt335672 ae836fb543 Update module interfaces with new calls for resizing
This commit DOES NOT compile.

This change alters these module interface calls:-
1) mod_server_monitor_resize() (Call from xrdp to module). Updated.
2) server_reset() (Call from module to xrdp). Replaced.

The mod_server_monitor_resize() call is updated :-
1) to allow a monitor list to be passed in for a multimon resize
2) with an 'in_progress' return value which tells the caller whether or
   not to expect a callback.

The server_reset() call served two purposes up until now:-
1) To allow a module to resize a single monitor session. There
   is no way to request a multi-monitor resize from the module
2) (with bpp == 0) To signal to the mm resize state machine that
   a server screen resize hsa finished.

This is split into two calls:-
1) client_monitor_resize() to allow a mdule to request a
   multimon resize.
2) server_monitor_resize_done(). This is called by a module
   when a resize is completed.
2024-02-15 16:48:13 +00:00
jsorg71 33539c1d8b
Gfx mainline merge multimon1 (#2933)
* GFX: work on multimon

* fix for non GFX multimon
2024-02-01 10:28:30 -05:00
Jay Sorg bfdcdb0082 posix shm, can not unmap shmem_ptr until encoder is done with it 2023-09-09 14:18:52 -07:00
Jay Sorg 4b1482b5df move to posix shm 2023-08-13 13:08:16 -07:00
Jay Sorg c250529e8e add large cursor support, posix shm 2023-05-16 10:20:24 -07:00
matt335672 5ed9b96530 Add missing include guards 2023-01-31 09:30:36 +00:00
matt335672 275eaf7683 Rework transport connect logic
There are a number of ways the existing transport connect logic in
trans_connect could be improved for POSIX compatibility, and also
slightly tidied up:-
1) The same socket is re-used for multiple connect attempts following
   failure which isn't behaviour defined by POSIX.1-2017 (although it
   works on Linux).
2) An asynchronous connect is started, and then after a short
   delay connect() is called again on the same socket. POSIX.1-2017
   is clear that in this situation EALREADY is returned before the
   connection is established, but is silent on the behaviour expected
   when the connection is established. Returning success is an option,
   but so is returning EISCONN. The current code assumes the connect()
   call will succeed.
3) The code contains two virtually identical, quite complex loops for
   TCP and UNIX sockets, differing only in the calls to create a socket
   and connect it.
4) trans_connect() contains looping and retry logic, but this isn't
   seen as sufficient by the chansrv connect code in xrdp/xrdp_mm.c and
   the Xorg connect code in xup/xup.c. Both of these implement their own
   looping and retry logic on top of the logic in trans_connect(),
   resulting in slightly unpredictable behaviour with regard to
   timeouts.
5) A socket number can technically be zero, but in a couple of places
   this isn't allowed for.

This PR attempts to correct the implementation of trans_connect(),
and also to simplify the areas it is called from.

As part of the PR, the signature of the server_is_term member of the
xrdp module interface is changed to match the signature expected by the
is_term member of a struct trans. This allows for trans_connect()
in xrdp modules to directly access g_is_term() within the main xrdp
executable. At the moment this functionality is only used by the xup
module.
2022-03-31 20:48:07 +01:00
matt335672 0b5445b676 Remove unnecessary error from neutrinordp log 2021-10-12 14:37:28 +01:00
matt335672 949a81443b Add server_chansrv_in_use() to module interface 2021-06-08 14:11:17 +01:00
Alexandre Quesnel 52707ac686 Fixing formatting with astyle 2021-05-08 16:58:11 +00:00
Christopher Pitstick deb66ce766 Resolution switching without reconnecting.
- Based on https://github.com/jsorg71/xrdp/tree/dynamic_monitor
- Tested with xorgxrdp
- Tested with vnc
- Only works with single monitor.
- Update documentation to clarify the difference between MSTSC and
Microsoft Remote Desktop.
- Does not include compatibility with /gfx at this time, which is still
in testing.
- Updates to include ms-rdpedisp.h header for the 2.2.2 specification of
the protocol.
- Adds new dynamic_monitor_layout struct that shares the number of
monitors with xrdp_client_info.h
- Does not allow for BPP changes because the RDP protocol doesn't
support it.
- Option to disable feature as NeutrinoRDP doesn't support it (It was
based on FreeRDP 1.0.1 which didn't yet have this feature.)
- Add CLIENT_MONITOR_DATA_MAXIMUM_MONITORS constant and reference
spec definition.

Depends on https://github.com/neutrinolabs/xorgxrdp/pull/183
2021-04-22 01:34:03 -04:00
Alexandre Quesnel 4ec4292898 Migrating logging to LOG() and LOG_DEVEL() in xup/* 2021-02-11 04:42:50 +00:00
Matt Burt 1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
bolkedebruin 5cd36c511c Set max character buffer len to 512 per MS specification
The MS specs determine that the character buffer lenngths
for usernames, domains, passwords, alternate shells, etc
can be up to 512 characters including the mandatory null
terminator.
2020-08-17 10:35:35 +02:00
Jay Sorg eb56683df0 update the module version 2019-04-25 14:54:25 -07:00
Jay Sorg 21f90e3ca2 work on suppress 2019-04-25 14:54:25 -07:00
Pavel Roskin b8ed23daab Constify the value argument to mod_set_param 2017-01-11 11:59:11 -08:00
Pavel Roskin aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Pavel Roskin f8cb1588ef Replace "charactor" with "character" everywhere 2016-01-30 17:33:04 -08:00
Jay Sorg fc1e4c645c update the copyright year 2015-07-12 01:06:04 -07:00
Jay Sorg 4a553e07af update the module API 2015-07-10 21:57:04 -07:00
Jay Sorg 65de5e971b xup: move to trans for io 2015-07-10 20:38:27 -07:00
Jay Sorg 9cd634007f fix for case where shmget can return an shmid of zero 2015-02-09 19:26:04 -08:00
Jay Sorg 575fc9fb6f work on codec mode jpeg 2014-03-22 16:51:30 -07:00
Jay Sorg 8cd57e0710 added server_paint_rects 2014-02-18 12:10:05 -08:00
Jay Sorg c1b7cbd657 merges from authentic8 2013-09-26 11:28:07 -07:00
Jim Grandy 981741f55c Hand-apply patch (compositing) from Authentic8: 5d5e470 81c9c29 b0c2c10 27d8a01 a96a217 e512090 a9a6762 9c02bfa bd26fcc c0d29d9 676dd35 3b26737 2013-08-22 12:54:10 -07:00
Jim Grandy 45b0bc9f17 Hand-apply patches (glyph cache) from Authentic8 branch: 653869c 30f23d4 74b015d 4e51e6d 2829087 2013-08-22 12:52:24 -07:00
Jay Sorg d96d8aa5ad xup: add shared memory option for X11rdp and xrdp 2013-08-18 22:36:18 -07:00
Jay Sorg 12f7cd64f1 work on new(color) cursors 2013-03-18 23:43:17 -07:00
Laxmikant Rashinkar 1123323fda o moved from GNU General Public License to Apache License, Version 2.0
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00
Jay Sorg 2c3b4c4e5c xup: add some rail messages to the interface 2012-07-31 11:12:00 -07:00
Jay Sorg aa3fad894d xorg: work on offscreen bitmaps 2012-05-19 19:25:08 -07:00
Jay Sorg cc3754a2bd xorg: work on offscreen bitmaps 2012-05-17 18:48:28 -07:00
Jay Sorg e0fc7297f5 pass the client_info(caps) on to module and xserver 2012-05-13 13:56:15 -07:00
Jay Sorg fd52c5aa6a rfx: work on rfx 2012-05-10 20:23:26 -07:00
Jay Sorg 6e9405d418 fix for alt-gr win7 control key 2011-11-12 16:40:08 -08:00
Nicola Ruggero f26d8f781e Fixed compile warning about wrong vnc* struct 2010-11-20 14:37:28 +01:00
Jay Sorg 4f88bf83c1 fixes for bell function 2010-11-18 21:05:32 -08:00
jsorg71 d70d80a33d update copyright year 2010-07-04 07:20:56 +00:00
jsorg71 33b4e7f417 channel fixes 2009-08-15 02:49:13 +00:00
jsorg71 1c170a7761 update copyright year 2009-01-23 07:57:41 +00:00
jsorg71 a8a2f0a0b0 replace long with tbus 2008-06-30 05:02:47 +00:00
jsorg71 d061537be9 added new wait_obj functions 2008-04-03 06:43:30 +00:00
jsorg71 38b789e81f update copyright year 2008-01-30 07:30:10 +00:00
jsorg71 df5eb0b8dc move scp to xrdp 2007-04-20 06:33:26 +00:00
ilsimo fd8ce33f59 adding libscp to xup
some fixes for vnc mod
2007-03-25 13:42:45 +00:00