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

XRDP uses wrong (old?) Xorg keycodes #179

Closed
mgorny opened this issue Oct 24, 2014 · 15 comments
Closed

XRDP uses wrong (old?) Xorg keycodes #179

mgorny opened this issue Oct 24, 2014 · 15 comments

Comments

@mgorny
Copy link
Contributor

mgorny commented Oct 24, 2014

For example, left arrow (RDP 75, extended) is mapped as 100. However, xev reports that Xorg is using 113 for it. I don't know if it's specific to hardware, architecture or X11 version. But the result is that keymap created by genkeymap doesn't work correctly with xrdp — has mis-mapped keys.

I also don't have a good solution here. In any case, I don't think we can use keycodes reliably.

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 24, 2014

This is the evdev vs base rules in xkb.
Most linux system use evdev now.
You can see the info by typeing
setxkbmap -query
vnc servers use the base rules mapping
All this doesn't matter if X11rdp is used.

@mgorny
Copy link
Contributor Author

mgorny commented Oct 24, 2014

Any suggestion on possible improvement? evdev->xfree86 mapping in genkeymap?

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 24, 2014

The problem is that Xvnc uses base, not evdev.
We can switch in xrdp but Xvnc sessions wont work.
I actually want to remove support for Xvnc session entirely.

@mgorny
Copy link
Contributor Author

mgorny commented Oct 24, 2014

Is there any documentation on how to build X11rdp?

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 24, 2014

See documentation at
http://www.xrdp.org/index.php?option=com_content&view=category&id=2&Itemid=7

Another great choice is to use xrdp-o-matic from scarygliders.net f you are using debian or ubuntu

Jay

@mgorny
Copy link
Contributor Author

mgorny commented Oct 24, 2014

As far as I understand, X11rdp requires building patched half-of-Xorg. This is nowhere near acceptable for us.

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 24, 2014

Unfortunately, this is what you get when you run Xvnc too.
A completely separate Xorg with all of it's separate security issues.

One solution I'm working on is an Xorg driver for xrdp that uses the Xorg on your system.
This will be much easier to build as you just build the driver.
Package maintainers and security groups will be much happier too.

@mgorny
Copy link
Contributor Author

mgorny commented Oct 26, 2014

Yes, the xorg driver would be awesome.

I have tried building x11rdp but so far with no success. It certainly doesn't build against any modern xorg-server, and with 1.9.3 I get:

rdpComposite.c: In function ‘compsoite_print’:
rdpComposite.c:245:56: error: ‘struct _Picture’ has no member named ‘dither’
                    pSrc->repeat, pSrc->repeatType, pSrc->dither, pSrc->filter,
                                                        ^
rdpComposite.c:31:41: note: in definition of macro ‘LLOGLN’
   do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
                                         ^
rdpComposite.c:282:56: error: ‘struct _Picture’ has no member named ‘dither’
                    pDst->repeat, pDst->repeatType, pDst->dither, pDst->filter,
                                                        ^
rdpComposite.c:31:41: note: in definition of macro ‘LLOGLN’
   do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
                                         ^

But this may be related to mixing old xorg-server with newer Xorg libraries.

@mgorny
Copy link
Contributor Author

mgorny commented Oct 26, 2014

Even after hacking all my way through it, it requires old Xorg server modules and it's basically a no-go for us. In comparison, tigervnc is constantly being patched to work with current Xorg versions…

@moobyfr
Copy link
Contributor

moobyfr commented Oct 26, 2014

You should have a look at rdp driver for xorg, I've added a page in the wiki for its usage. It's really fast to test: RDP driver for xorg

@bartw72
Copy link
Contributor

bartw72 commented Oct 26, 2014

It is possible to use a new Xorg. I have a branch in my repo that links (shared libs) the existing X11 install and only adds a 1.4Mb binary to bootstrap the thing (the code from Jay). So patches on the x11 code will be automatically fixed in x11rdp as well. I am running on quite some machines daily development work with abt 200+ devs.

@mgorny
Copy link
Contributor Author

mgorny commented Oct 27, 2014

So I've been finally able to build X11rdp with some hackery. Sadly, it's even worse than Xvnc. It seems that any altgr+letter keypress is causing a noticeable lag, and if followed by any other keypresses often results in missing characters in output.

I will try the Xorg drivers now :).

@mgorny
Copy link
Contributor Author

mgorny commented Oct 27, 2014

Ok, the Xorg drivers have the same issues as X11rdp — altgr causes awful lag. It has also has an extra feature of bringing down my local Xorg on remote session logout :).

@mgorny
Copy link
Contributor Author

mgorny commented Oct 27, 2014

Thanks for all the help. Since underlying issue is resolved now, I've opened Pull Request #180 that brings conditional evdev support to genkeymap. This way, it's possible to generate correct keymaps on systems using evdev.

@mgorny mgorny closed this as completed Oct 27, 2014
@jsorg71
Copy link
Contributor

jsorg71 commented Oct 28, 2014

Just to clear the record.
TigerVNC 1.3.0 uses xorg 1.7.7.
X11rdp uses 1.9.3, a new version.
If you use TigerVNC you are using a totally separate Xorg than what's installed on your system.
X11rdp does work with new version of Xorg including the latest version 1.15.x
X11rdp is not a "patched" Xorg, it's just a DDX build of Xorg to use the RDP DDX
None of the Xorg is patched other than to just get them to build.
I agree that Xorg driver is the best model but X11rdp is not less secure than tigerVNC, tightVNC or any X11 VNC that I know about.
Note, tightVNC(vnc4server) installed from my Debian 7 system(from apt-get) is based on XFree86 4.3!
Remember that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants