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

USB devices no longer work #10

Open
davthomaspilot opened this issue Feb 2, 2023 · 4 comments
Open

USB devices no longer work #10

davthomaspilot opened this issue Feb 2, 2023 · 4 comments

Comments

@davthomaspilot
Copy link

One of the gadgets I've developed uses a dongle to communicate with a wireless remote. It works when I use x11vnc, but not when I use the systemd services as explained here.

There's a utility "xinput" that I'm using to try to isolate the problem. It lists the available input devices.

When I do xinput list under x11vnc I get this:

pi@HeatTracker:~ $ xinput --list
â¡ Virtual core pointer                    	id=2	[master pointer  (3)]
â   â³ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
â   â³ Norwii Norwii Wireless Presenter        	id=7	[slave  pointer  (2)]
⣠Virtual core keyboard                   	id=3	[master keyboard (2)]
    â³ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    â³ Norwii Norwii Wireless Presenter        	id=6	[slave  keyboard (3)]
    â³ Norwii Norwii Wireless Presenter        	id=8	[slave  keyboard (3)]

The device my app communicates with is the Norwii Wireless Presenter.

When I use the systemd services for Xtigervnc, I see this
image

The X environment doesn't seem to know about the USB device.

(and, I just noticed copy/paste from the vnc session doesn't work)

Maybe this is related to the other issue and keyboard/mouse input is booting to :0 and needs to be 1:0. But, I don't know how to play with that.

Any clue? I'll see if have the same problem with Xtightvnc.

@davthomaspilot
Copy link
Author

Easy workaround is to run x11vnc as display 0, then the systemd socket version for other displays--like you said you were doing to keep RealVnc as display 0.

@gitbls
Copy link
Owner

gitbls commented Feb 3, 2023

Sorry, no clue. There are apparently a few differences in a virtual VNC session from a console VNC session. This is probably one of them.

Is there some reason you'd prefer to use x11vnc on the console rather than RealVNC? I would expect (but haven't tested it myself) RealVNC to have better performance than x11vnc.

@davthomaspilot
Copy link
Author

davthomaspilot commented Feb 3, 2023 via email

@davthomaspilot
Copy link
Author

I did this post back in 2017, got no replies...

Realvnc and x11vnc--they are not equivalent, especially if you want to use the more advanced features.

I do like that realvnc will support multiple, virtual displays. So, I can run multiple, Qt applications in full screen mode. Users can vnc connect to associated displays using the :port suffix on the hostname. I want to use that!

But, I can't do things that are necessary for what I'm doing.

For example, I use rpis that do little more than drive a display and show the remote desktop of another networked pi. I don't want any dependency on whether the vncserver pi boots before or after the vnc client pi. The vnc client should show the desktop of the vnc server p when it boots, or if it comes up first, when the vnc server pi (and my application) start..

I've accomplished this with x11vnc by the use of a reverse connection.

The vncserver pi starts vncserver on boot. Later, an application checks to see if the vnc client(s) have already connected. If so, that's fine. If not, the server booted before the client(s) initiated a vncviewer connection. So, a reverse connection is done.

This all works fine with x11vnc, but when I'm having lots of trouble trying to do the same thing with realvnc.

When I try to do a reverse connection with realvnc server, a new server instance is created. That's not what I want. I want listening clients to initiate a connection to the server that's already running. Can I do that with realvnc server?

So, maybe I could just issue an ssh command from my application running on the vnc server instead of using the reverse connection feature. But, It seems you can't launch a realvnc viewer from a script? You have to get use the graphical widget?

So, I figured I'd try using xtightvncviewer with the realVnc server. This works, if I let it prompt for a password, but authentication fails if I try using a file generated by vncpasswd. No clue why--I'm using VncAuth Authentication on the server.

Any help with the following would be appreciated:

  1. Do a reverse connection without starting a new server--just tell a listening viewer to connect to an existing server
  2. How to launch a realvnc viewer from a script (with no user intervention)
  3. how to get a 3rd party viewer (running on rpi stretch) like xtightvncviewer to connect withouth user intervention

At least if I end up sticking with x11vnc, others will know that it can be a bit of hassle to get realvnc working if you are launching servers and viewers from scripts or applicatiion software.

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

2 participants