Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard could not use in win7 or xp #11

Closed
silenceli opened this issue Mar 27, 2012 · 3 comments
Closed

Clipboard could not use in win7 or xp #11

silenceli opened this issue Mar 27, 2012 · 3 comments

Comments

@silenceli
Copy link

Hi,
When I use Rdesktop in Linux as client to access my remote desktop throught XRDP, I found my remote desktops clipboard works well. but when I use mstsc in win7 or xp ,Clipboard couldnt work. I don`t know why. I hope you can solve this problem.

I use libxrdpfreerdp1.so

@hyeshik
Copy link

hyeshik commented May 3, 2012

The problem is due to xrdp's inverse endianness for virtual channel flags to Microsoft's specification. The following patch fixes the issue.

diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c
index 983be09..952ff12 100644
--- a/libxrdp/xrdp_sec.c
+++ b/libxrdp/xrdp_sec.c
@@ -730,7 +730,7 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec* self, struct
     channel_item = (struct mcs_channel_item*)
              g_malloc(sizeof(struct mcs_channel_item), 1);
     in_uint8a(s, channel_item->name, 8);
-    in_uint32_be(s, channel_item->flags);
+    in_uint32_le(s, channel_item->flags);
     channel_item->chanid = MCS_GLOBAL_CHANNEL + (index + 1);
     list_add_item(self->mcs_layer->channel_list, (long)channel_item);
     DEBUG(("got channel flags %8.8x name %s", channel_item->flags,

@cuzz
Copy link

cuzz commented May 10, 2012

It doesn't work yet. I can't use clipboard sharing(clipboard redirection) after modify and recompile the code.
But, what's worse, rdesktop on Linux which is normal to use clipboard redirection before ,now , clipboard redirection can not be used.

      rdp client (mstsc, rdesktop) --->  xrdp -->  rdp server (windows 2003 terminal server)

Test on:
xrdp: CentOS 5.8 Linux x86_64, FreeRDP-FreeRDP-ac5c7cd, FreeRDP-xrdp-c935eb1 (2012-5-10)
rdp-server: windows 2003, Simplified Chinese.

BEFORE applying hyeshik's patch code
(1) rdp-client: Windows 7 x64, Simplified Chinese. mstsc. FAILED.
(2) rdp-client: rdesktop on CentOS 5.8 Linux x86_64 OK.

AFTER that:
(1) rdp-client: Windows 7 x64, Simplified Chinese. mstsc. FAILED.
(2) rdp-client: rdesktop on CentOS 5.8 Linux x86_64 FAILED.

@metalefty
Copy link
Member

Reopen if this issue is not fixed in the latest release (v0.9.1).

Nexarian added a commit to Nexarian/xrdp that referenced this issue Feb 14, 2022
# This is the 1st commit message:

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
- Modification to the original resize setup that works with /gfx.

Depends on neutrinolabs/xorgxrdp#183

# This is the commit message #2:

Merging with egfx.

# This is the commit message #3:

Updating with reset graphics that stabilizes resize.

# This is the commit message #4:

Egfx resizing is stable now.

# This is the commit message #5:

Refactor resizing such that it uses a processing queue.

# This is the commit message #6:

Stability fix for the mac os client.

# This is the commit message #7:

Fixing bug where the resolution may be wrong on startup.

Add an "invalid" marker to the queue, and if the marker is present,
ignore the dynamic resolution update.

# This is the commit message #8:

Updating monitor processing in preparation for merging with xrdp_sec.

# This is the commit message #9:

Refactored monitor processing to be shared.

Both xrdp_sec and the dynamic monitor channel both used very similar
monitor processing routines. They are different specs, but almost
identical in the way they work. Refactor the code to be common so that
the behavior is consistent across the two.

# This is the commit message neutrinolabs#10:

Adding nvenc encoder compatibility.

# This is the commit message neutrinolabs#11:

Fixing build break and remerging with dynamic monitor refactor.

# This is the commit message neutrinolabs#12:

Fixing more breaks.

# This is the commit message neutrinolabs#13:

Fixing more bad merges.

# This is the commit message neutrinolabs#14:

Merging in xorgxrdp_helper hack.

# This is the commit message neutrinolabs#15:

Fixing npe for logging.

# This is the commit message neutrinolabs#16:

Merging with helper fixes.

# This is the commit message neutrinolabs#17:

Misc stability fixes.

# This is the commit message neutrinolabs#18:

More merge fixes.

# This is the commit message neutrinolabs#19:

Improving resize stability.

# This is the commit message neutrinolabs#20:

Refactor resizing

- State machine.
- Mechanisms to make sure the key frame is always sent on resize.
- Stability enhancements.

# This is the commit message neutrinolabs#21:

Fixing typo.

# This is the commit message neutrinolabs#22:

Fix for when H264 is disabled.

# This is the commit message neutrinolabs#23:

Stability enhancement. Prevent infinite loop with Microsoft Remote Desktop MacOS Client.

# This is the commit message neutrinolabs#24:

Removing log that causes problems.
matt335672 pushed a commit to matt335672/xrdp that referenced this issue Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants