Commit Graph

4792 Commits

Author SHA1 Message Date
akallabeth
f48b129414 [client,desktop] fix StartupWMClass setting 2025-06-26 10:23:43 +02:00
akallabeth
a86e3dc53c [client,sdl] print current video driver 2025-06-24 15:43:57 +02:00
akallabeth
4dc6091fde [client,common] fix -mouse-motion
* Move code to client/common to have it in place for all clients without
  modification
* Remember if a button was pressed and only suppress move events if no
  button is pressed.
2025-06-18 12:46:56 +02:00
akallabeth
8e38600298 [client,common] document FREERDP_ASKPASS in manpages 2025-06-18 10:16:58 +02:00
akallabeth
40c988e2da [client,common] warn on insecure argument passing
When credentials or other secrets are passed via command line print out
a warning presenting more secure alternatives
2025-06-18 10:16:56 +02:00
akallabeth
281b924596 [client,sdl2] fix build with webview 2025-06-16 12:50:18 +02:00
akallabeth
ded07fa31e [client,man] improve manpages (see #11357) 2025-06-16 11:56:06 +02:00
akallabeth
79ac927371 [client,common] change AAD url depending on request
* stdio callbacks use a redirect URL with https
* webview uses a redirect URL with ms-appx-web
2025-06-13 19:05:54 +02:00
akallabeth
17dcb86519 [client,common] fix missing AAD guards 2025-06-13 11:23:37 +02:00
akallabeth
ee6d95ab25 [warnings] fix unused warnings 2025-06-13 10:15:56 +02:00
akallabeth
6168a7bfd1 [client,common] make all azure settings configurable 2025-06-10 16:30:06 +02:00
akallabeth
dbeda8e568 [client,sdl] fix clipboard leak 2025-06-05 10:45:41 +02:00
Li Gang
8b25743c18 [client,x11]#11658,when size changed of an existing appWindows, except resize the main window, resize it's pixmap also 2025-06-05 10:41:01 +08:00
akallabeth
b2b2952510 [client,sdl] simplify webview build 2025-06-03 21:09:05 +02:00
akallabeth
a769ac3441 [client,sdl] add metadata to binary 2025-06-03 19:30:07 +02:00
akallabeth
8be64a066c [client,common] add documentation for /v: formats
* Add short description of default formats (url, hostname, IPv4, IPv6)
* Add pipe example
* Add socket example
2025-06-03 17:10:37 +02:00
akallabeth
da05b25f3b [WaitForXXObject] use infinite timeout where possible 2025-06-03 17:07:31 +02:00
akallabeth
52ff1cef93 [cmake] install SSO-MIB if build by ExternalProject
* Install the library if we build it as part of FreeRDP
* Format files with cmake-format
2025-06-02 19:40:44 +02:00
akallabeth
f74a7247cd [client,sdl] fix clang-tidy warnings 2025-06-02 19:05:10 +02:00
akallabeth
63f4c63200 Merge pull request #11635 from motor-dev/master
[client,sdl] Wayland fixes for the SDL backend
2025-06-02 17:57:07 +02:00
akallabeth
9763297d6a [client,common] (re)initialize fuse root in cliprdr_file_context_init
The clipboard might be (re)initialized multiple times, to do
initialization and deinitialization in cliprdr_file_context_init and
cliprdr_file_context_uninit.
2025-06-02 09:20:22 +02:00
Armin Novak
583c9dabda [client,sdl] fix SDL_SCANCODE_KP_PERIOD mapping 2025-05-28 10:09:30 +02:00
yngwe@fry
0c979d1a41 Fixes that were lost in merge
- append the window index to the title. This helps wayland compositor scripts move the multimon windows to different monitors, as Wayland does not obey the placement hint.
- fixed inverted logic when checking the SmartSizing setting.
2025-05-27 23:42:23 +02:00
yngwe@fry
ac981843c9 Multimon/smart sizing fixes for the SDL backend
- properly compute the offsets for each monitor, when monitors have negative offsets or when primary monitor isn't at origin 0:0.
   ‣ SDL_VIDEODRIVER=wayland sdl-freerdp3  /list:monitor
        * [3] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007046 (DP-1)] 2560x1440	+0+0
          [4] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007036 (HDMI-A-2)] 1440x2560	+2560+-550
   If the offset is not taken into account, the remote desktop will be drawn with black borders at the top or left hand side of the windows.

- fix smart sizing being applied when not requested (overwriting proper offsets for multimon) and not being applied when requested.

- add monitor ID in the window title to enable wayland compositors (e.g. hyprland) to find the various windows.
   hyprland has one workspace per monitor and refuses to let the application choose the monitor (or sdl-freerdp does not ask nicely).
   sdl-freedrp /multimon opens both windows on the same screen.
   adding a monitor identifier in the title allows hyprland rules to find the window and move it to the proper workspace.

These changes allow sdl-freedrp to find the correct geometry on X11 and Wayland compositors (tested on plasma/kwin and hyprland, on X11, XWayland and native wayland)
2025-05-27 23:13:04 +02:00
yngwe@fry
d998b6e8ba Wayland fixes for the SDL backend
- properly compute the offsets for each monitor, when monitors have negative offsets.
   ‣ SDL_VIDEODRIVER=wayland sdl-freerdp3  /list:monitor
        * [3] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007046 (DP-1)] 2560x1440	+0+0
          [4] [ASUSTek COMPUTER INC VG27AQML1A S2LMQS007036 (HDMI-A-2)] 1440x2560	+2560+-550
   If the negative offset is not taken into account, the remote desktop will be drawn with black borders at the top or left hand side of the windows.

- also ensures these offsets are not reset at each redraw.

- add monitor ID in the window title to enable wayland compositors (e.g. hyprland) to find the various windows.
   hyprland has one workspace per monitor and refuses to let the application choose the monitor (or sdl-freerdp does not ask nicely).
   sdl-freedrp /multimon opens both windows on the same screen.
   adding a monitor identifier in the title allows hyprland rules to find the window and move it to the proper workspace.

These changes allow sdl-freedrp to find the correct geometry on Wayland compositors (tested on plasma/kwin and hyprland) when using SDL_VIDEODRIVER=wayland
2025-05-26 23:06:02 +02:00
akallabeth
4f4c3e6366 [client,sdl] use new JSON config reader 2025-05-26 19:36:40 +02:00
Li Gang
3622640985 fix x11 log 2025-05-26 09:17:02 +02:00
Li Gang
c389b2b8b1 fix compile errors: xfc not defined even if with WITH_XCURSOR=ON 2025-05-25 14:25:24 +08:00
akallabeth
34ab0b893d [warnings] fix clang-tidy warnings 2025-05-23 15:29:31 +02:00
akallabeth
5d088ce9c0 [client,cliprdr] refactor file clipboard 2025-05-23 15:23:28 +02:00
akallabeth
b43e1a6640 [client,x11] fix return value checks
X11 function return values are not properly defined in manpages, so
check for more details in upstream code and adjust the checks.
2025-05-23 13:09:20 +02:00
akallabeth
ff5aca1b0b [client,x11] add more logging X11 calls 2025-05-23 12:15:09 +02:00
akallabeth
1b1a7d35ec [client,x11] log XFlush 2025-05-22 19:47:41 +02:00
akallabeth
6007544a1a [client,x11] add return value logging 2025-05-22 17:54:54 +02:00
akallabeth
479cea48cc [client,x11] fix missing includes 2025-05-22 16:25:10 +02:00
akallabeth
5d9493d37f [client,x11] skip empty update rects 2025-05-22 16:25:07 +02:00
akallabeth
a41bae5258 Merge pull request #11619 from akallabeth/x11-log-extended
[client,x11] log XPutImage and XCopyRect
2025-05-22 16:12:16 +02:00
akallabeth
4ea50fd0c5 [client,x11] log XPutImage and XCopyRect 2025-05-22 16:08:32 +02:00
akallabeth
03a72a56db [client,common] lock clipboard on update 2025-05-22 14:58:21 +02:00
akallabeth
59d66237b7 [cmake] fix formatting 2025-05-22 14:58:19 +02:00
akallabeth
d7de808063 [client,common] move SSO_MIB detection to client/common 2025-05-22 10:28:05 +02:00
akallabeth
4b86e4bdd0 [client,sdl] fix hidden dialog update 2025-05-22 09:10:21 +02:00
Armin Novak
46b5f890b6 [client,common] make sso-mib opaque
Contain details of implementation in sso_mib_new and sso_mib_free
2025-05-21 14:52:06 +02:00
Armin Novak
66a69a26e2 [client,common] initialize sso-mib late
Only initialize the sso-mib library when a token is requested for the
first time. This allows proper rdpSettings initialization in PreConnect.
2025-05-21 14:31:34 +02:00
Armin Novak
39f7972b28 [client,common] add common GetCommonAccessToken
If client-common is build with WITH_SSO_MIB inject a callback that first
tries to retrieve a token from sso-mib library and only if that fails
falls back to a client provided callback.
2025-05-21 14:00:10 +02:00
Andreas Ziegler
d3ba03bba4 refactor: move sso-mib token fetching into separate compilation unit 2025-05-21 11:44:16 +02:00
Andreas Ziegler
d6d6909d66 chore: allow fetching sso-mib as ExternalProject 2025-05-21 11:44:16 +02:00
Andreas Ziegler
8714019703 refactor: move MIBClientApp into struct rdp_client_context 2025-05-21 11:44:16 +02:00
Andreas Ziegler
5e76909881 feat: add login through MS identity broker via sso-mib interface
This change enables an alternative way of acquiring the necessary
access tokens through a local identity broker. In the current
implementation, we need to visit URLs twice and paste back the
URLs we are redirected to in order to extract authorization codes
and ultimately fetch the correct access tokens for RDP (described
here: <0>).

As an alternative, MS also provides the Microsoft Authentication
Library (MSAL) through which authentication can be handled more
or less in the background when we're using a trusted device. In
particular, we can request access tokens with the same
parameters as we're currently doing through the URL-based scheme.

As the MSAL bindings are not available for C, we implemented a
small wrapper library called sso-mib which is available at
https://github.com/siemens/sso-mib. This library translates the
high-level requests (such as acquire_token_interactive) to
respective messages on the D-Bus messaging bus which is used to
communicate with the identity broker service on Linux. The
library can be built as a .deb package and subsequently be
found through PkgConfig mechanisms in CMake.

When sso-mib is not available through pkg-config, it can also
be placed in external/, with the directory structure looking
like the following. include/ is copied from the root of the
sso-mib directory and lib/ populated with the built shared
library files and symlinks.

    external/
    ├── README
    └── sso-mib
        ├── include
        │   └── sso-mib
        │       ├── mib-account.h
        │       ├── mib-client-app.h
        │       ├── mib-exports.h
        │       ├── mib-pop-params.h
        │       ├── mib-prt.h
        │       ├── mib-prt-sso-cookie.h
        │       └── sso-mib.h
        └── lib
            ├── libsso-mib.so -> libsso-mib.so.0
            ├── libsso-mib.so.0 -> libsso-mib.so.0.4.0
            └── libsso-mib.so.0.4.0

This feature is currently hidden behind a configuration switch
and must be enabled via `-DWITH_SSO_MIB=ON`. If the connection
to the broker fails (for example, if no identity broker is
installed or running on the system), we automatically fall back
to the current scheme of copy-pasting URLs.

<0>: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/e967ebeb-9e9f-443e-857a-5208802943c2
2025-05-21 11:44:16 +02:00
Armin Novak
c27433cc28 [client,wayland] use freerdp_timer_add API 2025-05-16 12:11:43 +02:00