Specify Portion of Screen for x11vnc

Here you can post about the issues related to modifications performed manually (not through the kiosk wizard). Example: swapped kernel, added 3rd party modules or files.
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
chardho
White ninja
White ninja
Posts: 15
Joined: 12 Jan 2017, 05:39
Distribution: 4.7.0
Location: USA

Specify Portion of Screen for x11vnc

Post#1 by chardho » 05 Nov 2018, 14:22

How can I specify and connect to a portion of the existing physical monitor with vnc?

My current homepage dedicates the top 1/3 (in portrait vie) of the screen to be utilized for a videoconference and the lower 2/3 for UI. When connecting via vnc while in a video conference there is significant lag due to the rendering of the video in the top 1/3. Is there a way that I can connect to only the bottom 2/3 portion of the screen with the vnc so as to only view the UI portion of my display.

Reading the x11vnc man page it seems that the connected display can be changed to any portion of the display using the -clip command.
I have tried to do the following from both the command line as well as the run_command but neither seem to change what I'm seeing when connecting via vnc.

from command line:
x11vnc -clip 1080x1280+0+720

also tried
x11vnc -clip 1080x1280+0+720 -display :0

from run_command
echo "-clip 1080x1280+0+720 -display :0" > ~/.x11vncrc

Any help would be appreciated.

Chardho

chardho
White ninja
White ninja
Posts: 15
Joined: 12 Jan 2017, 05:39
Distribution: 4.7.0
Location: USA

Specify Portion of Screen for x11vnc

Post#2 by chardho » 05 Nov 2018, 15:04

Found my own solution:

you have to apply the command to the existing x session by using the -R command. So in order to change the section of the screen that you want to display over vnc you can apply the following using the run_command from the config file.

run_command=x11vnc -R -clip 1080x1280+0+720;

the clip command functions as follows:
-clip WxH+X+Y

Only show the sub-region of the full display that
corresponds to the rectangle geometry with size WxH and
offset +X+Y. The VNC display has size WxH (i.e. smaller
than the full display). This also works for -id/-sid
mode where the offset is relative to the upper left
corner of the selected window. An example use of this
option would be to split a large (e.g. Xinerama) display
into two parts to be accessed via separate viewers by
running a separate x11vnc on each part.

I found that is applied as expected based upon the translated position of the screen so there is no need to assume a "pre-rotated" state when calculating the values for W, H, X, and Y. Just apply them as you see the screen from the top left corner.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Specify Portion of Screen for x11vnc

Post#3 by fanthom » 05 Nov 2018, 16:10

Great - thank you for sharing.
Please add [Solved] to your thread title if the solution was found.

Locked