AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-49071

GTK's questions

Martin Hope
GTK
Asked: 2025-01-25 10:36:54 +0800 CST

为什么 xrandr 在镜像显示时不使用 --fb 设置

  • 7

我的办公室里有两台并排的 Ubuntu 显示器。我为不同的显示器配置设置了别名。有时候我想镜像显示器(用于与实验室里的学生讨论),有时候我想让学生使用第二台显示器作为演示设备。

当我在“landscape”或“portrait”之后运行“mirror”别名时,xrandr系统提示屏幕不够大,这是由于之前的设置造成的。如果我先运行“student”别名(这会关闭第二个显示器),那么就可以成功运行“mirror”。

我尝试过很多不同的编辑,但似乎都没有达到预期的效果。我做错了什么xrandr?

这是命令行上的输出。

[~] source ~/src/dotfiles/hosts/gtkoffice_rc 
[~] landscape 
[~] mirror
xrandr: specified screen 1920x1200 not large enough for output DP-2 (1920x1200+1920+0)
xrandr: Configure crtc 1 failed
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  21 (RRSetCrtcConfig)
  Value in failed request:  0x0
  Serial number of failed request:  54
  Current serial number in output stream:  54
[~] landscape 
[~] student
[~] mirror
[~] 

以下是来自~/src/dotfiles/hosts/gtkoffice_rc

export RIGHT_DISPLAY="DP-2"
export LEFT_DISPLAY="DP-3"
# for editing manuscripts
alias portrait='xrandr --fb 3120x1920  --output $LEFT_DISPLAY --mode 1920x1200 --panning 1920x1200+0+0 --output $RIGHT_DISPLAY --mode 1920x1200 --panning  1200x1920+1920+0 --rotate left'
# for normal work
alias landscape='xrandr --fb  3840x1200 --output $LEFT_DISPLAY --mode 1920x1200 --panning 1920x1200+0+0 --output $RIGHT_DISPLAY --mode 1920x1200 --panning 1920x1200+1920+0 --rotate normal'
# for discussions
alias mirror='xrandr --fb 1920x1200 --output $LEFT_DISPLAY --mode 1920x1200 --panning 1920x1200+0+0 --output $RIGHT_DISPLAY --mode 1920x1200 --panning 1920x1200+0+0 --rotate normal'
# student using 2nd monitor
alias student='xrandr --fb 1920x1200 --output $LEFT_DISPLAY --mode 1920x1200 --panning 1920x1200+0+0 --output $RIGHT_DISPLAY --off'
xrandr
  • 1 个回答
  • 23 Views
Martin Hope
GTK
Asked: 2019-04-15 18:31:53 +0800 CST

lsb-release 和 python3 (ubuntu 18.04) 之间的循环依赖

  • 0

我已经设法陷入了 lsb-release 和 python3 之间存在循环依赖关系的情况。当我尝试时,sudo apt install python3 --reinstall我得到以下信息(只是粘贴关键行)

(Reading database ... 470097 files and directories currently installed.)
Preparing to unpack .../python3_3.6.7-1~18.04_amd64.deb ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

[~] lsb_release
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007fa905a81740 (most recent call first):
Aborted (core dumped)

显然我的 lsb_release 坏了。但是如果我跑sudo apt-get install lsb-release我会得到

dpkg: error processing package python3 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of lsb-release:
 lsb-release depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

所以我不能在不修复 lsb-release 的情况下修复我的 python3 安装,反之亦然。

python3 lsb-release
  • 1 个回答
  • 1009 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve