Code Monkey home page Code Monkey logo

framebuffer-vncserver's People

Contributors

ektor5 avatar gregorlarson avatar jpnielsen avatar mbriand avatar ponty avatar shbatm avatar uklatt avatar workgroupengineering avatar zschroeder6212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framebuffer-vncserver's Issues

Compresison

Hi,

is there any way to change the compression or to turn it off

Alex

Integrate forked changes

Hi @ponty . Just found about your project and I want to use it in a project context.

However, there seems to be some performance issues in the implementation.
We have an additional load of 30% on an ARM single core.

Is there a chance to integrate some of the forked changes into your version to gain performance in the "official" version?

Some of the changes also implemented input handling.

See forks from @shbatm , @tobiaswaldvogel, @fhunleth, @Ultimaker and @dgburr.

LIBVNC: LIBVNC-NOTFOUND

when trying to compile with CMAKE i get the following error:


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Please set them or make sure they are set and tested correctly in the CMake files:
LIBVNC - linked by target "framebuffer-vncserver" in directory /home/vnc/framebuffer-vncserver-master


I have installed the VNCLIB from https://github.com/LibVNC/libvncserver and it still will not recognize the lib present.

Is it possible to use it with DRM backend in weston?

I am using the framebuffer-vncserver application with weston compositor using the DRM backend. This application needs to access the framebuffer being used, but when I check the device /dev/fb0 I see that nothing is being written there (which indicates that the /dev/fb0 device is not being used). I have searched for ways of accessing the framebuffer used in the DRI, but I had no success. Thus, is it possible to directly access the framebuffer in the Weston DRM backend? I know there is the fbdev-backend in weston. However, I have trouble using it with openGL. Furthermore the fbdev-backend will be deprecated in newer versions of weston (Thus, using the DRM backend is the preferred way). Could anyone help me? Is it possible to add instructions to do it in the README, or add some documentation for the DRM backend?

Mouse scroll not working

Hello.

I'm using framebuffer-vnc in a Yocto based OS for hardware with a touch-screen.
The framebuffer-vnc is working very well in general. However, for my application, I need to allow the user to use the mouse scroll. Somehow the mouse scroll is not being recognized by the framebuffer-vnc. I'm passing the touch screen input device, /dev/input/eventX, which allows me to use the left and right buttons of the mouse, but not the scroll.

Does anyone have seen this before or know how to fix it or have any tips on where to start looking for?

Thank you,
Arthur

tslib device support

Hi there, is there anyway to add support for tslib devices, I know tslib devices do not write functions in the kernel, is there another way to support it?

Multitouch support ?

Hi,

I am trying to run a simple Qt application (a simple button that changes a rectangle color) on my system (Buildroot, iMX6 and ILI251x touchscreen). I would like to remotely access this application from a VNC client (visualize and interact with).

I tried framebuffer-vncserver and vncviewer and I successfully visualize my application on the client. But I could not remotely push my button.

Input events from vncwiever generate ABS_X, ABS_Y and BTN_TOUCH events on the server side but they are not recognized and my button is not pushed as it should be.

root@target:# evtest /dev/input/event1 &
root@target:# ./framebuffer-vncserver -f /dev/fb1 -t /dev/input/ev
ent1 -v &
root@target:# Initializing framebuffer device /dev/fb1...
  xres=800, yres=600, xresv=800, yresv=600, xoffs=0, yoffs=0, bpp=32
  offset:length red=16:8 green=8:8 blue=0:8
No keyboard device
Initializing touch device /dev/input/event1 ...
  x:(0 14800)  y:(0 9800)
Initializing VNC server:
        width:  800
        height: 600
        bpp:    32
        port:   5900
        rotate: 0
Initializing server...
01/01/2000 03:11:27 Listening for VNC connections on TCP port 5900
01/01/2000 03:11:27 Listening for VNC connections on TCP6 port 5900
01/01/2000 03:11:32 Got connection from client 192.168.214.248
01/01/2000 03:11:32   other clients:
01/01/2000 03:11:32 Normal socket connection
01/01/2000 03:11:32 Client Protocol Version 3.8
01/01/2000 03:11:32 Protocol version sent 3.8, using 3.8
  fps: 0.000000
