Comments (7)
Hi @liang16
Could you add a lot more context please. What are you trying to do, and what doesn't work exactly?
from xorgxrdp.
Hi @matt335672
- My pc is Ubuntu 22.04 x64.
- Change the primary mouse button on in "setting".
- It's work ok on direct desktop, but not work on xrdp.
thinks.
from xorgxrdp.
I've had a good look into this, and it doesn't seem to be possible at the moment.
The main problem is that the xrdp mouse driver doesn't support the libinput "Left Handed Enabled" property. If I use xinput list-props
on an evdev device I get this:-
Device 'spice vdagent tablet': Device Enabled (124): 1 Coordinate Transformation Matrix (126): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Natural Scrolling Enabled (264): 0 libinput Natural Scrolling Enabled Default (265): 0 libinput Middle Emulation Enabled (266): 0 libinput Middle Emulation Enabled Default (267): 0 libinput Calibration Matrix (268): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Calibration Matrix Default (269): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Left Handed Enabled (270): 0 libinput Left Handed Enabled Default (271): 0 libinput Send Events Modes Available (247): 1, 0 libinput Send Events Mode Enabled (248): 0, 0 libinput Send Events Mode Enabled Default (249): 0, 0 Device Node (250): "/dev/input/event4" Device Product ID (251): 0, 0 libinput Drag Lock Buttons (272): libinput Horizontal Scroll Enabled (273): 1 libinput High Resolution Wheel Scroll Enabled (274): 1
Toggling the GNOME control above changes libinput Left Handed Enabled
to 1.
Using get_props
on the xrdp mouse driver I get this:-
Device 'xrdpMouse':
Device Enabled (113): 1
Coordinate Transformation Matrix (115): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (232): 0
Device Accel Constant Deceleration (233): 1.000000
Device Accel Adaptive Deceleration (234): 1.000000
Device Accel Velocity Scaling (235): 10.000000
I've tried messing about with xinput set-button-map
, but I can only set the first two buttons for some reason. Similarly, xmodmap
has similar issues.
The same happens with the VNC backend.
The RDP protocol itself has no way to communicate the user's preference from the RDP client that I can find. So I don't think a solution at the xrdp level is right here either.
I'm going to mark this as a 'feature request'. At the moment I can't see the best way to implement this. Anyone have any suggestions?
from xorgxrdp.
As it happens, I've made some progress on this.
The issues I had with xmodmap
yesterday aren't explained but they don't happen just after the X server is started. The old way of swapping buttons in the xmodmap manpage seems OK.
Create etc/X11/Xsession.d/90xrdp-gnome-set-handed
with the following contents to set the X server handedness at login time from the GNOME setting:-
# -*- sh -*-
# Xsession.d script to set handedness for a GNOME XRDP session mouse
#
# This file is sourced by Xsession(5), not executed.
if [ -n "$XRDP_SESSION" ]; then
case "`/usr/bin/dconf read \
/org/gnome/desktop/peripherals/mouse/left-handed`" in
true) /usr/bin/xmodmap -e "pointer = 3 2 1" ;;
*) /usr/bin/xmodmap -e "pointer = 1 2 3"
esac
fi
The required utilities are installed with sudo apt install dconf-cli x11-server-utils
.
@liang16 - do you want to try this and report back?
In the longer term, we could go down the route of emulating the libinput-specific device parameters for the xorgxrdp driver. These are text strings defined by the xorg-xf86-input-libinput driver in include/libinput-properties.h. This might work - I haven't tried it yet. Disadvantage of this technique is it only works for the xorgxrdp backend.
from xorgxrdp.
@liang16 - did you manage to try this?
from xorgxrdp.
@matt335672 I've tested your above config and it works correctly, with the expected caveat that a full log-off/log-on is required to toggle the setting.
FWIW The x11-server-utils
package was not found on my instance of debian stable.
from xorgxrdp.
Thanks for reporting back @BruceJL
The missing package looks like it's called x11-xserver-utils
in Bullseye. My mistake!
I'll move this to a feature request on xorgxrdp
.
from xorgxrdp.
Related Issues (20)
- mouse move from code using XTEST extension does not work HOT 3
- Xorg not showing on login screen HOT 2
- configure: error: Package requirements (xrdp >= 0.9.80) were not met HOT 3
- How do I get the refresh rate to 60 Hz?
- xfreerdp: caps lock sometimes gets out of sync / works inverted HOT 9
- building source error, error: ‘struct xrdp_client_info’ has no member named ‘monitorCount’ HOT 3
- Stuck in blue screen with "connection problem, giving up" HOT 11
- [v0.9] too fast scroll speed with macOS RDP client (again) HOT 23
- Unable to reconnect after restarting xorgxrdp HOT 24
- Add VA-API support to leverage WSL2 video hardware acceleration
- GFX: move to posix shm HOT 2
- In rdpLRANDR.c why set refresh rate to 50Hz? HOT 7
- xorgrdp: XF86VidModeSetGamma() -> BadValue HOT 3
- Can't mount drives after xrdp update HOT 1
- V0.10.0 - release note title incorrect HOT 1
- 0.10 version AUR not starting HOT 15
- xorgxrdp-glamor with virtualbox-guest-utils (VirtualBox Arch VM) HOT 2
- building 0.9.20 on debian gnu/linux sid HOT 1
- xorgxrdp uses high CPU in CRC HOT 15
- Natural Scrolling for xrdpMouse HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xorgxrdp.