Полноэкранные приложения при настройке двух мониторов

Я пробовал, но использовал backports 4.4.2-1, новую версию соотв. Мой терминал показывает мне ошибку при использовании обратных портов. Итак, я подумал ... может быть, если я использую make oldconfig , моя Fedora сбросит конфигурацию и снова скомпилирует все драйверы, показывая мне варианты сделать это на экране. Что ж, я был прав, и поэтому я активировал все драйверы и отключил настройки энергосбережения для Wi-Fi. После этого я перезагрузил свой ноутбук, и вначале моя Fedora 25 снова установила все диски и сделала свой выбор в файле .config.

9
04.04.2017, 00:16
1 ответ

Я использовал несколько скриптов поверх xrandr в течение нескольких лет, чтобы установить бок о бок и (в настоящее время ) рабочие столы в форме тройника на Arch Linux. Адаптация side-by-side.sh к вашим потребностям должна быть простой:

#!/bin/sh
eval `\`dirname -- "$0"\`/monitor_resolutions.sh`
expected_monitors=2
if [ "${monitor_count:-0}" -ne "$expected_monitors" ]
then
    echo "$0: Expected ${expected_monitors} monitors; found ${monitor_count:-0}." >&2
    exit 1
fi

xrandr \
    --output "$monitor1_name" \
        --mode ${monitor1_width}x${monitor1_height} \
        --rotate normal \
    --output "$monitor2_name" \
        --mode ${monitor2_width}x${monitor2_height} \
        --right-of "$monitor1_name" \
        --rotate normal

monitor_resolutions.sh вспомогательный сценарий:

#!/bin/sh
#
# NAME
#        monitor_resolutions.sh - Variables for monitor resolutions
#
# SYNOPSIS
#        eval `./monitor_resolutions.sh`
#
# DESCRIPTION
#        Prints a set of `eval`-able variable assignments with monitor name,
#        width and height for each monitor plus a monitor count.
#
# EXAMPLES
#        eval `./monitor_resolutions.sh`
#               Assign monitor1_name, monitor1_width, monitor1_height,
#               monitor2_name, etc. and monitor_count variables.
#
# BUGS
#        https://github.com/l0b0/tilde/issues
#
# COPYRIGHT
#        Copyright (C) 2013-2014 Victor Engmark
#
#        This program is free software: you can redistribute it and/or modify
#        it under the terms of the GNU General Public License as published by
#        the Free Software Foundation, either version 3 of the License, or
#        (at your option) any later version.
#
#        This program is distributed in the hope that it will be useful,
#        but WITHOUT ANY WARRANTY; without even the implied warranty of
#        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#        GNU General Public License for more details.
#
#        You should have received a copy of the GNU General Public License
#        along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
################################################################################

monitor_info() {
    xrandr --query | tee ~/.xsession-xrandr-query
}

monitor_resolutions() {
    # Input: XRandR monitor info
    # Output: Lines with monitor name, width and height separated by spaces
    while read -r word1 word2 _
    do
        if [ "${word2:-}" = 'connected' ]
        then
            IFS='xi ' read -r width height _
            printf '%s %d %d\n' "$word1" "$width" "$height"
        fi
    done
}

monitor_assignments() {
    # Input: Lines with monitor name, width and height separated by spaces
    # Output: eval-able variable assignments for each input value, including a final count
    count=0
    while read monitor width height
    do
        count=$(($count + 1))
        printf "monitor%d_name='%s'\n" "$count" "$monitor"
        printf "monitor%d_width='%s'\n" "$count" "$width"
        printf "monitor%d_height='%s'\n" "$count" "$height"
    done
    printf "monitor_count='%s'\n" "$count"
}

monitor_info | monitor_resolutions | monitor_assignments

Запуск side-by-side. sh в вашем локальном .xprofile или иным образом сразу после запуска X, и вы должны быть готовы к работе.

Эта установка работала с видеокартами AMD и nVidia с использованием как проприетарных, так и открытых драйверов. Я не думаю, что когда-либо пробовал использовать Wayland вместо X, но я подозреваю, что это должно работать, если xrandr работает с Wayland.

1
27.01.2020, 20:08

Теги

Похожие вопросы