Dirty page: 801x600+0+0...
01/01/2000 03:11:32 rfbProcessClientSecurityType: executing handler for type 1
01/01/2000 03:11:32 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
Got ptrevent: 0000 (x=400, y=300)
01/01/2000 03:11:32 Pixel format for client 192.168.214.248:
01/01/2000 03:11:32   8 bpp, depth 6
01/01/2000 03:11:32   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
01/01/2000 03:11:32 Enabling full-color cursor updates for client 192.168.214.248
01/01/2000 03:11:32 Enabling NewFBSize protocol extension for client 192.168.214.248
01/01/2000 03:11:32 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC)
01/01/2000 03:11:32 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECD)
01/01/2000 03:11:32 Enabling LastRect protocol extension for client 192.168.214.248
01/01/2000 03:11:32 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC7)
01/01/2000 03:11:32 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC8)
01/01/2000 03:11:32 Using compression level 1 for client 192.168.214.248
01/01/2000 03:11:32 Using image quality level 0 for client 192.168.214.248
01/01/2000 03:11:32 Using JPEG subsampling 1, Q15 for client 192.168.214.248
01/01/2000 03:11:32 Using raw encoding for client 192.168.214.248
...
Got ptrevent: 0001 (x=128, y=82)
Event: time 946696300.137120, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 946696300.137120, type 3 (EV_ABS), code 0 (ABS_X), value 2368
Event: time 946696300.137120, type 3 (EV_ABS), code 1 (ABS_Y), value 1339
Event: time 946696300.137120, -------------- SYN_REPORT ------------
injectTouchEvent (screen(128,82) -> touch(2368,1339), down=1)
Got ptrevent: 0000 (x=128, y=82)
injectTouchEvent (screen(128,82) -> touch(2368,1339), down=0)
Event: time 946696300.170415, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0

When I press the button directly with the touchscreen (not with the VNC client), I have got these logs:

root@target:# Event: time 946696796.496230, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 0
Event: time 946696796.496230, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 102
Event: time 946696796.496230, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1109
Event: time 946696796.496230, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 660
Event: time 946696796.496230, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 5
Event: time 946696796.496230, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 946696796.496230, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 946696796.496230, type 3 (EV_ABS), code 0 (ABS_X), value 1109
Event: time 946696796.496230, type 3 (EV_ABS), code 1 (ABS_Y), value 660
Event: time 946696796.496230, -------------- SYN_REPORT ------------
Event: time 946696796.585903, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 0
Event: time 946696796.585903, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 946696796.585903, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 946696796.585903, -------------- SYN_REPORT ------------

It looks like framebuffer-vncserver does not generate all the required events to actually push my button. I did some modifications on the touch.c file in order to generate these events (ABS_MT_TRACKING_ID, ABS_MT_POSITION_X and ABS_MT_POSITION_Y):

diff --git a/framebuffer-vncserver.pro b/framebuffer-vncserver.pro
index fe49b51..48f778b 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -28,6 +28,7 @@ static int touchfd = -1;
 static int xmin, xmax;
 static int ymin, ymax;
 static int rotate;
+static int trkg_id = -1;
 
 int init_touch(const char *touch_device, int vnc_rotate)
 {
@@ -101,6 +102,36 @@ void injectTouchEvent(int down, int x, int y, struct fb_var_screeninfo *scrinfo)
 
     if (down >= 0)
     {
+        // Then send a ABS_MT_TRACKING_ID
+        gettimeofday(&ev.time, 0);
+        ev.type = EV_ABS;
+        ev.code = ABS_MT_TRACKING_ID;
+        ev.value = ++trkg_id;
+        if (write(touchfd, &ev, sizeof(ev)) < 0)
+        {
+            error_print("write event failed, %s\n", strerror(errno));
+        }
+
+        // Then send a ABS_MT_POSITION_X
+        gettimeofday(&ev.time, 0);
+        ev.type = EV_ABS;
+        ev.code = ABS_MT_POSITION_X;
+        ev.value = xin;
+        if (write(touchfd, &ev, sizeof(ev)) < 0)
+        {
+            error_print("write event failed, %s\n", strerror(errno));
+        }
+
+        // Then send a ABS_MT_POSITION_Y
+        gettimeofday(&ev.time, 0);
+        ev.type = EV_ABS;
+        ev.code = ABS_MT_POSITION_Y;
+        ev.value = yin;
+        if (write(touchfd, &ev, sizeof(ev)) < 0)
+        {
+            error_print("write event failed, %s\n", strerror(errno));
+        }
+
         // Then send a BTN_TOUCH
         gettimeofday(&ev.time, 0);
         ev.type = EV_KEY;
@@ -110,6 +141,16 @@ void injectTouchEvent(int down, int x, int y, struct fb_var_screeninfo *scrinfo)
         {
             error_print("write event failed, %s\n", strerror(errno));
         }
+    } else {
+        // ABS_MT_TRACKING_ID
+        gettimeofday(&ev.time, 0);
+        ev.type = EV_ABS;
+        ev.code = ABS_MT_TRACKING_ID;
+        ev.value = -1;
+        if (write(touchfd, &ev, sizeof(ev)) < 0)
+        {
+            error_print("write event failed, %s\n", strerror(errno));
+        }
     }
 
     // Then send the X

With these modifications, when I push the button from the VNC client, the push is well recognized by my Qt application (I do have some multi touch x and y position issues though).

I am pretty unaware of how input devices works on Linux as well as VNC, so any suggestion will be appreciated. I would like to know if you plan to support multi touchscreen events like ABS_MT_TRACKING_ID, ABS_MT_POSITION_X and ABS_MT_POSITION_Y ?

Best regards,
Maleselo

[FR] Rotate display

Hello!

I've tried to implement this myself - but was not very successful doing so... That's why I am opening this feature request :-)

If you have some spare time on your hands, perhaps you could implement a command line-switch to have the display rotated.

A little background: I am using your vnc-implementation to run on an vending machine, that has the display mounted vertically - so having the screen transmitted rotated would be quite helpful. :-)

RPi 4 - touch not working on VNC view

Hi,
I just installed your framebuffer-vncserver on a working RPi 4 system without X and selfmade JavaFX app. The 3.5'' display works locally as expected including a fully functional touchscreen.
I had to calculate Xmin, Xmax,, Ymin and Ymax for the monocle interface to startup the JVM running my Javafx app. But after I found the correct values for the left/ right/ upper and lower borders of the touchscreen this works now on local side without issues.
The framebuffer is /dev/fb1 and touchscreen is listed as /dev/Input/event0; therefore I took this settings as startup parameters for framebuffer-vncserver. There is no keyboard or mouse connected to the Rpi. The console output shows the right screen resolution (480x320) for the 3.5'' LCD, but X and Y for the Touchscreen are both (0 4095) - These values are not corresponding with my Xmin....Ymax values I calculated for my monocle for JVM.
The remote touchscreen is not working while the framebuffer is shown in right size and orientation on my remote client (linuxmint with vinagre)

What can I do to get the Touchscreen running on my remote system to use my remote mouse to touch the RPi?

Greets Thorsten

Errorreport - Help

Hi,

im using noVNC. When i connect to the server, the connection will be closed a few seconds later. Here the debug output.

root@PD2103-0015:/SmartDog# /usr/local/bin/framebuffer-vncserver -vv
Initializing framebuffer device /dev/fb0...
  xres=800, yres=480, xresv=800, yresv=480, xoffs=0, yoffs=0, bpp=32
  offset:length red=16:8 green=8:8 blue=0:8
No keyboard device
No touch device
Initializing VNC server:
        width:  800
        height: 480
        bpp:    32
        port:   5900
        rotate: 0
