https://bugs.kde.org/show_bug.cgi?id=456697

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #15 from [email protected] ---
Use case: my work laptop is 1920x1080, but I use VNC to display it on a 4K
monitor (this avoids having to deal with a KVM switch or an auxiliary output,
and lets me use the second monitor for personal use when I'm not working).  I
force the laptop screen to 4K with this script.  Of course, the laptop screen
is essentially unreadable with this, but it's OK for this purpose.  Panning
would not work correctly; VNC would simply display the 1920x1080 viewport.

This (along with ensuring that krfb works with wayland) is probably my key
blocker to being able to switch off X.

```
modename=2160p
# Force the display 
if [[ -n "${DISPLAY:-}" && $DISPLAY = ':0' ]] ; then
    __xrandr_data="$(xrandr -q)"
    __xrandr_port="$(awk '/connected primary/ { print $1; exit}' <<<
"$__xrandr_data")"
    if ! grep -q 3840x2160 <<< "$__xrandr_data" ; then
        if [[ -n "$__xrandr_port" ]] ; then
            # shellcheck disable=2046
            xrandr --newmode $(echo "$modename"; cvt 3840 2160 60 | perl -ane
'if (/^Modeline/) { shift @F; shift @F; print "@F\n";}')
            xrandr --addmode "$__xrandr_port" "$modename"
        fi
    fi
    xrandr --output eDP-1 --auto --scale 2
    xrandr --output "$__xrandr_port" --scale 2 --mode "$modename" --fb
"3840x2160" --panning "3840x2160"
    unset __xrandr_port
    unset __xrandr_data
fi
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to