vnsee icon indicating copy to clipboard operation
vnsee copied to clipboard

Add option to rotate the server image in VNSee

Open oresk opened this issue 3 years ago • 9 comments

Another question from me :-) What would be needed to do to enable horizontal use?

Just modifying the orientation in xrandr (or arandr) did nothing for me.

oresk avatar Aug 30 '20 16:08 oresk

How are you setting up the display?

My use case is a little different (mirroring part of the screen with x11vnc so I can scribble on PDFs live), but I can do horizontal or vertical orientations with no issue:

# reMarkable screen is 1872x1408 (sideways)
# But my laptop is only 1080px high, so we need to scale
# 1408 / 1080 = 1.3037
# Round up to 1.3038 because x11vnc drops the fraction, giving exactly 1872x1408

# If reMarkable is vertical, then use
# 1872 / 1080 = 1.7333
# Width is then 812 (slightly less than half)
# Use 1.734 to get truncation/size right

# Start x11vnc
# Horizontal mode
#x11vnc -nocursor -clip 1436x1080+0+0 -scale 1.3038 -rotate -90 &

# Vertical mode
x11vnc -nocursor -clip 812x1080+0+0 -scale 1.734 &

stevenbell avatar Oct 23 '20 00:10 stevenbell

Hi @oresk! Thanks @stevenbell for answering. Could you provide more details on what you are trying to achieve? In principle, setting up the virtual screen resolution as 3840x1408 instead of 1408x3840 and adding the -rotate 90 flag to the x11vnc command line should do the trick. Did you encounter a specific error in doing that?

matteodelabre avatar Nov 09 '20 16:11 matteodelabre

Regarding the same issue, I did not manage to enable Horizontal rotation. It's not available in TightVNC on windows. Natively rotating the desktop does not change the rotation and I had no chance with fbdepth neither.

I thought doing fbdetph -r 1, would then make all the calls to FB rotated. But the settings do not stays. I'm not sure of how fbdepth works so maybe it's not even doing anythinf related to vnsee.

Thanks for your thoughts. Fbdepth could be a platform agnostic solution to orientation here.

Baccanno avatar Mar 13 '21 15:03 Baccanno

Thanks for the suggestion @Baccanno. Another solution would be to implement this directly in VNSee. I’ll look into it when I get some time and if enough people are interested.

matteodelabre avatar Apr 24 '21 20:04 matteodelabre

An option directly from vnsee to set rotation (90 => 270) would indeed be a great solution imo. Thanks for your work on this

Baccanno avatar Apr 25 '21 18:04 Baccanno

I'm interested in this feature, I'm running sway and when I try to transform 90, I get this warning in the client: Warning: The server resolution (1872x1404) does not fit in the screen (1404x1872).

roosemberth avatar Jun 22 '21 19:06 roosemberth

Not a solution, but certainly a workaround: you can echo 0 >> /sys/class/graphics/fb0/rotate and then launch vnsee.

For some reason if you have launched and quit vnsee before this, sometimes it does not seem to work, but you can simply restart and stop xochtl, set the fb0 rotation to 0 (again) and start vnsee.

image

roosemberth avatar Jun 22 '21 22:06 roosemberth

Not a solution, but certainly a workaround: you can echo 0 >> /sys/class/graphics/fb0/rotate and then launch vnsee.

For some reason if you have launched and quit vnsee before this, sometimes it does not seem to work, but you can simply restart and stop xochtl, set the fb0 rotation to 0 (again) and start vnsee.

image

I'll give it a try thanks

Baccanno avatar Jun 23 '21 08:06 Baccanno

I'd also love to see this implemented

D-a-r-n-o-l-d avatar Sep 01 '23 20:09 D-a-r-n-o-l-d