Initializing server...
search for password inside: "/SmartDog/smartdog.conf"
no password was found
11/08/2021 16:48:15 Listening for VNC connections on TCP port 5900
11/08/2021 16:48:15 Listening for VNC connections on TCP6 port 5900
11/08/2021 16:48:20   0 other clients
11/08/2021 16:48:20 Got 'ws' WebSockets handshake
11/08/2021 16:48:20 Got protocol: binary
11/08/2021 16:48:20   - webSocketsHandshake: using binary/raw encoding
11/08/2021 16:48:20   - WebSockets client version hybi-13
11/08/2021 16:48:20 Client Protocol Version 3.8
11/08/2021 16:48:20 Protocol version sent 3.8, using 3.8
11/08/2021 16:48:20 rfbProcessClientSecurityType: executing handler for type 1
11/08/2021 16:48:20 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
11/08/2021 16:48:20 Pixel format for client 127.0.0.1:
11/08/2021 16:48:20   32 bpp, depth 24, little endian
11/08/2021 16:48:20   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
11/08/2021 16:48:20 Using image quality level 6 for client 127.0.0.1
11/08/2021 16:48:20 Using JPEG subsampling 0, Q79 for client 127.0.0.1
11/08/2021 16:48:20 Using compression level 9 for client 127.0.0.1
11/08/2021 16:48:20 Enabling NewFBSize protocol extension for client 127.0.0.1
11/08/2021 16:48:20 Enabling LastRect protocol extension for client 127.0.0.1
11/08/2021 16:48:20 Enabling full-color cursor updates for client 127.0.0.1
11/08/2021 16:48:20 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEFE)
11/08/2021 16:48:20 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC)
11/08/2021 16:48:20 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC8)
11/08/2021 16:48:20 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC7)
11/08/2021 16:48:20 Using tight encoding for client 127.0.0.1
  fps: 0.000000
Dirty page: 801x480+0+0...
Got customPtrAddEvent: 0000 (x=782, y=126)
Mouse moved
Got customPtrAddEvent: 0000 (x=780, y=126)
Got customPtrAddEvent: 0000 (x=778, y=126)
Got customPtrAddEvent: 0000 (x=775, y=126)
Got customPtrAddEvent: 0000 (x=768, y=128)
Dirty page: 88x131+703+3...
Got customPtrAddEvent: 0000 (x=757, y=132)
Got customPtrAddEvent: 0000 (x=743, y=137)
Got customPtrAddEvent: 0000 (x=719, y=148)
Got customPtrAddEvent: 0000 (x=691, y=161)
Got customPtrAddEvent: 0000 (x=661, y=173)
Got customPtrAddEvent: 0000 (x=590, y=193)
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 49
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 166
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 49
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 86
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 247
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 43
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 50
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 87
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 247
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 43
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 49
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 86
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 rfbProcessClientNormalMessage: unknown message type 244
11/08/2021 16:48:21  ... closing connection
11/08/2021 16:48:21 hybiReadAndDecode: read; Bad file descriptor11/08/2021 16:48:21 rfbProcessClientNormalMessage: read: Bad file descriptor
11/08/2021 16:48:21 Client 127.0.0.1 gone
11/08/2021 16:48:21 Statistics             events    Transmit/ RawEquiv ( saved)
11/08/2021 16:48:21  FramebufferUpdate   :      3 |         0/        0 (  0.0%)
11/08/2021 16:48:21  LastRect            :      3 |        36/       36 (  0.0%)
11/08/2021 16:48:21  tight               :     54 |     30939/  3118760 ( 99.0%)
11/08/2021 16:48:21  RichCursor          :      1 |       255/      255 (  0.0%)
11/08/2021 16:48:21  TOTALS              :     61 |     31230/  3119051 ( 99.0%)
11/08/2021 16:48:21 Statistics             events    Received/ RawEquiv ( saved)
11/08/2021 16:48:21  PointerEvent        :     11 |        66/       66 (  0.0%)
11/08/2021 16:48:21  FramebufferUpdate   :      3 |        30/       30 (  0.0%)
11/08/2021 16:48:21  SetEncodings        :      1 |        68/       68 (  0.0%)
11/08/2021 16:48:21  SetPixelFormat      :      1 |        20/       20 (  0.0%)
11/08/2021 16:48:21  TOTALS              :     16 |       184/      184 (  0.0%)

What goes wrong?

Bad Quality on Raspberry PI

Hi everybody,

if have build libvncserver and framebuffer-vncserver for Raspberry PI 3. We have an own RootFS without Desktop. QT Framework draws the Application GUI. My problem is that the quality is very poor or the images are partially consumed, although the client has set the quality to True Color

Here two Screenshots, one shows the bad quality and the other do good one.

Screen1
Screen2

Does anyone have a tip for me?

Secure Websocket

Hi,

can anyone help me please?

I need a secure websocket connection. I use the libvncserver.

What i have to do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.