experiment with libevent fails

4 views
Skip to first unread message

joa...@verona.se

unread,
Sep 19, 2021, 5:17:11 PM9/19/21
to turbovn...@googlegroups.com
Hello,

I would like to experiment with synthetic libevents, like what is done
in this post:

https://unix.stackexchange.com/questions/508612/simulate-graphics-tablet-using-libevent

What it does is creates a fake event device, sends events with pressure,
so in a pressure sensitive application you can see the effect, whcih is
shown in the post.

This program works locally on the client machine, but not on the
turbovnc server. This might be correct I guess, because maybe you dont
want input devices on the remote machine to affect the turbovnc session.

Still, I would like to experiment with this. Is there any way to do it
that I missed?

--
Joakim Verona
joa...@verona.se

DRC

unread,
Sep 19, 2021, 6:22:39 PM9/19/21
to turbovn...@googlegroups.com
I’ll look into it in more detail when I’m back in my lab, but one thing to bear in mind is that TurboVNC isn’t like a regular X server. Because it runs entirely with user-level credentials, it can’t access any physical devices on the server even if it wanted to. Creating and managing input devices occurs within the X.org hardware-dependent code. In the case of TurboVNC, the hardware-dependent code is the TurboVNC Server, so any new input devices have to be created by the TurboVNC Server code. Our remote X Input interface taps into that, allowing you to mirror a physical input device on the client with a virtual input device in the TurboVNC Server session. But those virtual input devices are connected to physical input devices on the client, not on the server. Physical input devices on the server are not accessible by TurboVNC (which, incidentally, is why VirtualGL is needed in order to get GPU-accelerated OpenGL.)

I’ll look at the code you sent and see what makes the most sense in terms of using it with TurboVNC.

> On Sep 19, 2021, at 4:17 PM, joa...@verona.se wrote:
>
> Hello,
> --
> You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/87r1dk6zak.fsf%40tanaka.verona.se.

DRC

unread,
Oct 5, 2021, 2:14:30 PM10/5/21
to turbovn...@googlegroups.com
I can make it work by doing the following:

1. If you want to test TurboVNC 3.0 evolving, then modify the TurboVNC
Helper code in the dev branch as follows:

--- a/unix/vncviewer/turbovnchelper.c
+++ b/unix/vncviewer/turbovnchelper.c
@@ -396,8 +396,11 @@ JNIEXPORT void JNICALL
Java_com_turbovnc_vncviewer_Viewport_setupExtInput
break;
}
}
- if (ci >= devInfo[i].num_classes)
- continue;
+ if (ci >= devInfo[i].num_classes) {
+ if (!strcmp(devInfo[i].name, "Tablet alone Pen (0)"))
+ productID = rfbGIIDevTypeStylus;
+ else continue;
+ }
}

BAILIF0(eidcls =

(No modifications are necessary if you want to test TurboVNC 2.2.x stable.)

2. If you are testing TurboVNC 3.0 evolving, then rebuild the TurboVNC
Viewer and Helper from the source code that you modified above.

3. On the client machine, create and run the completely_fake_tablet.py
script as instructed in the answer here:
https://unix.stackexchange.com/questions/508612/simulate-graphics-tablet-using-libevent.

(I modified the script to pause for 60 seconds rather than 30.)

4. Using the TurboVNC Viewer (either the modified 3.0 version or the
stock 2.2.x version), connect to a TurboVNC session using:

vncviewer host:display -fullscreen -loglevel 150

5. Proceed with the other instructions that the script gives you
vis-a-vis launching GIMP.

DRC
Reply all
Reply to author
Forward
0 new messages