kbumsik/VirtScreen

Can the remote VNC client get the Server’s mouse cursor position?

EATONJIANGHAHAHA opened this issue · 23 comments

Like I mentioned in the title. I have installed your program and it is amazing, I wonder if there is a way to just refresh the mouse position so that it could reflect on the VNC client, which could really help development.

I use VNC viewer on an iPad, Ubuntu 16.04 LTS system. If you’d like to know more information about my system please let me know.

The remote VNC server is backed by a popular program called x11vnc. "Mouse cursor in client" option, specifically -multiptr(LibVNC/x11vnc#4) option, is supported in the latest x11vnc and VirtScreen automatically detects if the option exists.

The problem is that Ubuntu/Debian never updates it to the latest version. v0.9.14 is out more than three years ago and Ubuntu keeps v0.9.13 even in the latest 18.04. (Ubuntu, why?)

Enough compliant with Ubuntu. Since it appears there is no PPA neither, you should download x11vnc and build from the source if you want the mouse cursor in the client:

git clone git@github.com:LibVNC/x11vnc.git
cd x11vnc
sudo apt-get install libvncserver-dev
./autogen.sh
./configure
make
sudo make install

Please tell me if there is any problems after building x11vnc.

uh... it turns out that when I switched to Screens 4 (VNC client) I can get the real-time mouse cursor update. XD thanks for the help though!

@EATONJIANGHAHAHA Do you mean Screens 4 in Apple app store? That's quite interesting.

Yeah, I did nothing except changing the VNC client app.

Great to hear that :) It’s a bit shame that it’s paid app though.

I'm on Ubuntu. I manually installed the new x11vnc, but I cannot get the pointer. I cannot select the option, and if I manually specify -multiptr it tells error in starting VNC. But running x11vnc manually with the -multiptr option works.

@marty90 VirtScreen might be stuck with the previous version of x11vnc. Firstly you should clean the Virtscreen configuration files:

rm -rf ~/.config/virtscreen

Then try it in a new user session e.g. reboot, because the manual x11vnc installation might alter $PATH or other environment variables.

It is like it is using the older vnc in /usr/bin/x11vnc instead of /usr/local/bin/x11vnc.
Even if 'which x11vnc' points to /usr/local/bin/x11vnc
Infact, manually putting the new binary in /usr/bin/x11vnc, now it works.

@marty90 Thanks for your valuable report!
VirtScreen has that behavior because I sanitized $PATH variable to avoid possible security problem. This line basically sets $PATH to the Unix default: /bin:/usr/bin. So it ignores binaries in /usr/local/bin.

I did this because I thought this possibly add more security but your situation is totally unintended. I probably need to delete that line and trust $PATH. I will release a new version with the fix in two weeks ;)

Great thanks!

Thanks for the help tho

@marty90 It took much longer than I thought, but the new release is out with the fix!

Thank You @kbumsik

I confirm that cursor is working with the latest x11vnc built from GIT and using VNC Viewer (Free) on an iPad Mini 1st gen.

Below the instructions to build x11vn in Fedora 29 and run VirtScreen:

Remove the previous VirtScreen config settings (you will need to reconfigure):

rm -rf ~/.config/virtscreen

Remove the older package

sudo dnf remove x11vnc

Install build dependencies:

sudo dnf install autoconf
sudo dnf install automake
sudo dnf builddep x11vnc

Download the package:

git clone git@github.com:LibVNC/x11vnc.git
cd x11vnc
./autogen.sh
./configure
make
sudo make install

All good to go.

Thanks all, this was a god-send.

Quick question; after following this, I have a redundant cursor on each screen, as well as my active cursor. Is this something that other people have experienced?

PS: love VirtScreen

@JessicaCGlenn I'm happy to hear you like VirtScreen :)
As I explained in my first comment, VirtScreen uses -multiptr option to resolve the problem. So yes your experience should be expected. Like the name of -multiptr implies, it creates as many redundant mouse pointers as clients connected to VirtScreen. It may feel a little bit awkward but I don't know if there is a workaround for now.

Hi @JessicaCGlenn, in my machine I see only one "ghost" static cursor that appears time to time. I set my vnc client to be "view only".

Hi @kbumsik

Thanks for the great app!

I've built and installed the newest version of x11vnc, but now virtscreen gives the x11vnc error "Double check if the port is already used.". I tried to make sure that the old version of x11vnc was removed in case it was running two instances to no avail? I'm not sure where to go from here - any ideas?

Thanks,

Hi @claudemuller
This means the TCP port you set (it's 5900 by default) is already used in another program. You may set another port number in "VNC" tab.
Also this can be caused by another x11vnc already running, probably cause of some bugs of VirtScreen. In this case you can resolve the problem by using killall x11vnc command or you can just reboot the computer.

Thanks,

Hi @claudemuller
This means the TCP port you set (it's 5900 by default) is already used in another program. You may set another port number in "VNC" tab.
Also this can be caused by another x11vnc already running, probably cause of some bugs of VirtScreen. In this case you can resolve the problem by using killall x11vnc command or you can just reboot the computer.

Thanks,

No matter which port number I use, always got the same error says the port is already used.

@EATONJIANGHAHAHA Do you mean Screens 4 in Apple app store? That's quite interesting.

that's definitely not solving the problem

Same here- love the product but the mouse cursor is stuck in the middle of the screen.
I removed x11vnc and tried building it from makefile as described by @cristianopimentel but there I receive errors (see screenshot).

image

Can anybody perhaps help me? thanks tons!